From 75b171a99462a46905cbb8c40bcf74d10061a52c Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 28 Oct 2003 16:49:34 +0000 Subject: [PATCH] Suppression du filtre sur les annees --- htdocs/compta/resultat/index.php | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index a8a36382093..8a6f4f051a8 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -34,19 +34,17 @@ td.border { border: 1px solid #000000} "; print ''; print ' Elément'; -print "MontantSolde"; -print "\n"; +print "Montant"; +print "\n"; $sql = "SELECT s.nom,sum(f.amount) as amount"; $sql .= " FROM llx_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 .= " GROUP BY s.nom ASC"; print 'Factures'; @@ -69,8 +67,6 @@ if ($result) { print "".price($objp->amount)."\n"; $total = $total + $objp->amount; - print "".price($total)."\n"; - print "\n"; $i++; } @@ -85,11 +81,9 @@ print ''.price($total).''; * * */ -$sql = "SELECT s.nom,sum(f.amount) as amount"; +$sql = "SELECT s.nom,sum(f.total_ht) as amount"; $sql .= " FROM llx_societe as s,llx_facture_fourn as f WHERE f.fk_soc = s.idp"; -if ($year > 0) { - $sql .= " AND date_format(f.datef, '%Y') = $year"; -} + $sql .= " GROUP BY s.nom ASC"; print 'Frais'; @@ -112,8 +106,6 @@ if ($result) { $total = $total - $objp->amount; $subtotal = $subtotal + $objp->amount; - print "".price($total)."\n"; - print "\n"; $i++; } @@ -134,9 +126,7 @@ print 'Prestations d $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 AND c.deductible=1"; -if ($year > 0) { - $sql .= " AND date_format(s.periode, '%Y') = $year"; -} + $sql .= " GROUP BY c.libelle DESC"; if ( $db->query($sql) ) { @@ -153,7 +143,6 @@ if ( $db->query($sql) ) { print " "; print ''.$obj->nom.''; print ''.price($obj->amount).''; - print "".price($total)."\n"; print ''; $i++; } @@ -173,9 +162,7 @@ print 'Prestations NON d $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 AND c.deductible=0"; -if ($year > 0) { - $sql .= " AND date_format(s.periode, '%Y') = $year"; -} + $sql .= " GROUP BY c.libelle DESC"; if ( $db->query($sql) ) { @@ -192,7 +179,6 @@ if ( $db->query($sql) ) { print " "; print ''.$obj->nom.''; print ''.price($obj->amount).''; - print "".price($total)."\n"; print ''; $i++; }