FIX - Don't display inactive users in birthday box and soc card
This commit is contained in:
parent
6bb598498e
commit
047785b273
@ -89,7 +89,8 @@ class box_birthdays extends ModeleBoxes
|
|||||||
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth";
|
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql.= " WHERE u.entity IN (".getEntity('user').")";
|
$sql.= " WHERE u.entity IN (".getEntity('user').")";
|
||||||
$sql.= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
|
$sql.= " AND u.statut = 1";
|
||||||
|
$sql.= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
|
||||||
$sql.= " ORDER BY u.birth ASC";
|
$sql.= " ORDER BY u.birth ASC";
|
||||||
$sql.= $this->db->plimit($max, 0);
|
$sql.= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -1570,7 +1570,7 @@ else
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).'</td>';
|
print '<td>'.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).'</td>';
|
||||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
print '<td colspan="3" class="maxwidthonsmartphone">';
|
||||||
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1);
|
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, 'AND u.statut = 1', 0, '', '', 0, 1);
|
||||||
// Note: If user has no right to "see all thirdparties", we force selection of sale representative to him, so after creation he can see the record.
|
// Note: If user has no right to "see all thirdparties", we force 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) ? array($user->id) : array())));
|
||||||
print $form->multiselectarray('commercial', $userlist, $selected, null, null, null, null, "90%");
|
print $form->multiselectarray('commercial', $userlist, $selected, null, null, null, null, "90%");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user