From d6178bd605d2ad3a8dc246b7a8ba80b7aef5bd91 Mon Sep 17 00:00:00 2001 From: cdelbos Date: Fri, 10 Feb 2017 16:20:33 +0100 Subject: [PATCH] Date --- library/WsScore/Saisie/v0.2/Service.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/library/WsScore/Saisie/v0.2/Service.php b/library/WsScore/Saisie/v0.2/Service.php index 847fd061..67b7fd14 100644 --- a/library/WsScore/Saisie/v0.2/Service.php +++ b/library/WsScore/Saisie/v0.2/Service.php @@ -1077,7 +1077,7 @@ class Saisie extends Scores_Ws_Server $annonce = $res[0]; $annonce['siren'] = $sirenOut; $annonce['sirenValide'] = 2; - $annonce['dateInsert'] = date('YmdHis'); + $annonce['dateInsert'] = date('Y-m-d H:i:s'); $annonce['idSirenage'] = $this->User->id; $annonce['nic'] = $nicOut; if ($nicOut>0) $annonce['nicValide'] = 2; @@ -1100,17 +1100,20 @@ class Saisie extends Scores_Ws_Server $annonce = $res[0]; $annonce['siren'] = $sirenOut; $annonce['sirenValide'] = 2; - $annonce['dateInsert'] = date('YmdHis'); + $annonce['dateInsert'] = date('Y-m-d H:i:s'); $annonce['idSirenage'] = $this->User->id; $annonce['nic'] = $nicOut; if ($nicOut>0) $annonce['nicValide'] = 2; + $rep=$iDb->insert($table, $annonce, true, true); + Metier_Util_Log::write('I',var_export($rep,true));die; if ($iDb->insert($table, $annonce, true, true)) { Metier_Util_Log::write('I',"Duplication de l'annonce en source $source sur n°$idAnn (siretIn=$siretIn, siretOut=$siretOut)",__LINE__,__FILE__, __FUNCTION__, __CLASS__); $result = true; } else { - Metier_Util_Log::write('I',"Duplication impossible de l'annonce en source $source sur n°$idAnn (siretIn=$siretIn, siretOut=$siretOut) : ".mysql_error(),__LINE__,__FILE__, __FUNCTION__, __CLASS__); + Metier_Util_Log::write('I',"Duplication impossible de l'annonce en source $source sur n°$idAnn (siretIn=$siretIn, siretOut=$siretOut) : ".mysql_error($iDb),__LINE__,__FILE__, __FUNCTION__, __CLASS__); + //Metier_Util_Log::write('I',var_export($annonce,true)); $error->errnum = 1; - $error->errmsg = "Duplication de l'annonce impossible"; + $error->errmsg = "Duplication de l'annonce impossible".__LINE__; } }