From efcc3f40fa82d913de826edaca465ee7946dbff8 Mon Sep 17 00:00:00 2001 From: Julien BARRET Date: Sun, 29 Apr 2018 23:22:46 +0200 Subject: [PATCH] Fix link "refresh" on turnover report --- htdocs/compta/stats/index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index eb26015615c..ea2d6fa9c03 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -84,6 +84,12 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $userid=GETPOST('userid','int'); $socid = GETPOST('socid','int'); +$tmps=dol_getdate($date_start); +$year_start = $tmps['year']; +$tmpe=dol_getdate($date_end); +$year_end = $tmpe['year']; +$nbofyear = ($year_end - $year_start) + 1; + // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING') $modecompta = $conf->global->ACCOUNTING_MODE; if (! empty($conf->accounting->enabled)) $modecompta='BOOKKEEPING';