diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 4f7cd4a07b2..75d63142733 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -174,7 +174,18 @@ if($_GET["socid"]) while ($i < $num) { - $obj = $db->fetch_object($resql); + $obj = $db->fetch_object($resql); + + if (!$user->rights->commercial->client->voir) + { + print ''; + print img_object($langs->trans("ShowUser"),"user").' '; + print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n"; + print '
'; + $i++; + } + else + { print ''; print img_object($langs->trans("ShowUser"),"user").' '; print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n"; @@ -183,6 +194,7 @@ if($_GET["socid"]) print img_delete(); print '
'; $i++; + } } $db->free($resql); @@ -193,15 +205,14 @@ if($_GET["socid"]) } if($i == 0) { print $langs->trans("NoSalesRepresentativeAffected"); } - print ""; - + print ""; print ''; print "\n"; - if ($user->rights->societe->creer) + if ($user->rights->societe->creer && !$user->rights->commercial->client->voir) { /* * Liste