From 89511a968308b660992205bdd9d83b159debc91e Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 10 Jan 2006 22:54:29 +0000 Subject: [PATCH] Gestion de Janvier --- htdocs/telephonie/script/graph-statistiques-commerciaux.php | 5 ++++- .../telephonie/script/graph-statistiques-distributeurs.php | 4 ++++ htdocs/telephonie/stats/distributeurs/resultats.php | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/telephonie/script/graph-statistiques-commerciaux.php b/htdocs/telephonie/script/graph-statistiques-commerciaux.php index 38dec9faa38..42d93599bcc 100644 --- a/htdocs/telephonie/script/graph-statistiques-commerciaux.php +++ b/htdocs/telephonie/script/graph-statistiques-commerciaux.php @@ -46,7 +46,10 @@ require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/commerciaux/groupes/groupe.ga require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/commerciaux/groupes/groupe.ca.class.php"); $year = strftime("%Y",time()); $error = 0; - +if (strftime("%m",time()) == 1) +{ + $year = $year -1; +} /* * Création des répertoires * diff --git a/htdocs/telephonie/script/graph-statistiques-distributeurs.php b/htdocs/telephonie/script/graph-statistiques-distributeurs.php index f33958b9720..06d8f83ea8e 100644 --- a/htdocs/telephonie/script/graph-statistiques-distributeurs.php +++ b/htdocs/telephonie/script/graph-statistiques-distributeurs.php @@ -44,6 +44,10 @@ require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/commerciaux/groupes/groupe.ca $error = 0; $year = strftime("%Y",time()); +if (strftime("%m",time()) == 1) +{ + $year = $year -1; +} /* * Création des répertoires * diff --git a/htdocs/telephonie/stats/distributeurs/resultats.php b/htdocs/telephonie/stats/distributeurs/resultats.php index 0bb05f4112b..16b764b2987 100644 --- a/htdocs/telephonie/stats/distributeurs/resultats.php +++ b/htdocs/telephonie/stats/distributeurs/resultats.php @@ -42,6 +42,10 @@ $hselected = $h; $h++; $year = strftime("%Y",time()); +if (strftime("%m",time()) == 1) +{ + $year = $year -1; +} $total = 0; $var = True; dolibarr_fiche_head($head, $hselected, "Distributeurs");