From 5227ec9b2272e674645df2cc2d44d95e99ddca51 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 13 Mar 2006 18:34:10 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20permission=20"consulter=20tou?= =?UTF-8?q?s=20les=20clients"=20dans=20le=20module=20commercial,=20afin=20?= =?UTF-8?q?=20qu'un=20commercial=20puisse=20voir=20que=20les=20clients=20q?= =?UTF-8?q?ui=20lui=20sont=20affect=E9s.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/societe/commerciaux.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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