Skip to content
Snippets Groups Projects
Commit eab6fd7f authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: La couleur de fond des graphs n'etait pas prise depuis le theme.

parent 0812a19c
No related branches found
No related tags found
No related merge requests found
......@@ -49,23 +49,23 @@ class Stats
* \brief Renvoie le nombre de proposition par mois pour une anne donne
*
*/
function _getNbByMonth($year, $sql)
{
$result = array();
if ($this->db->query($sql))
$resql=$this->db->query($sql);
if ($resql)
{
$num = $this->db->num_rows();
$num = $this->db->num_rows($resql);
$i = 0;
while ($i < $num)
{
$row = $this->db->fetch_row($i);
$row = $this->db->fetch_row($resql);
$j = $row[0] * 1;
$result[$j] = $row[1];
$i++;
}
$this->db->free();
$this->db->free($resql);
}
for ($i = 1 ; $i < 13 ; $i++)
......@@ -77,7 +77,7 @@ class Stats
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
$data[$i-1] = array(ucfirst(substr(strftime("%b",mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
}
return $data;
......@@ -88,7 +88,6 @@ class Stats
* \brief Renvoie le nombre d'element par anne
*
*/
function _getNbByYear($sql)
{
$result = array();
......@@ -101,13 +100,16 @@ class Stats
{
$row = $this->db->fetch_row($i);
$result[$i] = $row;
$i++;
}
$this->db->free();
}
else {
dolibarr_print_error($this->db);
}
return $result;
}
/**
* \brief Renvoie le nombre d'element par mois pour une anne donne
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment