diff --git a/htdocs/telephonie/stats/commerciaux/commercialca.php b/htdocs/telephonie/stats/commerciaux/commercialca.php index 6f4b0cf3a11..cb9092ef200 100644 --- a/htdocs/telephonie/stats/commerciaux/commercialca.php +++ b/htdocs/telephonie/stats/commerciaux/commercialca.php @@ -64,6 +64,33 @@ if ($_GET["commid"]) print ''; + print ''; + print ''; + print ''; + + $sql = "SELECT legend, valeur"; + $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_stats"; + $sql .= " WHERE graph = 'commercial.gain.mensuel.".$_GET["commid"]."'"; + $sql .= " AND legend like '".$year."%'"; + $sql .= " ORDER BY legend ASC;"; + $resql = $db->query($sql); + + if ($resql) + { + while ($row = $db->fetch_row($resql)) + { + $var=!$var; + print "'; + print ''; + } + $db->free($resql); + } + else + { + print $db->error() . ' ' . $sql; + } + print '
MoisGain
".$row[0].''.price($row[1]).'
'; + print ''; print 'Chiffre d\'affaire mensuel

'."\n";