From 69028883e7da055c77d1b3c2272566a2c7e20d75 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Aug 2009 14:07:28 +0000 Subject: [PATCH] Fix: Balance total line if there is transactions in future --- htdocs/compta/bank/account.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 37efa577191..c4ea9c3e01b 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -23,7 +23,7 @@ /** * \file htdocs/compta/bank/account.php * \ingroup banque - * \brief Page de détail des transactions bancaires + * \brief Page de d�tail des transactions bancaires * \version $Id$ */ @@ -475,10 +475,13 @@ if ($account || $_GET["ref"]) { $var=!$var; - if ($objp->do > $time && !$sep) + // Is it a transaction in future ? + if ($objp->do > $time && !$sep) // Yes, we show a subtotal { $sep = 1 ; - print " "; + print ''; + print $langs->trans("CurrentBalance"); + print ''; print "".price($total - $objp->amount).""; print " "; print ''; @@ -564,7 +567,7 @@ if ($account || $_GET["ref"]) print ''; if (eregi('^\((.*)\)$',$links[$key]['label'],$reg)) { - // Label générique car entre parenthèses. On l'affiche en le traduisant + // Label g�n�rique car entre parenth�ses. On l'affiche en le traduisant if ($reg[1]=='paiement') $reg[1]='Payment'; print $langs->trans($reg[1]); } @@ -608,6 +611,7 @@ if ($account || $_GET["ref"]) } print ''; + // Amount if ($objp->amount < 0) { print "".price($objp->amount * -1)." \n"; @@ -617,6 +621,7 @@ if ($account || $_GET["ref"]) print "  ".price($objp->amount)."\n"; } + // Balance if ($action != 'search') { if ($total >= 0) @@ -633,7 +638,7 @@ if ($account || $_GET["ref"]) print '-'; } - // Relevé rappro ou lien edition + // Receipt conciliate or edit link if ($objp->rappro && $acct->type != 2) // Si non compte cash { print ""; @@ -676,10 +681,13 @@ if ($account || $_GET["ref"]) $i++; } - // Affichage total + // Show total if ($page == 0 && ! $mode_search) { - print ''.$langs->trans("CurrentBalance").''; + print ''; + if ($sep) print ' '; + else print $langs->trans("CurrentBalance"); + print ''; print ''.price($total).''; print ' '; print '';