From 5e4c565aa2bd1a3bf40c676090c514b741cd5e0c Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 10 Feb 2005 14:35:23 +0000 Subject: [PATCH] Ajout affichage du SIREN --- htdocs/societe.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/htdocs/societe.php b/htdocs/societe.php index b53b9f3bbf7..f95d3594b26 100644 --- a/htdocs/societe.php +++ b/htdocs/societe.php @@ -118,7 +118,10 @@ if ($_POST["button_removefilter"] == $langs->trans("RemoveFilter")) { $title=$langs->trans("ListOfCompanies"); $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.client, s.fournisseur"; -$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st WHERE s.fk_stcomm = st.id"; +$sql .= ", s.siren"; +$sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; +$sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st"; +$sql .= " WHERE s.fk_stcomm = st.id"; if ($user->societe_id > 0) { @@ -142,6 +145,10 @@ if ($search_ville) { $sql .= " AND s.ville LIKE '%".$search_ville."%'"; } +if ($_POST["search_siren"]) { + $sql .= " AND s.siren LIKE '%".$_POST["search_siren"]."%'"; +} + $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset); $result = $db->query($sql); @@ -158,7 +165,10 @@ if ($result) print ''; print ''; print_liste_field_titre($langs->trans("Company"),"societe.php","s.nom", $params,"&search_nom=$search_nom&search_ville=$search_ville","",$sortfield); - print_liste_field_titre($langs->trans("Town"),"societe.php","s.ville",$params,"&search_nom=$search_nom&search_ville=$search_ville",'width="25%"',$sortfield); + print_liste_field_titre($langs->trans("Town"),"societe.php","s.ville",$params,"&search_nom=$search_nom&search_ville=$search_ville",'',$sortfield); + + print_liste_field_titre($langs->trans("SIREN"),"societe.php","s.siren",$params,"&search_nom=$search_nom&search_ville=$search_ville",'',$sortfield); + print ''; print "\n"; @@ -169,9 +179,12 @@ if ($result) print ''; print ''; - print '\n"; print "\n"; + print "\n"; print '
 
'; print ''; - print ''; + print ''; print ''; + print ''; + print ''; + + print ''; print ''; print '  '; @@ -190,6 +203,7 @@ if ($result) print img_object($langs->trans("ShowCompany"),"company"); print " idp\">".stripslashes($obj->nom)."".$obj->ville." ".$obj->siren." '; if ($obj->client==1) {