From 856ad69cd1c0b463e8afd7e3a464b052a307ca83 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 31 Jan 2005 20:03:10 +0000 Subject: [PATCH] =?UTF-8?q?New:=20Ajout=20lien=20suivant-pr=E9c=E9dent=20s?= =?UTF-8?q?ur=20pages=20des=20rapports=20mensuels.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/stats/index.php | 39 +++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index c3035128d5c..44b9266f5e5 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -20,11 +20,25 @@ * $Source$ * */ + +/** + \file htdocs/compta/stats/index.php + \brief Page reporting CA + \version $Revision$ +*/ + require("./pre.inc.php"); -/* - * - */ +$year_start=isset($_GET["year_start"])?$_GET["year_start"]:$_POST["year_start"]; +$year_current = strftime("%Y",time()); +if (! $year_start) { + $year_start = $year_current - 2; + $year_end = $year_current; +} +else { + $year_end=$year_start+2; +} + llxHeader(); @@ -40,7 +54,10 @@ $mode='recettes'; if ($conf->compta->mode == 'CREANCES-DETTES') { $mode='creances'; } -print_titre("Chiffre d'affaire (".$conf->monnaie." HT, ".$mode.")"); +$title="Chiffre d'affaire (".$conf->monnaie." HT, ".$mode.")"; +$lien=($year_start?"".img_previous()." ".img_next()."":""); +print_fiche_titre($title,$lien); + print '
'; $sql = "SELECT sum(f.total) as amount , date_format(f.datef,'%Y-%m') as dm"; @@ -71,20 +88,6 @@ if ($result) print ''; print ''; -$year_current = strftime("%Y",time()); -$nbyears = 3; - -if ($year_current < (MAIN_START_YEAR + $nbyears)) -{ - $year_start = MAIN_START_YEAR; - $year_end = (MAIN_START_YEAR + $nbyears - 1); -} -else -{ - $year_start = $year_current - ($nbyears + 1); - $year_end = $year_current ; -} - for ($annee = $year_start ; $annee <= $year_end ; $annee++) { print '';
'.$langs->trans("Month").''.$annee.'