From 849ec0f77b8aaa7b88d360c625a221ac5d836465 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 10 Mar 2005 15:05:05 +0000 Subject: [PATCH] Ajout graph de statut des lignes --- .../script/graph-statistiques-commerciaux.php | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/htdocs/telephonie/script/graph-statistiques-commerciaux.php b/htdocs/telephonie/script/graph-statistiques-commerciaux.php index 0a106527357..a8827564070 100644 --- a/htdocs/telephonie/script/graph-statistiques-commerciaux.php +++ b/htdocs/telephonie/script/graph-statistiques-commerciaux.php @@ -68,13 +68,8 @@ if (is_array($dirs)) } } } -/***********************************************************************/ -/* -/* Chiffre d'affaire mensuel -/* -/***********************************************************************/ -$sql = "SELECT distinct fk_commercial"; +$sql = "SELECT distinct fk_commercial_sign"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne"; $result = $db->query($sql); @@ -87,11 +82,29 @@ if ($result) { $row = $db->fetch_row(); + /*********************************************************************** + * + * Chiffre d'affaire mensuel + * + ***********************************************************************/ + + $file = $img_root . "commercials/".$row[0]."/ca.mensuel.png"; - print "Graph : Lignes commandes$file\n"; + if ($verbose) print "Graph : Lignes commandes$file\n"; $graph = new GraphCommercialChiffreAffaire($db, $file); $graph->width = 400; $graph->GraphMakeGraph($row[0]); + + /* + * Statut des lignes + * + */ + require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/lignes/statut.class.php"); + + $file = $img_root . "commercials/".$row[0]."/lignes.statut.png"; + if ($verbose) print "Graph : Lignes statut $file\n"; + $graph = new GraphLignesStatut($db, $file); + $graph->GraphMakeGraph($row[0]); $i++; }