Fix: Restore search anywhere with ajax

This commit is contained in:
Laurent Destailleur 2010-07-13 20:02:44 +00:00
parent 41ab0b845c
commit 13a6fcc4b5

View File

@ -910,7 +910,7 @@ class Form
}
if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$filtertype;
// Add criteria on ref/label
if (empty($conf->global->PRODUCT_SEARCH_ANYWHERE))
if (empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE))
{
if ($ajaxkeysearch && $ajaxkeysearch != '')
{
@ -1113,7 +1113,7 @@ class Form
if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$filtertype;
if (! empty($filtre)) $sql.=" ".$filtre;
// Add criteria on ref/label
if (empty($conf->global->PRODUCT_SEARCH_ANYWHERE))
if (empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE))
{
if ($ajaxkeysearch && $ajaxkeysearch != '') $sql.=" AND (pf.ref_fourn like '%".$ajaxkeysearch."%' OR p.ref like '%".$ajaxkeysearch."%' OR p.label like '%".$ajaxkeysearch."%')";
}