From 519c6a85c7c60aa2ff74386273bff36b4844feda Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Jan 2005 22:06:15 +0000 Subject: [PATCH] =?UTF-8?q?Look:=20Modif=20esth=E9tique=20mineure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/stats/index.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 60302b96a8a..c3035128d5c 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -39,7 +39,9 @@ if ($user->societe_id > 0) $mode='recettes'; if ($conf->compta->mode == 'CREANCES-DETTES') { $mode='creances'; } + print_titre("Chiffre d'affaire (".$conf->monnaie." HT, ".$mode.")"); +print '
'; $sql = "SELECT sum(f.total) as amount , date_format(f.datef,'%Y-%m') as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; @@ -66,7 +68,7 @@ if ($result) } } -print ''; +print '
'; print ''; $year_current = strftime("%Y",time()); @@ -126,8 +128,11 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++) // Pourcentage evol if ($cum[$caseprev]) { if ($case <= $casenow) { - if ($cum[$caseprev]) - print ''; + if ($cum[$caseprev]) { + $percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev],4)*100); + print ''; + + } else print ''; } @@ -151,7 +156,7 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++) } // Affiche total -print ""; +print ""; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { print ""; @@ -159,8 +164,10 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++) // Pourcentage evol if ($total[$annee-1]) { if ($annee <= $year_current) { - if ($total[$annee-1]) - print ''; + if ($total[$annee-1]) { + $percent=(round(($total[$annee]-$total[$annee-1])/$total[$annee-1],4)*100); + print ''; + } else print ''; }
'.$langs->trans("Month").''.(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev],4)*100).'%'.($percent>=0?"+$percent":"$percent").'%+Inf%
Total :
".$langs->trans("Total")." :".($total[$annee]?$total[$annee]:" ")."'.(round(($total[$annee]-$total[$annee-1])/$total[$annee-1],4)*100).'%'.($percent>=0?"+$percent":"$percent").'%+Inf%