From 1e5e9f5e808d9e17c704f5bd757bc6d51d43059b 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 Signed-off-by: Nick Clemens --- .../prog/en/modules/members/boraccount.tt | 18 +++++------------- members/boraccount.pl | 5 ----- 2 files changed, 5 insertions(+), 18 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 8a86afc7d5..226c1c6226 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 @@ -71,17 +67,13 @@ [% IF account.amountoutstanding <= 0 %][% ELSE %][% END %][% account.amountoutstanding | $Price %] [% IF ( account.is_credit ) %] - Print + Print [% ELSE %] - Print + 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.39.5