diff --git a/htdocs/core/boxes/box_birthdays.php b/htdocs/core/boxes/box_birthdays.php
index 2df1f0d331e..4f7eb6890b4 100644
--- a/htdocs/core/boxes/box_birthdays.php
+++ b/htdocs/core/boxes/box_birthdays.php
@@ -89,7 +89,8 @@ class box_birthdays extends ModeleBoxes
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$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.= $this->db->plimit($max, 0);
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index ee252677bf2..022727f7003 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -1570,7 +1570,7 @@ else
print '
';
print '| '.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).' | ';
print '';
- $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.
$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%");
@@ -2252,7 +2252,7 @@ else
print ' |
';
print '| '.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).' | ';
print '';
- $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);
$arrayselected = GETPOST('commercial', 'array');
if (empty($arrayselected)) $arrayselected = $object->getSalesRepresentatives($user, 1);
print $form->multiselectarray('commercial', $userlist, $arrayselected, null, null, null, null, "90%");
|