mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
@@ -1307,9 +1307,8 @@ class Form
|
||||
}
|
||||
if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$filtertype;
|
||||
// Add criteria on ref/label
|
||||
if ($filterkey && $filterkey != '')
|
||||
if ($filterkey != '')
|
||||
{
|
||||
$sql.=" AND (";
|
||||
if (! empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE)) // Can use index
|
||||
{
|
||||
$sql.=" AND (p.ref LIKE '".$filterkey."%' OR p.label LIKE '".$filterkey."%'";
|
||||
@@ -1331,7 +1330,6 @@ class Form
|
||||
{
|
||||
$sql .= " OR p.barcode LIKE '".$filterkey."'";
|
||||
}
|
||||
$sql.=")";
|
||||
}
|
||||
$sql.= $db->order("p.ref");
|
||||
$sql.= $db->plimit($limit);
|
||||
|
||||
@@ -157,11 +157,11 @@ else
|
||||
$form = new Form($db);
|
||||
if (empty($mode) || $mode == 1)
|
||||
{
|
||||
$arrayresult=$form->select_produits_do("",$htmlname,$type,"",$price_level,$searchkey,$status,2,$outjson);
|
||||
$arrayresult=$form->select_produits_list("",$htmlname,$type,"",$price_level,$searchkey,$status,2,$outjson);
|
||||
}
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
$arrayresult=$form->select_produits_fournisseurs_do($socid,"",$htmlname,$type,"",$searchkey,$status,$outjson);
|
||||
$arrayresult=$form->select_produits_fournisseurs_list($socid,"",$htmlname,$type,"",$searchkey,$status,$outjson);
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
Reference in New Issue
Block a user