diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index b01c3820d11..07ff1c64dbb 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -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 '
':
- 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 '
';
}
}
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index 3ef8e65a70c..5b208f34ff7 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -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 '':
- 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 '
';
}
}
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 918d9002904..76697359299 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -766,8 +766,7 @@ while ($i < min($num, $limit))
if (!empty($arrayfields['s.nom']['checked']))
{
print '';
- if ($obj->socid)
- {
+ if ($obj->socid) {
print $socstatic->getNomUrl(1);
} else {
print ' ';
@@ -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 ' | ';
- 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");
|