From 132b22bbfa3e429468d7b3e8ac6062dfd22d7f08 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Fri, 14 Jun 2024 14:47:07 +0000 Subject: [PATCH] Bug 28924: (QA follow-up): Remove unnecessary template method Sponsored-by: Cuyahoga County Public Library Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer --- Koha/Template/Plugin/Categories.pm | 6 ------ koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc | 5 ++--- .../intranet-tmpl/prog/en/includes/patron_messages.inc | 2 +- .../prog/en/modules/circ/circulation_batch_checkouts.tt | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Koha/Template/Plugin/Categories.pm b/Koha/Template/Plugin/Categories.pm index 4b7c9c6e5d..4d425d6f9e 100644 --- a/Koha/Template/Plugin/Categories.pm +++ b/Koha/Template/Plugin/Categories.pm @@ -45,12 +45,6 @@ sub can_any_reset_password { : 0; } -sub GetPatronCharges { - my ( $self, $params ) = @_; - my $charges = Koha::Patron->is_patron_inside_charge_limits({ borrowernumber => $params }); - return $charges->{noissuescharge}; -} - 1; =head1 NAME diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc index 3e103ff770..42cbfb6cd7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc @@ -1,10 +1,9 @@ [% USE Price %] [% USE Categories %] -[% SET NoIssuesCharge = Categories.GetPatronCharges(borrowernumber) %] -[% IF NoIssuesCharge.charge and NoIssuesCharge.charge > 0 %] +[% IF NoIssuesCharge and NoIssuesCharge > 0 %]
  • Charges: - Patron has outstanding charges of [% NoIssuesCharge.charge | $Price %]. + Patron has outstanding charges of [% NoIssuesCharge | $Price %]. [% IF !Koha.Preference('AllowFineOverride') && NoIssuesCharge.limit && NoIssuesCharge.overlimit %] Checkouts are BLOCKED because fine balance is OVER THE LIMIT. [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc index 38a0fb7c5c..6c87647b42 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc @@ -119,7 +119,7 @@ [% END %] [% IF ( charges ) %] - [% INCLUDE 'blocked-fines.inc' borrowernumber = patron.borrowernumber %] + [% INCLUDE 'blocked-fines.inc' NoIssuesCharge = chargesamount %] [% END %] [% IF ( charges_guarantors_guarantees ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt index 3beb6d14af..a51299356f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt @@ -63,7 +63,7 @@
    Cannot check out! [% IF ( charges ) %] - [% INCLUDE 'blocked-fines.inc' borrowernumber = patron.borrowernumber %] + [% INCLUDE 'blocked-fines.inc' NoIssuesCharge = chargesamount %] [% END %] [% IF ( charges_guarantors_guarantees ) %]
  • -- 2.39.5