diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php
index f367f8ee436..fb651977d7c 100644
--- a/htdocs/compta/stats/cabyprodserv.php
+++ b/htdocs/compta/stats/cabyprodserv.php
@@ -111,6 +111,13 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
// TODO We define q
}
+// $date_start and $date_end are defined. We force $year_start and $nbofyear
+$tmps=dol_getdate($date_start);
+$year_start = $tmps['year'];
+$tmpe=dol_getdate($date_end);
+$year_end = $tmpe['year'];
+$nbofyear = ($year_end - $year_start) + 1;
+
$commonparams=array();
$commonparams['modecompta']=$modecompta;
$commonparams['sortorder'] = $sortorder;
@@ -154,10 +161,11 @@ $name=$langs->trans("SalesTurnover").', '.$langs->trans("ByProductsAndServices")
if ($modecompta=="CREANCES-DETTES") {
$calcmode=$langs->trans("CalcModeDebt");
- $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')';
+ $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
-
+ $periodlink="".img_previous()." ".img_next()."";
+
$description=$langs->trans("RulesCADue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description.= $langs->trans("DepositsAreNotIncluded");
@@ -168,10 +176,11 @@ if ($modecompta=="CREANCES-DETTES") {
$builddate=dol_now();
} else {
$calcmode=$langs->trans("CalcModeEngagement");
- $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')';
+ $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
-
+ $periodlink="".img_previous()." ".img_next()."";
+
$description=$langs->trans("RulesCAIn");
$description.= $langs->trans("DepositsAreIncluded");
diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php
index 1fa48738e66..a21c34e0c2f 100644
--- a/htdocs/compta/stats/cabyuser.php
+++ b/htdocs/compta/stats/cabyuser.php
@@ -99,6 +99,12 @@ else
{
// TODO We define q
}
+// $date_start and $date_end are defined. We force $year_start and $nbofyear
+$tmps=dol_getdate($date_start);
+$year_start = $tmps['year'];
+$tmpe=dol_getdate($date_end);
+$year_end = $tmpe['year'];
+$nbofyear = ($year_end - $year_start) + 1;
$commonparams=array();
$commonparams['modecompta']=$modecompta;
@@ -139,9 +145,9 @@ $form=new Form($db);
if ($modecompta=="CREANCES-DETTES") {
$name=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$calcmode=$langs->trans("CalcModeDebt");
- $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')';
+ $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
- //$periodlink="".img_previous()." ".img_next()."";
+ $periodlink="".img_previous()." ".img_next()."";
$description=$langs->trans("RulesCADue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
else $description.= $langs->trans("DepositsAreIncluded");
@@ -150,9 +156,9 @@ if ($modecompta=="CREANCES-DETTES") {
} else {
$name=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$calcmode=$langs->trans("CalcModeEngagement");
- $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')';
+ $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
- //$periodlink="".img_previous()." ".img_next()."";
+ $periodlink="".img_previous()." ".img_next()."";
$description=$langs->trans("RulesCAIn");
$description.= $langs->trans("DepositsAreIncluded");
$builddate=dol_now();
diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php
index b7b37d0837c..9a88a1c4574 100644
--- a/htdocs/compta/stats/casoc.php
+++ b/htdocs/compta/stats/casoc.php
@@ -120,6 +120,13 @@ else
// TODO We define q
}
+// $date_start and $date_end are defined. We force $year_start and $nbofyear
+$tmps=dol_getdate($date_start);
+$year_start = $tmps['year'];
+$tmpe=dol_getdate($date_end);
+$year_end = $tmpe['year'];
+$nbofyear = ($year_end - $year_start) + 1;
+
$commonparams=array();
$commonparams['modecompta']=$modecompta;
$commonparams['sortorder'] = $sortorder;
@@ -167,9 +174,9 @@ if ($modecompta=="CREANCES-DETTES")
{
$name=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$calcmode=$langs->trans("CalcModeDebt");
- $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')';
+ $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
- //$periodlink=''.img_previous().' '.img_next().'';
+ $periodlink=''.img_previous().' '.img_next().'';
$description=$langs->trans("RulesCADue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
else $description.= $langs->trans("DepositsAreIncluded");
@@ -178,9 +185,9 @@ if ($modecompta=="CREANCES-DETTES")
} else {
$name=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$calcmode=$langs->trans("CalcModeEngagement");
- $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')';
+ $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
- //$periodlink=''.img_previous().' '.img_next().'';
+ $periodlink=''.img_previous().' '.img_next().'';
$description=$langs->trans("RulesCAIn");
$description.= $langs->trans("DepositsAreIncluded");
$builddate=dol_now();