';
$sql = "SELECT date_format(f.date,'%Y%m'), sum(f.cout_vente)";
-$sql .= ", c.name, c.firstname";
+$sql .= ", c.name, c.firstname, c.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_facture as f";
$sql .= " , ".MAIN_DB_PREFIX."telephonie_societe_ligne as l";
$sql .= " , ".MAIN_DB_PREFIX."user as c";
@@ -67,7 +67,7 @@ $sql .= " GROUP BY date_format(f.date,'%Y%m') DESC, c.rowid DESC";
print '';
-print '| Nom | Nb Lignes | | ';
+print '| Nom | Date | | ';
$resql = $db->query($sql);
if ($resql)
@@ -86,7 +86,7 @@ if ($resql)
print "";
print '| ';
- print ''.$row[3]." ". $row[2].' | '.$row[0].' | ';
print ''.price($row[1]).' | ';
$total += $row[1];
diff --git a/htdocs/telephonie/stats/commerciaux/commercial.ca.class.php b/htdocs/telephonie/stats/commerciaux/commercial.ca.class.php
index a3f7190c54e..1eedf789eb3 100644
--- a/htdocs/telephonie/stats/commerciaux/commercial.ca.class.php
+++ b/htdocs/telephonie/stats/commerciaux/commercial.ca.class.php
@@ -46,7 +46,7 @@ class GraphCommercialChiffreAffaire extends GraphBar {
if ($commercial > 0)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."telephonie_stats";
- $sql .= " WHERE graph='commercial.ca.mensuel.".$commercial."';";
+ $sql .= " WHERE graph='commercial.ca.mensuel.".$commercial."'";
if ($this->year > 0)
{
$sql .= " AND legend like '".$this->year."%'";
diff --git a/htdocs/telephonie/stats/commerciaux/commercial.gain.class.php b/htdocs/telephonie/stats/commerciaux/commercial.gain.class.php
index 3a477313188..cdd412447ad 100644
--- a/htdocs/telephonie/stats/commerciaux/commercial.gain.class.php
+++ b/htdocs/telephonie/stats/commerciaux/commercial.gain.class.php
@@ -30,10 +30,10 @@ class GraphCommercialGain extends GraphBar {
$this->file = $file;
$this->year = $year;
$this->client = 0;
- $this->titre = "Gain mensuel";
+ $this->titre = "Marge mensuelle";
if ($this->year > 0)
{
- $this->titre = "Gain mensuel ".$this->year;
+ $this->titre .= " ".$this->year;
}
$this->barcolor = "pink";
$this->showframe = true;
|