diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a24cb0cab40..f049f7ba800 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2663,7 +2663,7 @@ class Form if (count($scrit) > 1) $sql.=")"; if (! empty($conf->barcode->enabled)){ $sql.= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; - $sql.= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; + if (! empty($conf->global->BARCODE_USE_BARCODE_FOR_SUPPLIER_PRICES)) $sql.= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; } $sql.=')'; }