From 655cd1d7bc3ac4cbaa0dcdbc2adb486a66bbc455 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 19 Jun 2002 09:05:49 +0000 Subject: [PATCH] *** empty log message *** --- htdocs/compta/resultat/index.php3 | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/htdocs/compta/resultat/index.php3 b/htdocs/compta/resultat/index.php3 index 156f00871f7..1173af740a2 100644 --- a/htdocs/compta/resultat/index.php3 +++ b/htdocs/compta/resultat/index.php3 @@ -41,17 +41,17 @@ print_titre("R print ""; print ''; print ""; -print ""; +print ""; print "\n"; -$sql = "SELECT s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,f.paye,f.rowid as facid"; +$sql = "SELECT s.nom,sum(f.amount) as amount"; $sql .= " FROM societe as s,llx_facture as f WHERE f.fk_soc = s.idp"; if ($year > 0) { $sql .= " AND date_format(f.datef, '%Y') = $year"; } -$sql .= " ORDER BY f.fk_statut, f.paye, f.datef DESC "; +$sql .= " GROUP BY s.nom ASC"; $result = $db->query($sql); if ($result) { @@ -68,14 +68,7 @@ if ($result) { print ""; print "\n"; - if ($objp->df > 0 ) { - print "\n"; - } else { - print "\n"; - } - - print "\n"; + print "\n"; $total = $total + $objp->amount; print "\n"; @@ -94,13 +87,13 @@ if ($result) { */ -$sql = "SELECT c.libelle as nom, s.amount,".$db->pdate("s.date_ech")." as de, s.date_pai, s.libelle, s.paye"; +$sql = "SELECT c.libelle as nom, sum(s.amount) as amount"; $sql .= " FROM c_chargesociales as c, llx_chargesociales as s"; $sql .= " WHERE s.fk_type = c.id"; if ($year > 0) { $sql .= " AND date_format(s.periode, '%Y') = $year"; } -$sql .= " ORDER BY lower(s.date_ech) DESC"; +$sql .= " GROUP BY c.libelle DESC"; if ( $db->query($sql) ) { $num = $db->num_rows(); @@ -110,10 +103,8 @@ if ( $db->query($sql) ) { $obj = $db->fetch_object( $i); $var = !$var; print ""; - print ''; - print ''; - print ''; - + print ''; + print ''; $total = $total - $obj->amount; print "\n";
NuméroDateMontantSoldeMontantSolde
Facture facid\">$objp->facnumber $objp->nom"; - print strftime("%d/%m/%y",$objp->df)."!!!".price($objp->amount)."".price($objp->amount)." ".price($total)."
'.$obj->nom.' - '.$obj->libelle.''.strftime("%d/%m/%y",$obj->de).''.price($obj->amount).''.$obj->nom.' '.price($obj->amount).'".price($total)."