From b1b9effffe85ce96627b3394e7b2e915b84b5261 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 26 Oct 2018 13:01:30 -0300 Subject: [PATCH] Bug 20629: (QA follow-up) Remove actions_col The actions_col template param requires a DB search, only to display the 'Actions' column header vs. an empty string. But there will always be buttons in there, that were added *after*. It made sense when only the 'Reverse' button was displayed, but now both 'Print' and 'Details' are displayed anyway. This patch removes it for good :-D Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/members/boraccount.tt | 14 +++----------- members/boraccount.pl | 5 ----- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index 6f31d8cd3e..13c92ce095 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -47,11 +47,7 @@ Note Amount Outstanding - [% IF ( actions_col ) %] - Actions - [% ELSE %] -   - [% END %] + Actions @@ -76,12 +72,8 @@ Print [% END %] Details - [% IF ( actions_col) %] - [% IF account.is_credit %] - Void - [% ELSE %] -   - [% END %] + [% IF account.is_credit %] + Void [% END %] diff --git a/members/boraccount.pl b/members/boraccount.pl index 743c04a543..74f8e29988 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -79,10 +79,6 @@ if($total <= 0){ $totalcredit = 1; } -my $actions_col = ( Koha::Account::Lines->search( - { borrowernumber => $patron->borrowernumber }, - { where => { amount => { '<=', 0 } } } )->count > 0 ) ? 1 : 0; - if (C4::Context->preference('ExtendedPatronAttributes')) { my $attributes = GetBorrowerAttributes($borrowernumber); $template->param( @@ -96,7 +92,6 @@ $template->param( finesview => 1, total => sprintf("%.2f",$total), totalcredit => $totalcredit, - actions_col => $actions_col, accounts => \@accountlines, ); -- 2.19.1