diff --git a/htdocs/comm/prospect/prospects.php b/htdocs/comm/prospect/prospects.php index 3a627207cdc..d0e74c50c52 100644 --- a/htdocs/comm/prospect/prospects.php +++ b/htdocs/comm/prospect/prospects.php @@ -43,7 +43,12 @@ $offset = $conf->liste_limit * $page ; $pageprev = $page - 1; $pagenext = $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 FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st WHERE s.fk_stcomm = st.id AND s.client=2"; +$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 .= ", d.nom as departement"; +$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st "; +$sql .= " , ".MAIN_DB_PREFIX."c_departements as d"; +$sql .= " WHERE s.fk_stcomm = st.id AND s.client=2"; +$sql .= " AND d.rowid = s.fk_departement"; if (strlen($stcomm)) { @@ -124,14 +129,18 @@ if ($result) { $sortorder="DESC"; } - print ''; + print '
'; print ''; print ""; - print ""; + print ""; print "\n"; $var=True; @@ -146,7 +155,8 @@ if ($result) print img_file(); print " idp\">$obj->nom\n"; print "\n"; - print "\n"; + print "\n"; + print "\n"; if ($user->societe_id == 0) { @@ -158,12 +168,11 @@ if ($result) { print "\n"; } - print "\n"; + } else { print "\n"; - print "\n"; } print "\n"; $i++;
"; print_liste_field_titre("Société",$PHP_SELF,"s.nom"); print ""; print_liste_field_titre("Ville",$PHP_SELF,"s.ville"); print "Préfix "; + print_liste_field_titre("Département",$PHP_SELF,"s.fk_departement"); + print ""; + print_liste_field_titre("Statut",$PHP_SELF,"s.fk_stcomm"); + print " 
".$obj->ville." $obj->prefix_comm $obj->departement".$obj->stcomm."