From 44268903a06cf0eda7f18b7ca738f256e15413d0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 May 2013 18:01:50 +0200 Subject: [PATCH] Fix: Pb in synchro update --- htdocs/adherents/class/adherent.class.php | 5 +++-- htdocs/societe/class/societe.class.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index e97a09559af..344bf615f56 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -392,7 +392,7 @@ class Adherent extends CommonObject $nbrowsaffected=0; $error=0; - dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", nosyncuserpass=".$nosyncuserpass.", email=".$this->email); + dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", nosyncuserpass=".$nosyncuserpass." nosyncthirdparty=".$nosyncthirdparty.", email=".$this->email); // Clean parameters $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname); @@ -1013,7 +1013,7 @@ class Adherent extends CommonObject { global $langs; - $sql = "SELECT d.rowid, d.civilite, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note,"; + $sql = "SELECT d.rowid, d.ref_ext, d.civilite, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note,"; $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; @@ -1050,6 +1050,7 @@ class Adherent extends CommonObject $this->entity = $obj->entity; $this->ref = $obj->rowid; $this->id = $obj->rowid; + $this->ref_ext = $obj->ref_ext; $this->civilite_id = $obj->civilite; $this->firstname = $obj->firstname; $this->lastname = $obj->lastname; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 1172a795920..f998f563729 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -588,7 +588,7 @@ class Societe extends CommonObject if ($result > 0) { - $lmember->company=$this->name; + $lmember->societe=$this->name; //$lmember->firstname=$this->firstname?$this->firstname:$lmember->firstname; // We keep firstname and lastname of member unchanged //$lmember->lastname=$this->lastname?$this->lastname:$lmember->lastname; // We keep firstname and lastname of member unchanged $lmember->address=$this->address;