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
@ -175,6 +175,17 @@ 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";
|
||||||
@ -184,6 +195,7 @@ if($_GET["socid"])
|
|||||||
print '</a><br>';
|
print '</a><br>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
@ -195,13 +207,12 @@ if($_GET["socid"])
|
|||||||
|
|
||||||
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