diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 50f8d1f9679..3eb96cf7e6f 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1102,9 +1102,9 @@ class Form
if (count($scrit) > 1) $sql.=")";
if (! empty($conf->barcode->enabled))
{
- $sql .= " OR s.barcode LIKE '".$this->db->escape($filterkey)."%'";
- }
- $sql.= " OR s.code_client LIKE '".$this->db->escape($prefix.$filterkey)."%' OR s.code_fournisseur LIKE '".$this->db->escape($prefix.$filterkey)."%'";
+ $sql .= " OR s.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'";
+ }
+ $sql.= " OR s.code_client LIKE '".$this->db->escape($prefix.$filterkey)."%' OR s.code_fournisseur LIKE '".$this->db->escape($prefix.$filterkey)."%'";
$sql.=")";
}
$sql.=$this->db->order("nom","ASC");