diff --git a/htdocs/reception/stats/month.php b/htdocs/reception/stats/month.php index 019cafce8c6..86054275d9c 100644 --- a/htdocs/reception/stats/month.php +++ b/htdocs/reception/stats/month.php @@ -49,9 +49,8 @@ $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $mesg = ''; print load_fiche_titre($langs->trans("StatisticsOfReceptions").' '.GETPOST("year", 'int'), $mesg); - -$stats = new ReceptionStats($db); -$data = $stats->getNbReceptionByMonth(GETPOST("year", 'int')); +$stats = new ReceptionStats($db, $socid, '', ($userid > 0 ? $userid : 0)); +$data = $stats->getNbByMonth($year); dol_mkdir($conf->reception->dir_temp);