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");