diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php
index 125cfe9aa22..999409cfb36 100644
--- a/htdocs/compta/resultat/clientfourn.php
+++ b/htdocs/compta/resultat/clientfourn.php
@@ -89,7 +89,7 @@ else
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->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 473a1066de4..1e7925f7a2b 100644
--- a/htdocs/compta/resultat/index.php
+++ b/htdocs/compta/resultat/index.php
@@ -46,7 +46,7 @@ accessforbidden();
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->compta->mode;
-if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
+if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta");
@@ -78,7 +78,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 e5432a6c8b0..ee2a025e013 100644
--- a/htdocs/compta/stats/index.php
+++ b/htdocs/compta/stats/index.php
@@ -77,7 +77,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') {