Fix param to avoid to create holiday or expense report in wrong entity.
This commit is contained in:
parent
97976fbb43
commit
d9fc1e0b5d
@ -1360,7 +1360,7 @@ if ($action == 'create')
|
||||
if (GETPOST('fk_user_author', 'int') > 0) $defaultselectuser=GETPOST('fk_user_author', 'int');
|
||||
$include_users = 'hierarchyme';
|
||||
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expensereport->writeall_advance)) $include_users=array();
|
||||
$s=$form->select_dolusers($defaultselectuser, "fk_user_author", 0, "", 0, $include_users);
|
||||
$s=$form->select_dolusers($defaultselectuser, "fk_user_author", 0, "", 0, $include_users, '', '0,'.$conf->entity);
|
||||
print $s;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -868,12 +868,13 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
|
||||
print '<tr>';
|
||||
print '<td class="titlefield fieldrequired">'.$langs->trans("User").'</td>';
|
||||
print '<td>';
|
||||
|
||||
if (empty($user->rights->holiday->write_all))
|
||||
{
|
||||
print $form->select_dolusers(($fuserid?$fuserid:$user->id), 'fuserid', 0, '', 0, 'hierarchyme', '', 0, 0, 0, $morefilter, 0, '', 'maxwidth300');
|
||||
print $form->select_dolusers(($fuserid?$fuserid:$user->id), 'fuserid', 0, '', 0, 'hierarchyme', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300');
|
||||
//print '<input type="hidden" name="fuserid" value="'.($fuserid?$fuserid:$user->id).'">';
|
||||
}
|
||||
else print $form->select_dolusers(GETPOST('fuserid','int')?GETPOST('fuserid','int'):$user->id, 'fuserid', 0, '', 0, '', '', 0, 0, 0, $morefilter, 0, '', 'maxwidth300');
|
||||
else print $form->select_dolusers(GETPOST('fuserid','int')?GETPOST('fuserid','int'):$user->id, 'fuserid', 0, '', 0, '', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user