Skip to content

Commit

Permalink
FIX #9432
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarcet committed Sep 21, 2018
1 parent 4597cd4 commit 1a7b38f
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions htdocs/societe/card.php
Expand Up @@ -535,13 +535,12 @@
}

// Links with users
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');
}
$salesreps = GETPOST('commercial', 'array');
$result = $object->setSalesRep($salesreps);
if ($result < 0)
{
$error++;
setEventMessages($object->error, $object->errors, 'errors');
}

// Customer categories association
Expand Down Expand Up @@ -1378,16 +1377,13 @@
print '</tr>';
}

if ($user->rights->societe->client->voir)
{
// Assign a Name
print '<tr>';
print '<td>'.fieldLabel('AllocateCommercial','commercial_id').'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1);
print $form->multiselectarray('commercial', $userlist, GETPOST('commercial', 'array'), null, null, null, null, "90%");
print '</td></tr>';
}
// Assign a Name
print '<tr>';
print '<td>'.fieldLabel('AllocateCommercial','commercial_id').'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1);
print $form->multiselectarray('commercial', $userlist, (count(GETPOST('commercial', 'array')) > 0?GETPOST('commercial', 'array'):array($user->id)), null, null, null, null, "90%");
print '</td></tr>';

// Incoterms
if (!empty($conf->incoterm->enabled))
Expand Down

0 comments on commit 1a7b38f

Please sign in to comment.