Fix search company by code

This commit is contained in:
atm-ph 2018-08-31 11:38:45 +02:00
parent 46fe19bed5
commit 102b698c76

View File

@ -1103,7 +1103,8 @@ class Form
if (! empty($conf->barcode->enabled)) if (! empty($conf->barcode->enabled))
{ {
$sql .= " OR s.barcode LIKE '".$this->db->escape($filterkey)."%'"; $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.=")"; $sql.=")";
} }
$sql.=$this->db->order("nom","ASC"); $sql.=$this->db->order("nom","ASC");