diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 1e3f4080678..b01c3820d11 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1262,12 +1262,10 @@ if ($resql) if ($nbofsalesrepresentative > 3) // We print only number { print $nbofsalesrepresentative; - } elseif ($nbofsalesrepresentative > 0) - { + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($db); $j = 0; - foreach ($listsalesrepresentatives as $val) - { + foreach ($listsalesrepresentatives as $val) { $userstatic->id = $val['id']; $userstatic->lastname = $val['lastname']; $userstatic->firstname = $val['firstname']; @@ -1275,7 +1273,10 @@ if ($resql) $userstatic->statut = $val['statut']; $userstatic->entity = $val['entity']; $userstatic->photo = $val['photo']; - + $userstatic->login = $val['login']; + $userstatic->phone = $val['phone']; + $userstatic->job = $val['job']; + $userstatic->gender = $val['gender']; //print '
': print $userstatic->getNomUrl(-2); $j++; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index c05953f498b..3ef8e65a70c 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -719,12 +719,10 @@ while ($i < min($num, $limit)) if ($nbofsalesrepresentative > 3) { // We print only number print $nbofsalesrepresentative; - } elseif ($nbofsalesrepresentative > 0) - { + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($db); $j = 0; - foreach ($listsalesrepresentatives as $val) - { + foreach ($listsalesrepresentatives as $val) { $userstatic->id = $val['id']; $userstatic->lastname = $val['lastname']; $userstatic->firstname = $val['firstname']; @@ -732,6 +730,10 @@ while ($i < min($num, $limit)) $userstatic->statut = $val['statut']; $userstatic->entity = $val['entity']; $userstatic->photo = $val['photo']; + $userstatic->login = $val['login']; + $userstatic->phone = $val['phone']; + $userstatic->job = $val['job']; + $userstatic->gender = $val['gender']; //print '
': print $userstatic->getNomUrl(-2); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index b246d88de93..5330b6430fd 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -788,12 +788,10 @@ while ($i < min($num, $limit)) if ($nbofsalesrepresentative > 3) // We print only number { print $nbofsalesrepresentative; - } elseif ($nbofsalesrepresentative > 0) - { + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($db); $j = 0; - foreach ($listsalesrepresentatives as $val) - { + foreach ($listsalesrepresentatives as $val) { $userstatic->id = $val['id']; $userstatic->lastname = $val['lastname']; $userstatic->firstname = $val['firstname']; @@ -801,6 +799,11 @@ while ($i < min($num, $limit)) $userstatic->statut = $val['statut']; $userstatic->entity = $val['entity']; $userstatic->photo = $val['photo']; + $userstatic->photo = $val['photo']; + $userstatic->login = $val['login']; + $userstatic->phone = $val['phone']; + $userstatic->job = $val['job']; + $userstatic->gender = $val['gender']; print $userstatic->getNomUrl(1, '', 0, 0, 12); //print $userstatic->getNomUrl(-2); $j++; diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 83309e0faf1..5686b3660d1 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -303,8 +303,7 @@ abstract class ActionsCardCommon if ($nbofsalesrepresentative > 3) // We print only number { $this->tpl['sales_representatives'] .= $nbofsalesrepresentative; - } elseif ($nbofsalesrepresentative > 0) - { + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($this->db); $i = 0; foreach ($listsalesrepresentatives as $val) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 35e656a83b5..9c8e93b6567 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2197,7 +2197,7 @@ class Societe extends CommonObject $reparray = array(); - $sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.office_phone, u.job, u.email, u.statut as status, u.entity, u.photo"; + $sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.office_phone, u.job, u.email, u.statut as status, u.entity, u.photo, u.gender"; $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)) { $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; @@ -2234,6 +2234,7 @@ class Societe extends CommonObject $reparray[$i]['entity'] = $obj->entity; $reparray[$i]['login'] = $obj->login; $reparray[$i]['photo'] = $obj->photo; + $reparray[$i]['gender'] = $obj->gender; } else { $reparray[] = $obj->rowid; } diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php index 4f09bebfe71..1eca5b22623 100644 --- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -16,8 +16,7 @@ */ // Protection to avoid direct call of template -if (empty($conf) || !is_object($conf)) -{ +if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; } @@ -42,7 +41,9 @@ if ($action == 'editsalesrepresentatives') { print ''; $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1); $arrayselected = GETPOST('commercial', 'array'); - if (empty($arrayselected)) $arrayselected = $object->getSalesRepresentatives($user, 1); + if (empty($arrayselected)) { + $arrayselected = $object->getSalesRepresentatives($user, 1); + } print $form->multiselectarray('commercial', $userlist, $arrayselected, null, null, null, null, "90%"); print ''; print ''; @@ -62,6 +63,7 @@ if ($action == 'editsalesrepresentatives') { $userstatic->phone = $val['phone']; $userstatic->job = $val['job']; $userstatic->entity = $val['entity']; + $userstatic->gender = $val['gender']; print $userstatic->getNomUrl(-1); print ' '; }