FIX Stats on invoices show nothing
This commit is contained in:
parent
5998f60764
commit
81e7f45200
@ -39,7 +39,7 @@ class FactureStats extends Stats
|
||||
var $from;
|
||||
var $field;
|
||||
var $where;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -56,8 +56,8 @@ class FactureStats extends Stats
|
||||
$this->db = $db;
|
||||
$this->socid = ($socid > 0 ? $socid : 0);
|
||||
$this->userid = $userid;
|
||||
$this->cachefilesuffix = $mode;
|
||||
|
||||
$this->cachefilesuffix = $mode;
|
||||
|
||||
if ($mode == 'customer')
|
||||
{
|
||||
$object=new Facture($this->db);
|
||||
@ -195,7 +195,7 @@ class FactureStats extends Stats
|
||||
|
||||
return $this->_getAllByYear($sql);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return nb, amount of predefined product for year
|
||||
*
|
||||
@ -218,7 +218,7 @@ class FactureStats extends Stats
|
||||
|
||||
return $this->_getAllByProduct($sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ dol_mkdir($dir);
|
||||
$stats = new FactureStats($db, $socid, $mode, ($userid>0?$userid:0));
|
||||
if ($mode == 'customer')
|
||||
{
|
||||
if ($object_status != '' && $object_status >= -1) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
|
||||
if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
|
||||
}
|
||||
if ($mode == 'supplier')
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user