Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX : hidden conf to keep old behaviour and allow preselect current u… #14074

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion htdocs/societe/card.php
Expand Up @@ -1513,7 +1513,7 @@ function init_supplier_categ() {
print '<td colspan="3" class="maxwidthonsmartphone">';
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1);
// Note: If user has no right to "see all thirdparties", we for selection of sale representative to him, so after creation he can see the record.
$selected = (count(GETPOST('commercial', 'array')) > 0 ? GETPOST('commercial', 'array') : (GETPOST('commercial', 'int') > 0 ? array(GETPOST('commercial', 'int')) : (empty($user->rights->societe->client->voir)?array($user->id):array())));
$selected = (count(GETPOST('commercial', 'array')) > 0 ? GETPOST('commercial', 'array') : (GETPOST('commercial', 'int') > 0 ? array(GETPOST('commercial', 'int')) : ((empty($user->rights->societe->client->voir) || !empty($conf->global->SOCIETE_KEEP_PRESELECT_CURRENT_USER_AS_SALESREP_ON_CREATE))?array($user->id):array())));
print $form->multiselectarray('commercial', $userlist, $selected, null, null, null, null, "90%");
print '</td></tr>';

Expand Down