Bugfix
This commit is contained in:
parent
85f87034b3
commit
e304169d1a
@ -56,7 +56,7 @@ print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
|||||||
print '<tr><td width="30%" valign="top">';
|
print '<tr><td width="30%" valign="top">';
|
||||||
|
|
||||||
$sql = "SELECT date_format(f.date,'%Y%m'), sum(f.cout_vente)";
|
$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 .= " FROM ".MAIN_DB_PREFIX."telephonie_facture as f";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."telephonie_societe_ligne as l";
|
$sql .= " , ".MAIN_DB_PREFIX."telephonie_societe_ligne as l";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."user as c";
|
$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 '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
|
|
||||||
print '<tr class="liste_titre"><td width="50%" valign="top">Nom</td><td align="center">Nb Lignes</td><td> </td></tr>';
|
print '<tr class="liste_titre"><td width="50%" valign="top">Nom</td><td align="center">Date</td><td> </td></tr>';
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -86,7 +86,7 @@ if ($resql)
|
|||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
print '<td width="50%" valign="top">';
|
print '<td width="50%" valign="top">';
|
||||||
print '<a href="commercial.php?commid='.$row[3];
|
print '<a href="commercial.php?commid='.$row[4];
|
||||||
print '">'.$row[3]." ". $row[2].'</a></td><td align="center">'.$row[0].'</td>';
|
print '">'.$row[3]." ". $row[2].'</a></td><td align="center">'.$row[0].'</td>';
|
||||||
print '<td align="right">'.price($row[1]).'</td></tr>';
|
print '<td align="right">'.price($row[1]).'</td></tr>';
|
||||||
$total += $row[1];
|
$total += $row[1];
|
||||||
|
|||||||
@ -46,7 +46,7 @@ class GraphCommercialChiffreAffaire extends GraphBar {
|
|||||||
if ($commercial > 0)
|
if ($commercial > 0)
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."telephonie_stats";
|
$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)
|
if ($this->year > 0)
|
||||||
{
|
{
|
||||||
$sql .= " AND legend like '".$this->year."%'";
|
$sql .= " AND legend like '".$this->year."%'";
|
||||||
|
|||||||
@ -30,10 +30,10 @@ class GraphCommercialGain extends GraphBar {
|
|||||||
$this->file = $file;
|
$this->file = $file;
|
||||||
$this->year = $year;
|
$this->year = $year;
|
||||||
$this->client = 0;
|
$this->client = 0;
|
||||||
$this->titre = "Gain mensuel";
|
$this->titre = "Marge mensuelle";
|
||||||
if ($this->year > 0)
|
if ($this->year > 0)
|
||||||
{
|
{
|
||||||
$this->titre = "Gain mensuel ".$this->year;
|
$this->titre .= " ".$this->year;
|
||||||
}
|
}
|
||||||
$this->barcolor = "pink";
|
$this->barcolor = "pink";
|
||||||
$this->showframe = true;
|
$this->showframe = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user