This commit is contained in:
Ferran Marcet 2018-09-21 10:14:23 +02:00
parent 4597cd44e5
commit 1a7b38f22a

View File

@ -535,13 +535,12 @@ if (empty($reshook))
} }
// Links with users // Links with users
if (!empty($user->rights->societe->client->voir)) { $salesreps = GETPOST('commercial', 'array');
$salesreps = GETPOST('commercial', 'array'); $result = $object->setSalesRep($salesreps);
$result = $object->setSalesRep($salesreps); if ($result < 0)
if ($result < 0) { {
$error++; $error++;
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
}
} }
// Customer categories association // Customer categories association
@ -1378,16 +1377,13 @@ else
print '</tr>'; print '</tr>';
} }
if ($user->rights->societe->client->voir) // Assign a Name
{ print '<tr>';
// Assign a Name print '<td>'.fieldLabel('AllocateCommercial','commercial_id').'</td>';
print '<tr>'; print '<td colspan="3" class="maxwidthonsmartphone">';
print '<td>'.fieldLabel('AllocateCommercial','commercial_id').'</td>'; $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1);
print '<td colspan="3" class="maxwidthonsmartphone">'; print $form->multiselectarray('commercial', $userlist, (count(GETPOST('commercial', 'array')) > 0?GETPOST('commercial', 'array'):array($user->id)), null, null, null, null, "90%");
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1); print '</td></tr>';
print $form->multiselectarray('commercial', $userlist, GETPOST('commercial', 'array'), null, null, null, null, "90%");
print '</td></tr>';
}
// Incoterms // Incoterms
if (!empty($conf->incoterm->enabled)) if (!empty($conf->incoterm->enabled))