This commit is contained in:
Ferran Marcet 2018-09-20 17:52:44 +02:00
parent e0dfab4c71
commit 4597cd44e5

View File

@ -535,12 +535,13 @@ if (empty($reshook))
}
// Links with users
$salesreps = GETPOST('commercial', 'array');
$result = $object->setSalesRep($salesreps);
if ($result < 0)
{
$error++;
setEventMessages($object->error, $object->errors, 'errors');
if (!empty($user->rights->societe->client->voir)) {
$salesreps = GETPOST('commercial', 'array');
$result = $object->setSalesRep($salesreps);
if ($result < 0) {
$error++;
setEventMessages($object->error, $object->errors, 'errors');
}
}
// Customer categories association