From 8661282c7e316997d86c6ea3cdf6ddb0a0f37ec7 Mon Sep 17 00:00:00 2001 From: lmstrand Date: Fri, 8 Sep 2023 14:02:19 +0300 Subject: [PATCH] Bug 33228 - Show all charges on the patron details and checkout page --- circ/circulation.pl | 6 ++++++ koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc | 3 ++- members/moremember.pl | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 9b925e29ad..687f55bb31 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -257,10 +257,16 @@ if ($patron) { $template->param("returnbeforeexpiry" => 1); } } + + my $account = $patron->account; + my $account_lines = $account->outstanding_debits; + my $total = $account_lines->total_outstanding; + $template->param( overduecount => $overdues->count, issuecount => $issues->count, finetotal => $balance, + total => $total, ); if ( $patron and $patron->is_debarred ) { 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 b53f98d2f6..641d43127a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc @@ -3,7 +3,8 @@ [% IF fines and fines > 0 %]
  • Charges: - Patron has outstanding charges of [% fines | $Price %]. + Patron has outstanding charges of [% fines | $Price with_symbol => 1 %]. + Total (incl. non-blocking): [% total | $Price with_symbol => 1 %]. [% IF !Koha.Preference('AllowFineOverride') && NoIssuesCharge && fines > NoIssuesCharge %] Checkouts are BLOCKED because fine balance is OVER THE LIMIT. [% END %] diff --git a/members/moremember.pl b/members/moremember.pl index 5813c8d87f..890c20e397 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -238,6 +238,13 @@ my $balance = 0; $balance = $patron->account->balance; my $account = $patron->account; +my $account_lines = $account->outstanding_debits; +my $total = $account_lines->total_outstanding; + +$template->param( + total => $total, + ); + if( ( my $owing = $account->non_issues_charges ) > 0 ) { my $noissuescharge = C4::Context->preference("noissuescharge") || 5; # FIXME If noissuescharge == 0 then 5, why?? $template->param( -- 2.25.1