From 2a3650febc804a18487f901638e137f9ff2dec88 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Nov 2006 07:58:58 +0000 Subject: [PATCH] =?UTF-8?q?Am=E9lioration=20gestion=20erreur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/adherents/adherent.class.php | 4 +++- scripts/adherents/sync_member_ldap2dolibarr.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index 1ed4da2c7ba..40f142617c3 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -371,7 +371,7 @@ class Adherent } else { - dolibarr_print_error($this->db); + $this->error=$this->db->error(); return -1; } } @@ -808,6 +808,7 @@ class Adherent else { $this->error=$this->db->error(); + dolibarr_syslog("Adherent.class::cotisation error ".$this->error); $this->db->rollback(); return -2; } @@ -815,6 +816,7 @@ class Adherent else { $this->error=$this->db->error(); + dolibarr_syslog("Adherent.class::cotisation error ".$this->error); $this->db->rollback(); return -1; } diff --git a/scripts/adherents/sync_member_ldap2dolibarr.php b/scripts/adherents/sync_member_ldap2dolibarr.php index 75046e5c227..684e208859b 100644 --- a/scripts/adherents/sync_member_ldap2dolibarr.php +++ b/scripts/adherents/sync_member_ldap2dolibarr.php @@ -158,7 +158,6 @@ if ($result >= 0) } } $member->naiss=dolibarr_mktime($ldapuser[$conf->global->LDAP_FIELD_BIRTHDATE][0]); - $member->datefin=dolibarr_mktime($ldapuser["prnxlastcontribution"][0]),1,'y'); // Propriete type membre $member->typeid=$typeid; @@ -192,6 +191,7 @@ if ($result >= 0) } if ($datelast) { + // Cree derniere cotisation et met a jour datefin dans adherent $price=price2num($ldapuser["prnxlastcontributionprice"][0]); $crowid=$member->cotisation(dolibarr_time_plus_duree($datelast,-1,'y'), $price, 0, $operation, $label, $num_chq); }