Bugzilla – Attachment 157947 Details for
Bug 33264
Rental fees should show on checkout/detail pages regardless of RentalsInNoissuesCharge
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33264: Add information about both blocking/non-blocking fines/fees to blocked-fines.inc
Bug-33264-Add-information-about-both-blockingnon-b.patch (text/plain), 5.16 KB, created by
Lucas Gass (lukeg)
on 2023-10-26 18:57:18 UTC
(
hide
)
Description:
Bug 33264: Add information about both blocking/non-blocking fines/fees to blocked-fines.inc
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-10-26 18:57:18 UTC
Size:
5.16 KB
patch
obsolete
>From 1eb8f431f48192d94b4f0cc6016b032a74d7d8e7 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 26 Oct 2023 18:52:24 +0000 >Subject: [PATCH] Bug 33264: Add information about both blocking/non-blocking > fines/fees to blocked-fines.inc > >1. Go to Administration > Item types and add a rental charge to an item type. >2. Check out some items of that type to a patron. >3. Go to Debit Types -> RENT and check "Included in noissuescharge?" >3. Now you will see those rental changes on both the checkout and detail pages, checkouts are blocked >4. Go to Debit Types -> RENT and uncheck "Included in noissuescharge?" >5. Now you see no information about the rental charges on the checkout/detail pages. >6. APPLY PATCH, restart services >7. Now check the morememember.pl and cicruclation.pl pages. You should see information about both blocking/non-blocking charges on both of the pages. >8. Turn on BatchCheckout >9. Now from the patrons batch checkout screen make sure the information appears for both blocking/non-blocking charges. >--- > circ/circulation.pl | 5 ++++- > koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc | 7 +++++-- > .../intranet-tmpl/prog/en/includes/patron_messages.inc | 1 - > members/moremember.pl | 7 ++++++- > 4 files changed, 15 insertions(+), 5 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index d68eb1ce5f8..d854cc01765 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -491,10 +491,13 @@ if ( $patron ) { > $noissues = 1; > } > my $account = $patron->account; >- if( ( my $owing = $account->non_issues_charges ) > 0 ) { >+ my $owing = $account->non_issues_charges; >+ my $issues_charges = $balance - $owing; >+ if( $owing > 0 || $issues_charges > 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( >+ fees => $issues_charges, > charges => 1, > chargesamount => $owing, > ) >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 b53f98d2f65..fcf597289cc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc >@@ -1,12 +1,15 @@ > [% USE Price %] > [% SET NoIssuesCharge = Koha.Preference('noissuescharge') %] >-[% IF fines and fines > 0 %] >+[% IF fines and fines > 0 || fees and fees > 0 %] > <li> > <span class="circ-hlt">Charges:</span> >- <span>Patron has outstanding charges of [% fines | $Price %].</span> >+ <span>Patron has outstanding charges of [% fines | $Price %] that count towards blocking.</span> > [% IF !Koha.Preference('AllowFineOverride') && NoIssuesCharge && fines > NoIssuesCharge %] > <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span> > [% END %] >+ [% IF fees and fees > 0 %] >+ <span>Patron has outstanding fees of [% fees | $Price %] that do not count towards blocking. </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> >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 ca7e80a4b97..3854954602f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -98,7 +98,6 @@ > [% IF age_limitations %] > [% INCLUDE 'category-out-of-age-limit.inc' %] > [% END %] >- > [% IF ( charges ) %] > [% INCLUDE 'blocked-fines.inc' fines = chargesamount %] > [% END %] >diff --git a/members/moremember.pl b/members/moremember.pl >index 97703648047..c7672940f84 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -241,10 +241,14 @@ my $issues = $patron->checkouts; > my $balance = 0; > $balance = $patron->account->balance; > >+ > my $account = $patron->account; >-if( ( my $owing = $account->non_issues_charges ) > 0 ) { >+my $owing = $account->non_issues_charges; >+my $issues_charges = $balance - $owing; >+if ( $owing > 0 || $issues_charges > 0 ) { > my $noissuescharge = C4::Context->preference("noissuescharge") || 5; # FIXME If noissuescharge == 0 then 5, why?? > $template->param( >+ fees => $issues_charges, > charges => 1, > chargesamount => $owing, > ) >@@ -288,6 +292,7 @@ elsif ( $patron->is_going_to_expire ) { > > my $has_modifications = Koha::Patron::Modifications->search( { borrowernumber => $borrowernumber } )->count; > >+ > $template->param( > patron => $patron, > issuecount => $patron->checkouts->count, >-- >2.30.2
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 33264
: 157947