From 893adae3466d8a9f5c6024b1f599f67cad465c3b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 Apr 2018 21:45:06 +0200 Subject: [PATCH] FIX view of balance before field --- htdocs/compta/bank/bankentries_list.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 5b9f6469f27..b169a5da642 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -989,12 +989,12 @@ if ($resql) { $tmpnbfieldbeforebalance=0; $tmpnbfieldafterbalance=0; - $balancefieldfound=false; + $balancefieldfound=0; foreach($arrayfields as $key => $val) { if ($key == 'balancebefore' || $key == 'balance') { - $balancefieldfound=true; + $balancefieldfound++; continue; } if (! empty($arrayfields[$key]['checked'])) @@ -1025,9 +1025,20 @@ if ($resql) print ''; print ''; } - print ''; - print price(price2num($balance, 'MT'), 1, $langs); - print ''; + + if (! empty($arrayfields['balancebefore']['checked'])) + { + print ''; + print price(price2num($balance, 'MT'), 1, $langs); + print ''; + } + if (! empty($arrayfields['balance']['checked'])) + { + print ''; + print price(price2num($balance, 'MT'), 1, $langs); + print ''; + } + print ''; print ''; print '