From d7fdcc83bb3ec0299fd1f7bb51e19abbc78ae7bd Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Tue, 12 Jan 2016 22:03:19 +0100
Subject: [PATCH] Fix missing search criteria

---
 htdocs/product/list.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index d82adceb1a4..97283b4b2bc 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -230,7 +230,8 @@ else
     	else $sql.= " AND p.fk_product_type <> '1'";
     }
 	if ($sref)     $sql .= natural_search('p.ref', $sref);
-    if ($sbarcode) $sql .= natural_search('p.barcode', $sbarcode);
+	if ($snom)     $sql .= natural_search('p.label', $snom);
+	if ($sbarcode) $sql .= natural_search('p.barcode', $sbarcode);
     if (isset($tosell) && dol_strlen($tosell) > 0  && $tosell!=-1) $sql.= " AND p.tosell = ".$db->escape($tosell);
     if (isset($tobuy) && dol_strlen($tobuy) > 0  && $tobuy!=-1)   $sql.= " AND p.tobuy = ".$db->escape($tobuy);
     if (dol_strlen($canvas) > 0)                    $sql.= " AND p.canvas = '".$db->escape($canvas)."'";
-- 
GitLab