Bugzilla – Attachment 149571 Details for
Bug 33271
Show information about patron's guarantees charges on patron details page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33271: Add collective owing message to moremember page
Bug-33271-Add-collective-owing-message-to-morememb.patch (text/plain), 2.89 KB, created by
Lucas Gass (lukeg)
on 2023-04-12 17:34:22 UTC
(
hide
)
Description:
Bug 33271: Add collective owing message to moremember page
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-04-12 17:34:22 UTC
Size:
2.89 KB
patch
obsolete
>From de2dee603d12c6378539c1531d51be1a2d3e898e Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 12 Apr 2023 17:29:43 +0000 >Subject: [PATCH] Bug 33271: Add collective owing message to moremember page > >To test: >1. Turn on NoIssuesChargeGuarantorsWithGuarantees and set the amount to 5. >2. Create a guarantor/guarantee relationship. >3. Add a manual invoice to the guarantor that is larger than 5.00. >4. Notice the message on that circulation ( check out tab ) page. " Charges: Patron's guarantors and their other guarantees collectively owe X. Checkouts are BLOCKED because fine balance is OVER THE LIMIT. " >5. Look at the moremember ( details ) page. The same message does not appear. >6. Apply patch, restart_all >7. Try step 5 again, the message should now appear. >--- > .../prog/en/includes/patron_messages.inc | 2 +- > members/moremember.pl | 13 +++++++++++++ > 2 files changed, 14 insertions(+), 1 deletion(-) > >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 19ba6cee80..e52cc6e7b3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -76,7 +76,7 @@ > [% END %] > <a class="btn btn-xs btn-default" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a> > >- [% IF (noissues && CAN_user_circulate_force_checkout) %] >+ [% IF (noissues && CAN_user_circulate_force_checkout && !moremember) %] > <span class="override_debarment"> > <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-xs btn-default">Override restriction temporarily</a> > </span> >diff --git a/members/moremember.pl b/members/moremember.pl >index 6d5b3b2e03..5813c8d87f 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -251,6 +251,19 @@ if( ( my $owing = $account->non_issues_charges ) > 0 ) { > ); > } > >+# Check the debt of this patrons guarantors *and* the guarantees of those guarantors >+my $no_issues_charge_guarantors = C4::Context->preference("NoIssuesChargeGuarantorsWithGuarantees"); >+if ( $no_issues_charge_guarantors ) { >+ my $guarantors_non_issues_charges = $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 }); >+ >+ if ( $guarantors_non_issues_charges > $no_issues_charge_guarantors ) { >+ $template->param( >+ noissues => 1, >+ charges_guarantors_guarantees => $guarantors_non_issues_charges >+ ); >+ } >+} >+ > # if the expiry date is before today ie they have expired > if ( $patron->is_expired ) { > #borrowercard expired, no issues >-- >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 33271
:
149571
|
149699
|
152892