Skip to content
Snippets Groups Projects
Commit ff597a89 authored by Florian Henry's avatar Florian Henry
Browse files

add filter to effectif select

parent 2b7c2a90
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