From a4e14d39e4704053fcd287497171dd7eee11ed99 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 in intranet --- circ/circulation.pl | 11 ++++++++++- .../intranet-tmpl/prog/en/includes/blocked-fines.inc | 3 ++- members/moremember.pl | 10 +++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 9b925e29ad..4e74586fb6 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -257,6 +257,7 @@ if ($patron) { $template->param("returnbeforeexpiry" => 1); } } + $template->param( overduecount => $overdues->count, issuecount => $issues->count, @@ -473,7 +474,15 @@ if ( $patron ) { $noissues = 1; } my $account = $patron->account; - if( ( my $owing = $account->non_issues_charges ) > 0 ) { + my $account_lines = $account->outstanding_debits; + my $total = $account_lines->total_outstanding; + + $template->param( + total => $total, + ); + + my $owing = $account->non_issues_charges; + if( ( $total ) > 0 ) { my $noissuescharge = C4::Context->preference("noissuescharge") || 5; # FIXME If noissuescharge == 0 then 5, why?? $noissues ||= ( not C4::Context->preference("AllowFineOverride") and ( $owing > $noissuescharge ) ); $template->param( 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..fccbca319e 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -238,7 +238,15 @@ my $balance = 0; $balance = $patron->account->balance; my $account = $patron->account; -if( ( my $owing = $account->non_issues_charges ) > 0 ) { +my $account_lines = $account->outstanding_debits; +my $total = $account_lines->total_outstanding; + +$template->param( + total => $total, + ); + +my $owing = $account->non_issues_charges; +if( ( $total ) > 0 ) { my $noissuescharge = C4::Context->preference("noissuescharge") || 5; # FIXME If noissuescharge == 0 then 5, why?? $template->param( charges => 1, -- 2.25.1