From 4f1e907e6066eb42a0459276a63e96347a04aee6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 May 2005 01:21:28 +0000 Subject: [PATCH] =?UTF-8?q?New:=20Ajout=20picto=20et=20nom=20compte=20banc?= =?UTF-8?q?aire=20sur=20rapport=20des=20=E9critures=20par=20cat=E9gories?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/bank/budget.php | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 5586644ad20..9c7af91bde4 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -44,9 +44,8 @@ if ($_GET["bid"] == 0) { /* * Liste mouvements par catégories d'écritures financières - * \todo Le terme "budget" du rapport n'est pas approprié. Il s'agit d'un rapport sur l'existant et non d'un prévisionnel. */ - print_titre("Budgets"); + print_titre("Ecritures bancaires par catégories"); print '
'; print ''; @@ -61,7 +60,7 @@ if ($_GET["bid"] == 0) $result = $db->query($sql); if ($result) { - $num = $db->num_rows(); + $num = $db->num_rows($result); $i = 0; $total = 0; $var=true; @@ -93,7 +92,7 @@ if ($_GET["bid"] == 0) else { /* - * Vue + * Rapport mouvements pour une catégorie donnée */ $sql = "SELECT label FROM ".MAIN_DB_PREFIX."bank_categ WHERE rowid=".$_GET["bid"]; if ( $db->query($sql) ) @@ -105,16 +104,21 @@ else $db->free(); } - print_titre("Budget : $budget_name"); - + print_titre("Ecriture bancaire pour la catégorie: $budget_name"); + print '
'; + print '
'; print ""; - print ''; + print ''; + print ''; + print ''; print "\n"; - $sql = "SELECT d.amount, d.label, ".$db->pdate("d.dateo")." as do, d.rowid"; - $sql .= " FROM ".MAIN_DB_PREFIX."bank_class as l, ".MAIN_DB_PREFIX."bank as d"; - $sql .= " WHERE d.rowid=l.lineid AND l.fk_categ=".$_GET["bid"]." ORDER by d.dateo DESC"; + $sql = "SELECT b.amount, b.label, ".$db->pdate("b.dateo")." as do, b.rowid, ba.label as labelcompte, ba.rowid as bankid"; + $sql.= " FROM ".MAIN_DB_PREFIX."bank_class as l, ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba"; + $sql.= " WHERE b.rowid=l.lineid AND l.fk_categ=".$_GET["bid"]; + $sql.= " AND b.fk_account = ba.rowid"; + $sql.= " ORDER BY b.dateo DESC"; $result = $db->query($sql); if ($result) @@ -128,16 +132,17 @@ else $objp = $db->fetch_object($result); $var=!$var; print ""; - print "\n"; + print "\n"; - print ""; + print ""; + print "'; print ""; print ""; $i++; $total = $total + (0 - $objp->amount); } $db->free(); - print '"; + print '"; } else {
Date'.$langs->trans("Description").''.$langs->trans("Amount").' '.$langs->trans("Date").''.$langs->trans("Bank").''.$langs->trans("Description").''.$langs->trans("Amount").' 
".strftime("%d %B %Y",$objp->do)."".dolibarr_print_date($objp->do)."rowid\">$objp->labelbankid\">$objp->labelcompterowid\">".img_object($langs->trans("ShowPayment"),"payment").' '.$objp->label.'".price(0 - $objp->amount)." 
'.$langs->trans("Total")."".price(abs($total))."".$conf->monnaie."
'.$langs->trans("Total")."".price(abs($total))."".$conf->monnaie."