From ae2e5f498baa8317dfe394609f4cd47719907e74 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. --- 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.11.0