diff --git a/htdocs/telephonie/stats/distributeurs/distributeur.php b/htdocs/telephonie/stats/distributeurs/distributeur.php
index b1ca2a23108..b4347bd75c7 100644
--- a/htdocs/telephonie/stats/distributeurs/distributeur.php
+++ b/htdocs/telephonie/stats/distributeurs/distributeur.php
@@ -52,21 +52,57 @@ if ($_GET["id"])
dolibarr_fiche_head($head, $hselected, "Distributeur");
- print "Lignes commandées
";
-
print '
';
- print '| ';
+ print ' |
';
+ print '';
+ print '';
+ print '| Mois | Prise d\'ordre | ';
+
+ $sql = "SELECT sum(p.montant), date_format(datepo, '%m-%Y')";
+ $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat_priseordre as p";
+
+ $sql .= " WHERE p.fk_distributeur = ".$_GET["id"];
+ $sql .= " GROUP BY date_format(p.datepo, '%Y%m') DESC";
+
+ $resql = $db->query($sql);
+
+ if ($resql)
+ {
+ $num = $db->num_rows();
+ $i = 0;
+ $total = 0;
+
+ while ($i < $num)
+ {
+ $row = $db->fetch_row($i);
+
+ $var=!$var;
+
+ print "";
+
+ print '| '.$row[1].' | ';
+
+ print ''.price($row[0]).' | ';
+ $i++;
+ }
+ $db->free();
+ }
+ else
+ {
+ print $db->error() . ' ' . $sql;
+ }
+ print ' ';
- print ' | ';
+ print ' | ';
- print '
'."\n";
-
-
- print ' |
';
- print '
';
+ print '
'."\n";
+
+
+ print '';
+ print '';
$db->close();
}