Fix list must show only employee
This commit is contained in:
parent
891ebc0e7c
commit
a2b9dbfbe3
@ -220,6 +220,7 @@ if (!empty($search_name)) {
|
|||||||
$filters.=natural_search(array('u.firstname','u.lastname'), $search_name);
|
$filters.=natural_search(array('u.firstname','u.lastname'), $search_name);
|
||||||
}
|
}
|
||||||
if ($search_supervisor > 0) $filters.=natural_search(array('u.fk_user'), $search_supervisor, 2);
|
if ($search_supervisor > 0) $filters.=natural_search(array('u.fk_user'), $search_supervisor, 2);
|
||||||
|
$filters.= ' AND employee = 1'; // Only employee users are visible
|
||||||
|
|
||||||
$listUsers = $holiday->fetchUsers(false, true, $filters);
|
$listUsers = $holiday->fetchUsers(false, true, $filters);
|
||||||
if (is_numeric($listUsers) && $listUsers < 0)
|
if (is_numeric($listUsers) && $listUsers < 0)
|
||||||
@ -356,8 +357,10 @@ else
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
if ($canedit) print '<input type="text"'.($canedit?'':' disabled="disabled"').' class="maxwidthonsmartphone" value="" name="note_holiday['.$users['rowid'].']" size="30"/>';
|
if ($canedit) print '<input type="text"'.($canedit?'':' disabled="disabled"').' class="maxwidthonsmartphone" value="" name="note_holiday['.$users['rowid'].']" size="30"/>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// Button modify
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (! empty($user->rights->holiday->define_holiday))
|
if (! empty($user->rights->holiday->define_holiday)) // Allowed to set the balance of any user
|
||||||
{
|
{
|
||||||
print '<input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/>';
|
print '<input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user