diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index a0be64639da..83507b091b3 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -62,6 +62,40 @@ if ($conf->propal->enabled) print ""; print 'Num. : '; print "
\n"; +} + +/* + * + * + */ + +$sql = "SELECT count(*) as cc, st.libelle"; +$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=2 GROUP BY st.libelle"; + +if ( $db->query($sql) ) +{ + $num = $db->num_rows(); + $i = 0; + if ($num > 0 ) + { + print ''; + print ''; + print ''; + while ($i < $num) + { + $obj = $db->fetch_object( $i); + $var=!$var; + print ""; + $i++; + } + print "
Prospects par statut
rowid."\">".$obj->libelle."".$obj->cc."

"; + } +} + + +if ($conf->propal->enabled) +{ $sql = "SELECT p.rowid, p.ref"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; @@ -88,7 +122,6 @@ if ($conf->propal->enabled) } } } - /* * Actions commerciales a faire *