From e528ac97a8cfaacd32cd5056784f5a2204cc5800 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Jan 2012 13:45:42 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20[=20bug=20#272=20]=20Impossible=20affich?= =?UTF-8?q?er=20Cr=C3=A9ances-Dettes=20sur=20p=C3=A9riode=20d'analyse=20ch?= =?UTF-8?q?oisie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/resultat/clientfourn.php | 4 ++-- htdocs/compta/resultat/index.php | 4 ++-- htdocs/compta/stats/index.php | 4 +++- htdocs/core/lib/report.lib.php | 17 +++++++++-------- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index f2347d2594f..b81a6444cc7 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -87,7 +87,7 @@ else // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') $modecompta = $conf->global->COMPTA_MODE; -if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"]; +if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta"); @@ -122,7 +122,7 @@ else { $builddate=time(); //$exportlink=$langs->trans("NotYetAvailable"); } -report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); +report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta)); // Show report array print ''; diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 371a859c062..ed738e9864b 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -45,7 +45,7 @@ accessforbidden(); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') $modecompta = $conf->global->COMPTA_MODE; -if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"]; +if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta"); @@ -79,7 +79,7 @@ else { $builddate=time(); //$exportlink=$langs->trans("NotYetAvailable"); } -report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); +report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta)); /* diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index c546fd5c563..a179811b1fb 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -78,7 +78,9 @@ else { $builddate=time(); //$exportlink=$langs->trans("NotYetAvailable"); } -report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); +$moreparam=array(); +if (! empty($modecompta)) $moreparam['modecompta']=$modecompta; +report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam); if ($modecompta == 'CREANCES-DETTES') diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php index 02f982bcbb6..0a07f96d3de 100644 --- a/htdocs/core/lib/report.lib.php +++ b/htdocs/core/lib/report.lib.php @@ -25,14 +25,15 @@ /** * Show header of a VAT report * -* @param $nom Name of report -* @param $variante Link for alternate report -* @param $period Period of report -* @param $periodlink Link to switch period -* @param $description Description -* @param $builddate Date generation -* @param $exportlink Link for export or '' -* @param $moreparam Array with list of params to add into form +* @param string $nom Name of report +* @param string $variante Link for alternate report +* @param string $period Period of report +* @param string $periodlink Link to switch period +* @param string $description Description +* @param date $builddate Date generation +* @param string $exportlink Link for export or '' +* @param array $moreparam Array with list of params to add into form +* @return void */ function report_header($nom,$variante='',$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array()) {