Skip to content

Commit

Permalink
Fix search on product ref
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 8, 2016
1 parent 6d9bec9 commit 881eca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/societe/consumption.php
Expand Up @@ -306,7 +306,7 @@
$sql.= " AND ".$dateprint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'";
}
if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$sref."%'";
if ($sprod_fulldescr) $sql.= " AND (d.description LIKE '%".$sprod_fulldescr."%' OR p.label LIKE '%".$sprod_fulldescr."%')";
if ($sprod_fulldescr) $sql.= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%' OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%' OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%')";
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit + 1, $offset);
//print $sql;
Expand Down

0 comments on commit 881eca9

Please sign in to comment.