Fix: Stats must be on user of card not creator
This commit is contained in:
parent
d48fd7b232
commit
8f4c5eeb9e
@ -43,16 +43,16 @@ class DeplacementStats extends Stats
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param $DB Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param $socid Id third party
|
* @param int $socid Id third party
|
||||||
* @param $userid Id user for filter
|
* @param int $userid Id user for filter
|
||||||
* @return DeplacementStats
|
* @return void
|
||||||
*/
|
*/
|
||||||
function DeplacementStats($DB, $socid=0, $userid=0)
|
function DeplacementStats($db, $socid=0, $userid=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->db = $DB;
|
$this->db = $db;
|
||||||
$this->socid = $socid;
|
$this->socid = $socid;
|
||||||
$this->userid = $userid;
|
$this->userid = $userid;
|
||||||
|
|
||||||
@ -66,13 +66,14 @@ class DeplacementStats extends Stats
|
|||||||
{
|
{
|
||||||
$this->where.=" AND fk_soc = ".$this->socid;
|
$this->where.=" AND fk_soc = ".$this->socid;
|
||||||
}
|
}
|
||||||
if ($this->userid > 0) $this->where.=' AND fk_user_author = '.$this->userid;
|
if ($this->userid > 0) $this->where.=' AND fk_user = '.$this->userid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoie le nombre de facture par annee
|
* Renvoie le nombre de facture par annee
|
||||||
* \return array Array of values
|
*
|
||||||
|
* @return array Array of values
|
||||||
*/
|
*/
|
||||||
function getNbByYear()
|
function getNbByYear()
|
||||||
{
|
{
|
||||||
@ -86,9 +87,10 @@ class DeplacementStats extends Stats
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoie le nombre de facture par mois pour une annee donnee
|
* Renvoie le nombre de facture par mois pour une annee donnee
|
||||||
* \param year Year to scan
|
*
|
||||||
* \return array Array of values
|
* @param string $year Year to scan
|
||||||
|
* @return array Array of values
|
||||||
*/
|
*/
|
||||||
function getNbByMonth($year)
|
function getNbByMonth($year)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user