From d36a9a7613b3c064bc352e1be3fe3b954bba94fe Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 15 Oct 2018 18:50:09 +0000 Subject: [PATCH] Bug 20629: (follow-up) fix reverse_col value Before this patch the Void button didn't appear. After this patch the Void button appears on payments. Signed-off-by: Mark Tompsett Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- members/boraccount.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/members/boraccount.pl b/members/boraccount.pl index 7f94bf2e45..9677819661 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -79,7 +79,9 @@ if($total <= 0){ $totalcredit = 1; } -my $reverse_col = 0; # Flag whether we need to show the reverse column +my $reverse_col = ( Koha::Account::Lines->search( + { borrowernumber => $patron->borrowernumber }, + { where => { amount => { '<=', 0 } } } )->count > 0 ) ? 1 : 0; if (C4::Context->preference('ExtendedPatronAttributes')) { my $attributes = GetBorrowerAttributes($borrowernumber); -- 2.19.1