From 256811e76a62d218b0cbd76436ca8b02f9a99e04 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 11 Jan 2006 11:24:48 +0000 Subject: [PATCH] Gestion de la date --- htdocs/telephonie/stats/factures/index.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/htdocs/telephonie/stats/factures/index.php b/htdocs/telephonie/stats/factures/index.php index f3315a46d70..e94a16b388a 100644 --- a/htdocs/telephonie/stats/factures/index.php +++ b/htdocs/telephonie/stats/factures/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2006 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,6 +35,16 @@ if ($user->societe_id > 0) $socidp = $user->societe_id; } +$year = strftime("%Y",time()); +if (strftime("%m",time()) == 1) +{ + $year = $year -1; +} +if ($_GET["year"] > 0) +{ + $year = $_GET["year"]; +} + $h = 0; $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/factures/index.php'; @@ -50,11 +60,8 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/factures/type.php'; $head[$h][1] = "Méthode de paiement"; $h++; -//$head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/factures/lastmonth.php'; -//$head[$h][1] = "3 derniers mois"; -//$h++; - dolibarr_fiche_head($head, $hselected, "Satistiques Factures"); +stat_year_bar($year); print '';