add more infos in link

This commit is contained in:
Frédéric FRANCE 2021-01-20 21:02:01 +01:00
parent 96dffb619a
commit 118c9ac990
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
3 changed files with 20 additions and 18 deletions

View File

@ -1259,8 +1259,8 @@ if ($resql)
$listsalesrepresentatives = $companystatic->getSalesRepresentatives($user);
if ($listsalesrepresentatives < 0) dol_print_error($db);
$nbofsalesrepresentative = count($listsalesrepresentatives);
if ($nbofsalesrepresentative > 3) // We print only number
{
if ($nbofsalesrepresentative > 6) {
// We print only number
print $nbofsalesrepresentative;
} elseif ($nbofsalesrepresentative > 0) {
$userstatic = new User($db);
@ -1278,9 +1278,11 @@ if ($resql)
$userstatic->job = $val['job'];
$userstatic->gender = $val['gender'];
//print '<div class="float">':
print $userstatic->getNomUrl(-2);
print ($nbofsalesrepresentative < 3) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
$j++;
if ($j < $nbofsalesrepresentative) print ' ';
if ($j < $nbofsalesrepresentative) {
print ' ';
}
//print '</div>';
}
}

View File

@ -716,7 +716,7 @@ while ($i < min($num, $limit))
$listsalesrepresentatives = $socstatic->getSalesRepresentatives($user);
if ($listsalesrepresentatives < 0) dol_print_error($db);
$nbofsalesrepresentative = count($listsalesrepresentatives);
if ($nbofsalesrepresentative > 3) {
if ($nbofsalesrepresentative > 6) {
// We print only number
print $nbofsalesrepresentative;
} elseif ($nbofsalesrepresentative > 0) {
@ -736,9 +736,11 @@ while ($i < min($num, $limit))
$userstatic->gender = $val['gender'];
//print '<div class="float">':
print $userstatic->getNomUrl(-2);
print ($nbofsalesrepresentative < 3) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
$j++;
if ($j < $nbofsalesrepresentative) print ' ';
if ($j < $nbofsalesrepresentative) {
print ' ';
}
//print '</div>';
}
}

View File

@ -766,8 +766,7 @@ while ($i < min($num, $limit))
if (!empty($arrayfields['s.nom']['checked']))
{
print '<td class="tdoverflowmax100">';
if ($obj->socid)
{
if ($obj->socid) {
print $socstatic->getNomUrl(1);
} else {
print '&nbsp;';
@ -776,17 +775,15 @@ while ($i < min($num, $limit))
if (!$i) $totalarray['nbfield']++;
}
// Sales Representatives
if (!empty($arrayfields['commercial']['checked']))
{
if (!empty($arrayfields['commercial']['checked'])) {
print '<td>';
if ($obj->socid)
{
if ($obj->socid) {
$socstatic->id = $obj->socid;
$socstatic->name = $obj->name;
$listsalesrepresentatives = $socstatic->getSalesRepresentatives($user);
$nbofsalesrepresentative = count($listsalesrepresentatives);
if ($nbofsalesrepresentative > 3) // We print only number
{
if ($nbofsalesrepresentative > 6) {
// We print only number
print $nbofsalesrepresentative;
} elseif ($nbofsalesrepresentative > 0) {
$userstatic = new User($db);
@ -803,10 +800,11 @@ while ($i < min($num, $limit))
$userstatic->phone = $val['phone'];
$userstatic->job = $val['job'];
$userstatic->gender = $val['gender'];
print $userstatic->getNomUrl(1, '', 0, 0, 12);
//print $userstatic->getNomUrl(-2);
print ($nbofsalesrepresentative < 3) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
$j++;
if ($j < $nbofsalesrepresentative) print ' ';
if ($j < $nbofsalesrepresentative) {
print ' ';
}
}
}
//else print $langs->trans("NoSalesRepresentativeAffected");