Ajout de la permission "consulter tous les clients" dans le module commercial, afin
qu'un commercial puisse voir que les clients qui lui sont affectés.
This commit is contained in:
parent
19a5f266a3
commit
5227ec9b22
@ -174,7 +174,18 @@ if($_GET["socid"])
|
|||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
if (!$user->rights->commercial->client->voir)
|
||||||
|
{
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
|
||||||
|
print img_object($langs->trans("ShowUser"),"user").' ';
|
||||||
|
print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n";
|
||||||
|
print '</a><br>';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
|
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
|
||||||
print img_object($langs->trans("ShowUser"),"user").' ';
|
print img_object($langs->trans("ShowUser"),"user").' ';
|
||||||
print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n";
|
print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n";
|
||||||
@ -183,6 +194,7 @@ if($_GET["socid"])
|
|||||||
print img_delete();
|
print img_delete();
|
||||||
print '</a><br>';
|
print '</a><br>';
|
||||||
$i++;
|
$i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
@ -193,15 +205,14 @@ if($_GET["socid"])
|
|||||||
}
|
}
|
||||||
if($i == 0) { print $langs->trans("NoSalesRepresentativeAffected"); }
|
if($i == 0) { print $langs->trans("NoSalesRepresentativeAffected"); }
|
||||||
|
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($user->rights->societe->creer)
|
if ($user->rights->societe->creer && !$user->rights->commercial->client->voir)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Liste
|
* Liste
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user