diff --git a/htdocs/telephonie/stats/commerciaux/commercialca.php b/htdocs/telephonie/stats/commerciaux/commercialca.php index b454eabb513..62061974b0e 100644 --- a/htdocs/telephonie/stats/commerciaux/commercialca.php +++ b/htdocs/telephonie/stats/commerciaux/commercialca.php @@ -26,12 +26,8 @@ if (!$user->rights->telephonie->lire) accessforbidden(); llxHeader('','Telephonie - Statistiques - Commerciaux'); /* - * - * * */ - - $h = 0; $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/commerciaux/index.php'; @@ -60,13 +56,45 @@ if ($_GET["commid"]) print ''; - print ''; print '
'; - + print '
'; print 'Gain mensuel

'."\n"; + print '
'; + + print '
'; + print 'Chiffre d\'affaire mensuel

'."\n"; + print '
'; + + print ''; + print ''; + print ''; + + $sql = "SELECT legend, valeur"; + $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_stats"; + $sql .= " WHERE graph = 'commercial.ca.mensuel.".$_GET["commid"]."'"; + $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 '
MoisCA
".$row[0].''.price($row[1]).'
'; + + print '
';