diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 72ae2b04922..e0d351ef084 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1328,7 +1328,7 @@ class Societe extends CommonObject { $obj = $this->db->fetch_object($resql); $reparray[$i]['id']=$obj->rowid; - $reparray[$i]['name']=$obj->name; + $reparray[$i]['lastname']=$obj->lastname; $reparray[$i]['firstname']=$obj->firstname; $i++; } @@ -1608,7 +1608,7 @@ class Societe extends CommonObject { $contact_property = array(); - $sql = "SELECT rowid, email, phone_mobile, name, firstname"; + $sql = "SELECT rowid, email, phone_mobile, lastname, firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE fk_soc = '".$this->id."'"; @@ -1624,7 +1624,7 @@ class Societe extends CommonObject $obj = $this->db->fetch_object($resql); if ($mode == 'email') $property=$obj->email; else if ($mode == 'mobile') $property=$obj->phone_mobile; - $contact_property[$obj->rowid] = trim($obj->firstname." ".$obj->name)." <".$property.">"; + $contact_property[$obj->rowid] = trim($obj->firstname." ".$obj->lastname)." <".$property.">"; $i++; } } @@ -1646,7 +1646,7 @@ class Societe extends CommonObject { $contacts = array(); - $sql = "SELECT rowid, name, firstname FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = '".$this->id."'"; + $sql = "SELECT rowid, lastname, firstname FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = '".$this->id."'"; $resql=$this->db->query($sql); if ($resql) { @@ -1657,7 +1657,7 @@ class Societe extends CommonObject while ($i < $nump) { $obj = $this->db->fetch_object($resql); - $contacts[$obj->rowid] = $obj->firstname." ".$obj->name; + $contacts[$obj->rowid] = $obj->firstname." ".$obj->lastname; $i++; } } @@ -1680,7 +1680,7 @@ class Societe extends CommonObject { $contact_property=''; - $sql = "SELECT rowid, email, phone_mobile, name, firstname"; + $sql = "SELECT rowid, email, phone_mobile, lastname, firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE rowid = '".$rowid."'"; @@ -1693,7 +1693,7 @@ class Societe extends CommonObject { $obj = $this->db->fetch_object($resql); - if ($mode == 'email') $contact_property = "$obj->firstname $obj->name <$obj->email>"; + if ($mode == 'email') $contact_property = "$obj->firstname $obj->lastname <$obj->email>"; else if ($mode == 'mobile') $contact_property = $obj->phone_mobile; } return $contact_property; @@ -2506,8 +2506,8 @@ class Societe extends CommonObject $this->state_id=empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)?'':$conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT; $this->note=empty($conf->global->MAIN_INFO_SOCIETE_NOTE)?'':$conf->global->MAIN_INFO_SOCIETE_NOTE; - $this->nom=$this->name; // deprecated - $this->cp=$this->zip; // deprecated + $this->nom=$this->name; // deprecated + $this->cp=$this->zip; // deprecated // We define country_id, country_code and country $country_id=$country_code=$country_label=''; diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 9a36e3fba12..9de9bdcea33 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -269,7 +269,7 @@ if ($result > 0) // Line with titles print '
| '.$langs->trans('Address').' | |||