diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 6e14a1ec6e6..f51390d90b4 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -388,22 +388,22 @@ class Societe extends CommonObject // Clean parameters $this->id = $id; - $this->name=$this->name?trim($this->name):trim($this->nom); - $this->nom=trim($this->nom); // TODO obsolete - $this->ref_ext=trim($this->ref_ext); - $this->address=$this->address?trim($this->address):trim($this->adresse); - $this->adresse=$this->address; // TODO obsolete - $this->zip=$this->zip?trim($this->zip):trim($this->cp); - $this->cp=$this->zip; // TODO obsolete - $this->town=$this->town?trim($this->town):trim($this->ville); - $this->ville=$this->town; // TODO obsolete - $this->state_id=trim($this->state_id); + $this->name = $this->name?trim($this->name):trim($this->nom); + $this->nom = trim($this->nom); // TODO obsolete + $this->ref_ext = trim($this->ref_ext); + $this->address = $this->address?trim($this->address):trim($this->adresse); + $this->adresse = $this->address; // TODO obsolete + $this->zip = $this->zip?trim($this->zip):trim($this->cp); + $this->cp = $this->zip; // TODO obsolete + $this->town = $this->town?trim($this->town):trim($this->ville); + $this->ville = $this->town; // TODO obsolete + $this->state_id = trim($this->state_id); $this->country_id = ($this->country_id > 0)?$this->country_id:$this->pays_id; - $this->pays_id = $this->country_id; + $this->pays_id = $this->country_id; // TODO obsolete $this->phone = trim($this->phone?$this->phone:$this->tel); $this->phone = preg_replace("/\s/","",$this->phone); $this->phone = preg_replace("/\./","",$this->phone); - $this->tel = $this->phone; + $this->tel = $this->phone; // TODO obsolete $this->fax = trim($this->fax); $this->fax = preg_replace("/\s/","",$this->fax); $this->fax = preg_replace("/\./","",$this->fax); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index a81426f1739..0a5888eb77c 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -129,7 +129,7 @@ if (empty($reshook)) $object->town = GETPOST('town'); $object->country_id = GETPOST('country_id'); $object->state_id = GETPOST('departement_id'); - $object->tel = GETPOST('tel'); + $object->phone = GETPOST('phone'); $object->fax = GETPOST('fax'); $object->email = GETPOST('email'); $object->url = GETPOST('url'); @@ -248,7 +248,7 @@ if (empty($reshook)) $contact->socid = $object->id; // fk_soc $contact->status = 1; $contact->email = $object->email; - $contact->phone_pro = $object->tel; + $contact->phone_pro = $object->phone; $contact->fax = $object->fax; $contact->priv = 0; @@ -559,7 +559,7 @@ else $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); $object->state_id = GETPOST('departement_id'); - $object->tel = GETPOST('tel'); + $object->phone = GETPOST('phone'); $object->fax = GETPOST('fax'); $object->email = GETPOST('email'); $object->url = GETPOST('url'); @@ -818,7 +818,7 @@ else } // Phone / Fax - print '