|
@@ -84,7 +84,7 @@ $arrayfields=array(
|
|
|
'u.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
|
|
|
'u.firstname'=>array('label'=>$langs->trans("Firstname"), 'checked'=>1),
|
|
|
'u.gender'=>array('label'=>$langs->trans("Gender"), 'checked'=>0),
|
|
|
- 'u.employee'=>array('label'=>$langs->trans("Employee"), 'checked'=>0),
|
|
|
+ 'u.employee'=>array('label'=>$langs->trans("Employee"), 'checked'=>($mode=='employee'?1:0)),
|
|
|
'u.accountancy_code'=>array('label'=>$langs->trans("AccountancyCode"), 'checked'=>0),
|
|
|
'u.email'=>array('label'=>$langs->trans("EMail"), 'checked'=>1),
|
|
|
'u.fk_soc'=>array('label'=>$langs->trans("Company"), 'checked'=>1),
|
|
@@ -123,6 +123,7 @@ $optioncss = GETPOST('optioncss','alpha');
|
|
|
|
|
|
// Default search
|
|
|
if ($search_statut == '') $search_statut='1';
|
|
|
+if ($mode == 'employee') $search_employee=1;
|
|
|
|
|
|
|
|
|
|
|
@@ -192,7 +193,6 @@ else
|
|
|
{
|
|
|
$sql.= " WHERE u.entity IN (".getEntity('user',1).")";
|
|
|
}
|
|
|
-if ($mode == "employee") $sql.= " AND u.employee = 1";
|
|
|
if ($socid > 0) $sql.= " AND u.fk_soc = ".$socid;
|
|
|
//if ($search_user != '') $sql.=natural_search(array('u.login', 'u.lastname', 'u.firstname'), $search_user);
|
|
|
if ($search_supervisor > 0) $sql.= " AND u.fk_user = ".$search_supervisor;
|