diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 49f8abe96e9..5586644ad20 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * 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 @@ -20,6 +20,14 @@ * $Source$ * */ + +/** + \file htdocs/compta/bank/budget.php + \ingroup banque + \brief Page de budget + \version $Revision$ +*/ + require("./pre.inc.php"); if (!$user->rights->banque->lire) @@ -35,14 +43,15 @@ llxHeader(); if ($_GET["bid"] == 0) { /* - * Liste + * 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 '
'; - print ''; + print '
'; print ""; - print ''; + print ''; print "\n"; $sql = "SELECT sum(d.amount) as somme, count(*) as nombre, c.label, c.rowid "; @@ -55,12 +64,12 @@ if ($_GET["bid"] == 0) $num = $db->num_rows(); $i = 0; $total = 0; - $var=True; + $var=true; while ($i < $num) { $objp = $db->fetch_object($result); $var=!$var; - print ""; + print ""; print ""; print ''; print ""; @@ -69,14 +78,14 @@ if ($_GET["bid"] == 0) $i++; $total = $total + abs($objp->somme); } - $db->free(); + $db->free($result); - print "".''; + print ''; print ''; } else { - print $db->error(); + dolibarr_print_error($db); } print "
'.$langs->trans("Description").'Nb'.$langs->trans("Total").'Moyenne'.$langs->trans("Description").''.$langs->trans("Nb").''.$langs->trans("Total").''.$langs->trans("Average").'
rowid\">$objp->label'.$objp->nombre.'".price(abs($objp->somme))."
'.$langs->trans("Total").'
'.$langs->trans("Total").''.price($total).' 
"; @@ -98,9 +107,9 @@ else print_titre("Budget : $budget_name"); - print ''; + print '
'; print ""; - print ''; + print ''; print "\n"; $sql = "SELECT d.amount, d.label, ".$db->pdate("d.dateo")." as do, d.rowid"; @@ -110,7 +119,7 @@ else $result = $db->query($sql); if ($result) { - $num = $db->num_rows(); + $num = $db->num_rows($result); $i = 0; $total = 0; $var=True; @@ -128,7 +137,7 @@ else $total = $total + (0 - $objp->amount); } $db->free(); - print ""; + print '"; } else { @@ -140,5 +149,6 @@ else $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); + ?>
Date'.$langs->trans("Description").'Montant Date'.$langs->trans("Description").''.$langs->trans("Amount").' 
".$langs->trans("Total")."".price(abs($total))."".$conf->monnaie."
'.$langs->trans("Total")."".price(abs($total))."".$conf->monnaie."