Skip to content
Snippets Groups Projects
Commit 82d57c20 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #1542 from FHenry/develop

add filter to effectif select
parents 1f4e6d69 ff597a89
No related branches found
No related tags found
No related merge requests found
......@@ -92,15 +92,17 @@ class FormCompany
* Renvoie la liste des types d'effectifs possibles (pas de traduction car nombre)
*
* @param int $mode 0=renvoi id+libelle, 1=renvoi code+libelle
* @param string $filter Add a SQL filter to select
* @return array Array of types d'effectifs
*/
function effectif_array($mode=0)
function effectif_array($mode=0, $filter='')
{
$effs = array();
$sql = "SELECT id, code, libelle";
$sql .= " FROM ".MAIN_DB_PREFIX."c_effectif";
$sql.= " WHERE active = 1";
if ($filter) $sql.=" ".$filter;
$sql .= " ORDER BY id ASC";
dol_syslog(get_class($this).'::effectif_array sql='.$sql,LOG_DEBUG);
$resql=$this->db->query($sql);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment