From a83ad31f49d191df8758481f16e829962eb53396 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 28 Jul 2004 09:50:20 +0000 Subject: [PATCH] Ajout colonne de Cumul sur les deltas --- htdocs/compta/stats/exercices.php | 77 ++----------------------------- 1 file changed, 5 insertions(+), 72 deletions(-) diff --git a/htdocs/compta/stats/exercices.php b/htdocs/compta/stats/exercices.php index 8f0764fa02e..6ee85bf70af 100644 --- a/htdocs/compta/stats/exercices.php +++ b/htdocs/compta/stats/exercices.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -44,77 +44,8 @@ if ($conf->compta->mode == 'CREANCES-DETTES') { $mode='creances'; } print_titre("Comparatif CA année en cours avec année précédente (".MAIN_MONNAIE." HT, ".$mode.")"); print "
\n"; -function propals ($db, $year, $month) { - global $bc; - $sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id"; - $sql .= " AND c.id in (1,2)"; - $sql .= " AND date_format(p.datep, '%Y') = $year "; - $sql .= " AND round(date_format(p.datep, '%m')) = $month "; - - - $sql .= " ORDER BY p.fk_statut"; - - $result = $db->query($sql); - $num = $db->num_rows(); - $i = 0; - print '

'; - print ""; - - $oldstatut = -1; - $subtotal = 0; - while ($i < $num) { - $objp = $db->fetch_object( $i); - - if ($objp->statut <> $oldstatut ) { - $oldstatut = $objp->statut; - - if ($i > 0) { - print "\n"; - print "\n"; - } - $subtotal = 0; - - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; - $var=True; - } - - $var=!$var; - print ""; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - print "\n"; - print "\n"; - - $total = $total + $objp->price; - $subtotal = $subtotal + $objp->price; - - $i++; - } - print "\n"; - print "\n"; - print ""; - print ""; - print ""; - print "
Propal
Total : ".price($subtotal)."Euros HT
SocieteRéfDatePrixStatut
idp\">$objp->nompropalid\">$objp->ref".strftime("%d %B %Y",$objp->dp)."".price($objp->price)."$objp->statut
Total : ".price($subtotal)."Euros HT
Total : ".price($total)."Euros HT
"; - $db->free(); - -} - - -function factures ($db, $year, $month, $paye) { +function factures ($db, $year, $month, $paye) +{ global $bc; $sql = "SELECT s.nom, s.idp, f.facnumber, f.total as amount,".$db->pdate("f.datef")." as df, f.paye, f.rowid as facid "; @@ -292,6 +223,7 @@ function ppt ($db, $year, $socidp) print ""; print "Mois"; print "Montant"; + print 'Cumul'; print "\n"; $var = 1 ; @@ -304,6 +236,7 @@ function ppt ($db, $year, $socidp) print ""; print "".strftime("%B",mktime(12,0,0,$b, 1, $year))."\n"; print "".price($delta)."\n"; + print "".price($deltat)."\n"; print "\n"; }