Skip to content
Snippets Groups Projects
Commit ecfca853 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Search on contract ref

parent 22447cd0
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ $sql.= " AND c.entity = ".$conf->entity;
if ($socid) $sql.= " AND s.rowid = ".$socid;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape($search_nom)."%'";
if ($search_contract) $sql.= " AND c.rowid = '".$db->escape($search_contract)."'";
if ($search_contract) $sql.= " AND (".(is_numeric($search_contract)?"c.rowid = '".$db->escape($search_contract)."' OR ":'')." c.ref = '".$db->escape($search_contract)."')";
if ($sall) $sql.= " AND (s.nom LIKE '%".$db->escape($sall)."%' OR cd.label LIKE '%".$db->escape($sall)."%' OR cd.description LIKE '%".$db->escape($sall)."%')";
$sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut,";
$sql.= " s.nom, s.rowid";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment