From 903a6b384b5fad0ebebae0840ea016bbeb616ca5 Mon Sep 17 00:00:00 2001 From: jlb Date: Mon, 5 May 2003 09:50:51 +0000 Subject: [PATCH] rajout de totaux et moyenne par annee --- htdocs/adherents/cotisations.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index e9691e63d75..5266f2051af 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -63,6 +63,7 @@ if(isset($date_select) && $date_select != ''){ } $result = $db->query($sql); $Total=array(); +$Number=array(); if ($result) { $num = $db->num_rows(); @@ -71,6 +72,7 @@ if ($result) { $objp = $db->fetch_object( $i); $Total[strftime("%Y",$objp->dateadh)]+=price($objp->cotisation); + $Number[strftime("%Y",$objp->dateadh)]+=1; $i++; } } @@ -93,12 +95,14 @@ if ($result) print "\n"; print ''; print ""; + print ''; print ""; + print "\n"; // print ""; print "\n"; foreach ($Total as $key=>$value){ $var=!$var; - print "\n"; + print "\n"; } print "
AnneeMontantMontantMoyennePrenom Nom / Société
$key".price($value)."
$key".price($value)."".$Number[$key]."".price($value/$Number[$key])."

\n";