Bugzilla – Attachment 190628 Details for
Bug 33228
All charges should be displayed on the patron checkout page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33228: Display all fines on patron details and circulation
Bug-33228-Display-all-fines-on-patron-details-and-.patch (text/plain), 6.02 KB, created by
Nick Clemens (kidclamp)
on 2025-12-18 17:06:01 UTC
(
hide
)
Description:
Bug 33228: Display all fines on patron details and circulation
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-12-18 17:06:01 UTC
Size:
6.02 KB
patch
obsolete
>From 1e40f2bb81126814120b6c3113624d8a36378e4e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 18 Dec 2025 16:42:14 +0000 >Subject: [PATCH] Bug 33228: Display all fines on patron details and > circulation > >This patch adds the patrons total balance to the details and circulation pages >Only showing totla if different from the no account charges > >To test: > 1 - Go to Administration - Debit types > 2 - Add a new type: > Code: BLOCK > Description: Blocking fine > Default amount: 1.00 > Can be manually invoiced: checked > Included in noissuescharge: checked > 3 - Add a new type: > Code: NoBLOCK > Description: NonBlocking fine > Default amount: 1.11 > Can be manually invoiced: checked > Included in noissuescharge: checked > 4 - Find a patron > 5 - Accounting->Create manual invoice > 6 - Add 2 of each type of debit you created > 7 - View patrons 'details' and 'Check out' tabs > 8 - Confirm you see only the 2 blocking fees totaled > 9 - Apply patch >10 - Reload >11 - Confirm you see 'Total balance: 4.22' > Charges: Patron has outstanding charges that may block checkout of 2.00. >12 - Write off the two non-block charges >13 - Confirm you no longer see the 'Total balance' (as it now matches) >14 - Write off the blocking charges and add two non-blocking >15 - Confirm you see the total balance >--- > circ/circulation.pl | 4 ++++ > .../prog/en/includes/blocked-fines.inc | 15 ++++++++++----- > .../prog/en/includes/patron_messages.inc | 6 +++--- > members/moremember.pl | 5 +++++ > 4 files changed, 22 insertions(+), 8 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index dddd2a1f5f9..ddcdb4adf7d 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -643,6 +643,10 @@ if ($patron) { > $noissues = 1; > } > >+ my $account_balance = $patron->account->balance(); >+ $template->param( >+ account_balance => $account_balance, >+ ); > my $patron_charge_limits = $patron->is_patron_inside_charge_limits(); > if ( $patron_charge_limits->{noissuescharge}->{charge} > 0 ) { > my $noissuescharge = >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 4868e3cbb4d..63dc53dd49a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc >@@ -1,15 +1,20 @@ > [% USE Price %] > [% USE Categories %] >+[% IF account_balance && account_balance != NoIssueCharge %] >+ <li>Total balance: [% account_balance | $Price %]</li> >+[% END %] > [% IF NoIssuesCharge and NoIssuesCharge > 0 %] > <li> > <span class="circ-hlt">Charges:</span> >- <span>Patron has outstanding charges of [% NoIssuesCharge | $Price %].</span> >+ <span>Patron has outstanding charges that may block checkouts of [% NoIssuesCharge | $Price %].</span> > [% IF !Koha.Preference('AllowFineOverride') && NoIssuesCharge.limit && NoIssuesCharge.overlimit %] > <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span> > [% END %] >- [% IF CAN_user_updatecharges_remaining_permissions %] >- <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default btn-xs">Make payment</a> >- <a href="/cgi-bin/koha/members/paycollect.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default btn-xs">Pay all charges</a> >- [% END %] > </li> > [% END %] >+<li> >+ [% IF CAN_user_updatecharges_remaining_permissions %] >+ <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default btn-xs">Make payment</a> >+ <a href="/cgi-bin/koha/members/paycollect.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default btn-xs">Pay all charges</a> >+ [% END %] >+</li> >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 93ce0b53bed..343d2f302c6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -5,7 +5,7 @@ > [% SET return_claims = patron.return_claims %] > [% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %] > >-[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || credits || patron.account_locked ) %] >+[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || limited_category || account_balance || charges || charges_guarantors_guarantees || charges_guarantees || credits || patron.account_locked ) %] > <h3>Attention</h3> > <ul> > [% IF ( has_modifications ) %] >@@ -144,8 +144,8 @@ > </li> > [% END %] > >- [% IF ( charges ) %] >- [% INCLUDE 'blocked-fines.inc' NoIssuesCharge = chargesamount %] >+ [% IF ( charges || account_balance ) %] >+ [% INCLUDE 'blocked-fines.inc' NoIssuesCharge = chargesamount account_balance = account_balance %] > [% END %] > > [% IF ( charges_guarantors_guarantees ) %] >diff --git a/members/moremember.pl b/members/moremember.pl >index 9cf8574e101..25da30196af 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -240,6 +240,11 @@ if ( $patron->has_overdues ) { > } > my $issues = $patron->checkouts; > >+my $account_balance = $patron->account->balance(); >+$template->param( >+ account_balance => $account_balance, >+); >+ > my $patron_charge_limits = $patron->is_patron_inside_charge_limits(); > if ( $patron_charge_limits->{noissuescharge}->{charge} > 0 ) { > $template->param( >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33228
:
155404
|
155409
|
155410
|
155411
|
190628
|
190643