add more infos in link
This commit is contained in:
parent
9e5dc89cea
commit
9e5f0a8cb9
@ -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 '<div class="float">':
|
||||
print $userstatic->getNomUrl(-2);
|
||||
$j++;
|
||||
|
||||
@ -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 '<div class="float">':
|
||||
print $userstatic->getNomUrl(-2);
|
||||
|
||||
@ -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++;
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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 '<input type="hidden" name="socid" value="'.$object->id.'" />';
|
||||
$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 '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'" />';
|
||||
print '</form>';
|
||||
@ -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 ' ';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user