From 476614432b5d52bb75f50d9fc7c836560440e16e Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 30 Jan 2003 17:25:04 +0000 Subject: [PATCH] new file --- htdocs/public/dons/depenses_code.php | 85 ++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 htdocs/public/dons/depenses_code.php diff --git a/htdocs/public/dons/depenses_code.php b/htdocs/public/dons/depenses_code.php new file mode 100644 index 00000000000..898ace38d1f --- /dev/null +++ b/htdocs/public/dons/depenses_code.php @@ -0,0 +1,85 @@ + + * Copyright (C) 2003 Association FSF France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ + + +$conf = new Conf(); +$db = new Db(); +$a = setlocale("LC_TIME", "FRENCH"); +$sql = "SELECT ".$db->pdate("f.datef")." as datef, s.nom, f.total, f.note"; +$sql .= " FROM llx_facture_fourn as f, societe as s"; +$sql .= " WHERE f.fk_soc = s.idp ORDER BY f.datef DESC"; + +if ( $db->query( $sql) ) +{ + $num = $db->num_rows(); + if ($num) + { + + print ""; + + print ''; + print ""; + print ""; + print ""; + print "\n"; + + $var=True; + $bc[1]='bgcolor="#f5f5f5"'; + $bc[0]='bgcolor="#f0f0f0"'; + while ($i < $num) + { + $objp = $db->fetch_object( $i); + + $var=!$var; + print ""; + print "\n"; + + print "\n"; + print ''; + print ""; + + print ""; + + $total += $objp->total; + + $i++; + } + + $var=!$var; + print ""; + print ''; + + print "
SociétéDateMontant
".stripslashes($objp->nom)."".strftime("%d %B %Y",$objp->datef)."'.number_format($objp->total,2,'.',' ').' euros
 "; + print nl2br(stripslashes($objp->note)); + print " 
Total : '.number_format($total,2,'.',' ').' euros
"; + + } +} +else +{ + print $db->error(); +} + +$db->close(); + +?>