diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index a165f1db47d..946fbe62810 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -620,13 +620,24 @@ class Form ?>
- + + + + + @@ -644,7 +655,7 @@ class Form * \param filtretype Pour filtre sur type de produit * \param limit Limite sur le nombre de lignes retournées */ - function select_produits_do($selected='',$htmlname='productid',$filtretype='',$limit=20,$price_level=0,$ajaxkey='') + function select_produits_do($selected='',$htmlname='productid',$filtretype='',$limit=20,$price_level=0,$ajaxkeyref='',$ajaxkeylabel='') { global $langs,$conf,$user; @@ -661,7 +672,8 @@ class Form $sql.= ' AND IFNULL(c.visible,1)=1'; } if ($filtretype && $filtretype != '') $sql.=" AND p.fk_product_type=".$filtretype; - if ($ajaxkey && $ajaxkey != '') $sql.=" AND p.label like '%".$ajaxkey."%'"; + if ($ajaxkeyref && $ajaxkeyref != '') $sql.=" AND p.label like '%".$ajaxkeyref."%'"; + if ($ajaxkeylabel && $ajaxkeylabel != '') $sql.=" AND p.label like '%".$ajaxkeylabel."%'"; $sql.= " ORDER BY p.nbvente DESC"; if ($limit) $sql.= " LIMIT $limit";