From a79283c490d0ba07755a8e22b85af5df9dbbbfde Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 25 Oct 2019 17:15:34 +0200 Subject: [PATCH 1/7] NEW add office phone for salespresentatives for complete https://github.com/Dolibarr/dolibarr/pull/12225 --- htdocs/societe/class/societe.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 6c8f3b620ed..8e96ff86d1e 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.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,7 @@ 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]['statut']=$obj->statut; $reparray[$i]['entity']=$obj->entity; $reparray[$i]['login']=$obj->login; From 7c8efc741e10cc730781a064afd157ec94ff0362 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 25 Oct 2019 17:20:09 +0200 Subject: [PATCH 2/7] Update user.class.php --- htdocs/user/class/user.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 86de44ff1e7..44485d0c1f1 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2322,7 +2322,8 @@ class User extends CommonObject $label.= '' . $langs->trans('Name') . ': ' . $this->getFullName($langs, ''); if (! empty($this->login)) $label.= '
' . $langs->trans('Login') . ': ' . $this->login; - $label.= '
' . $langs->trans("EMail").': '.$this->email; + $label.= '
' . $langs->trans("Email").': '.$this->email; + $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 From 63cc9422983ac2c76527922539c924ad224c8e1c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 25 Oct 2019 17:20:42 +0200 Subject: [PATCH 3/7] Update linesalesrepresentative.tpl.php --- htdocs/societe/tpl/linesalesrepresentative.tpl.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php index 8bb112fa998..393159ec2d6 100644 --- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -42,6 +42,7 @@ if ($nbofsalesrepresentative > 0) $userstatic->statut=$val['statut']; $userstatic->photo=$val['photo']; $userstatic->email=$val['email']; + $userstatic->phone=$val['phone']; $userstatic->entity=$val['entity']; print $userstatic->getNomUrl(-1); print ' '; From 49f5e54a8bf067a3ad253dd4597d5236427f3b9c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 25 Oct 2019 18:10:04 +0200 Subject: [PATCH 4/7] Update user.class.php --- htdocs/user/class/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 44485d0c1f1..549309dddfb 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2323,7 +2323,7 @@ class User extends CommonObject if (! empty($this->login)) $label.= '
' . $langs->trans('Login') . ': ' . $this->login; $label.= '
' . $langs->trans("Email").': '.$this->email; - $label.= '
' . $langs->trans("Phone").': '.$this->phone; + 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 From bb89a16c1aebba0b43a7985a6e2c578d872aa70d Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 26 Oct 2019 14:59:43 +0200 Subject: [PATCH 5/7] Update societe.class.php --- htdocs/societe/class/societe.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 8e96ff86d1e..07fab602502 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.office_phone, 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)) { @@ -1895,6 +1895,7 @@ class Societe extends CommonObject $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; From b96cbec2b5ed0c157a7edd489aab387fbfb5e06c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 26 Oct 2019 15:00:42 +0200 Subject: [PATCH 6/7] Update linesalesrepresentative.tpl.php --- htdocs/societe/tpl/linesalesrepresentative.tpl.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php index 393159ec2d6..9a17ac1e202 100644 --- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -43,6 +43,7 @@ if ($nbofsalesrepresentative > 0) $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 ' '; From 6f52ae80fe9d3a8929ac3a096b1e38f10c293886 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 26 Oct 2019 15:01:40 +0200 Subject: [PATCH 7/7] Update user.class.php --- htdocs/user/class/user.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 549309dddfb..db919c9bf0a 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2320,8 +2320,8 @@ 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; + 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))