From 02061a776b0100e31e63da7872fa3479a62de87d Mon Sep 17 00:00:00 2001 From: FLIO Date: Wed, 7 Dec 2022 14:30:13 +0100 Subject: [PATCH 1/2] fix(scrutinizer) --- htdocs/reception/stats/month.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); From ec6a4a300149f45d2e62c2c47d8c875d03f09011 Mon Sep 17 00:00:00 2001 From: FLIO Date: Wed, 7 Dec 2022 17:53:06 +0100 Subject: [PATCH 2/2] Fix(scrutinizer) add userid and socid --- htdocs/reception/stats/month.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/reception/stats/month.php b/htdocs/reception/stats/month.php index 86054275d9c..0b371ecd1f5 100644 --- a/htdocs/reception/stats/month.php +++ b/htdocs/reception/stats/month.php @@ -29,6 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/reception/class/receptionstats.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $year = GETPOST("year", 'int'); +$socid = GETPOST("socid", 'int'); +$userid = GETPOST("userid", 'int'); // Security check if ($user->socid) {