diff --git a/htdocs/comm/clients.php b/htdocs/comm/clients.php index a2656a3f348..f0659effd75 100644 --- a/htdocs/comm/clients.php +++ b/htdocs/comm/clients.php @@ -42,7 +42,7 @@ $pageprev = $_GET["page"] - 1; $pagenext = $_GET["page"] + 1; -$sql = "SELECT s.idp, s.nom, s.ville, ".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, st.libelle as stcomm, s.prefix_comm "; +$sql = "SELECT s.idp, s.nom, s.ville, ".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, st.libelle as stcomm, s.prefix_comm, s.code_client "; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st "; $sql .= " WHERE s.fk_stcomm = st.id AND s.client=1"; @@ -56,6 +56,11 @@ if ($_GET["search_nom"]) $sql .= " AND s.nom like '%".strtolower($_GET["search_nom"])."%'"; } +if ($_GET["search_code"]) +{ + $sql .= " AND s.code_client like '%".strtolower($_GET["search_code"])."%'"; +} + if ($user->societe_id) { $sql .= " AND s.idp = " .$user->societe_id; @@ -94,7 +99,8 @@ if ($result) $addu = "&page=$page&begin=$begin&search_nom=".$_GET["search_nom"]; print '
| '; print ''; - print " | "; + print ' | '; + print ''; + print ' | '; print " | "; print "'; print img_file(); print " idp\">$obj->nom | \n"; + print "".$obj->code_client." | \n"; print "".$obj->ville." | \n"; print "\n"; $i++;