diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index c676eb8c8b2..70718bb0315 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1865,7 +1865,7 @@ class Societe extends CommonObject $reparray=array(); - $sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo"; + $sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.office_phone, u.job, u.email, u.statut, u.entity, u.photo"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."user as u"; if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { @@ -1894,6 +1894,8 @@ class Societe extends CommonObject $reparray[$i]['lastname']=$obj->lastname; $reparray[$i]['firstname']=$obj->firstname; $reparray[$i]['email']=$obj->email; + $reparray[$i]['phone']=$obj->office_phone; + $reparray[$i]['job']=$obj->job; $reparray[$i]['statut']=$obj->statut; $reparray[$i]['entity']=$obj->entity; $reparray[$i]['login']=$obj->login; diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php index 8bb112fa998..9a17ac1e202 100644 --- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -42,6 +42,8 @@ if ($nbofsalesrepresentative > 0) $userstatic->statut=$val['statut']; $userstatic->photo=$val['photo']; $userstatic->email=$val['email']; + $userstatic->phone=$val['phone']; + $userstatic->job=$val['job']; $userstatic->entity=$val['entity']; print $userstatic->getNomUrl(-1); print ' '; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 86de44ff1e7..db919c9bf0a 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2320,9 +2320,10 @@ class User extends CommonObject $label.= '
'; $label.= '' . $langs->trans("User") . '
'; $label.= '' . $langs->trans('Name') . ': ' . $this->getFullName($langs, ''); - if (! empty($this->login)) - $label.= '
' . $langs->trans('Login') . ': ' . $this->login; - $label.= '
' . $langs->trans("EMail").': '.$this->email; + if (! empty($this->login)) $label.= '
' . $langs->trans('Login') . ': ' . $this->login; + if (! empty($this->job)) $label.= '
' . $langs->trans("Job").': '.$this->job; + $label.= '
' . $langs->trans("Email").': '.$this->email; + if (! empty($this->phone)) $label.= '
' . $langs->trans("Phone").': '.$this->phone; if (! empty($this->admin)) $label.= '
' . $langs->trans("Administrator").': '.yn($this->admin); if (! empty($this->socid) ) // Add thirdparty for external users