From b568c6722568f3787e4877829739134f59fe8de5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 May 2005 01:27:54 +0000 Subject: [PATCH] =?UTF-8?q?New:=20Ajout=20ligne=20b=E9n=E9fice=20sur=20rap?= =?UTF-8?q?port=20recettes-d=E9penses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/resultat/index.php | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index dd04866db41..23f99c0c3b5 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -31,12 +31,13 @@ require("./pre.inc.php"); $year_start=isset($_GET["year_start"])?$_GET["year_start"]:$_POST["year_start"]; $year_current = strftime("%Y",time()); +$nbofyear=4; if (! $year_start) { - $year_start = $year_current - 2; + $year_start = $year_current - ($nbofyear-1); $year_end = $year_current; } else { - $year_end=$year_start+2; + $year_end=$year_start + ($nbofyear-1); } /* @@ -274,13 +275,13 @@ print ''.$langs->trans("Month").''; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { - print ''.$annee.''; + print ''.$annee.''; } print ''; print ''; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { - print 'RecettesDépenses'; + print ''.$langs->trans("Income").''.$langs->trans("Outcome").''; } print ''; @@ -292,7 +293,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++) print "".strftime("%B",mktime(1,1,1,$mois,1,$annee)).""; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { - print ' '; + print ' '; $case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee)); if ($encaiss_ttc[$case]>0) { @@ -301,7 +302,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++) } print ""; - print ' '; + print ' '; $case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee)); if ($decaiss_ttc[$case]>0) { @@ -314,11 +315,26 @@ for ($mois = 1 ; $mois < 13 ; $mois++) print ''; } +// Total $var=!$var; print ''.$langs->trans("TotalTTC").''; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { - print ''.price($totentrees[$annee]).''.price($totsorties[$annee]).''; + print ''.(isset($totentrees[$annee])?price($totentrees[$annee]):' ').''; + print ''.(isset($totsorties[$annee])?price($totsorties[$annee]):' ').''; +} +print "\n"; + +// Balance +$var=!$var; +print ''.$langs->trans("Profit").''; +for ($annee = $year_start ; $annee <= $year_end ; $annee++) +{ + print ' '; + if (isset($totentrees[$annee]) || isset($totsorties[$annee])) { + print price($totentrees[$annee]-$totsorties[$annee]).''; +// print ' '; + } } print "\n";