Bugzilla – Attachment 109635 Details for
Bug 19382
Add ability to block guarantees based on fees owed by guarantor and other guarantees
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19382: Add blocking of ability to checkout on circulation.pl
Bug-19382-Add-blocking-of-ability-to-checkout-on-c.patch (text/plain), 5.85 KB, created by
Kyle M Hall (khall)
on 2020-09-03 18:27:56 UTC
(
hide
)
Description:
Bug 19382: Add blocking of ability to checkout on circulation.pl
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-09-03 18:27:56 UTC
Size:
5.85 KB
patch
obsolete
>From e6d4e69818290be600c24d32e06e4139c58e7b76 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 24 Jul 2020 09:00:12 -0400 >Subject: [PATCH] Bug 19382: Add blocking of ability to checkout on > circulation.pl > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > circ/circulation.pl | 13 ++++++++ > .../prog/en/modules/circ/circulation.tt | 14 ++++++-- > .../circ/circulation_batch_checkouts.tt | 32 ++++++++++++------- > 3 files changed, 44 insertions(+), 15 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 293b1ae4c0..2eb9ecd235 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -494,6 +494,19 @@ if ( $patron ) { > ); > } > >+ # 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_guaranor => 0, include_this_patron => 1 }); >+ >+ if ( $guarantors_non_issues_charges > $no_issues_charge_guarantors ) { >+ $template->param( >+ charges_guarantors_guarantees => $guarantors_non_issues_charges >+ ); >+ $noissues = 1 unless C4::Context->preference("allowfineoverride"); >+ } >+ } >+ > my $no_issues_charge_guarantees = C4::Context->preference("NoIssuesChargeGuarantees"); > $no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees ); > if ( defined $no_issues_charge_guarantees ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 2d504b3f01..aaa5a68b84 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -764,14 +764,22 @@ > <li><span class="circ-hlt return-claims">Return claims: Patron has [% return_claims.count | html %] RETURN CLAIMS.</span> > [% END %] > >- [% IF ( charges ) %] >- [% INCLUDE 'blocked-fines.inc' fines = chargesamount %] >- [% END %] > > [% IF age_limitations %] > [% INCLUDE 'category-out-of-age-limit.inc' %] > [% END %] > >+ [% IF ( charges ) %] >+ [% INCLUDE 'blocked-fines.inc' fines = chargesamount %] >+ [% END %] >+ [% IF ( charges_guarantors_guarantees ) %] >+ <li> >+ <span class="circ-hlt">Charges:</span> Patron's guarantors and their other guarantees collectively owe [% charges_guarantors_guarantees | $Price %]. >+ [% IF noissues %] >+ <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span> >+ [% END %] >+ </li> >+ [% END %] > [% IF ( charges_guarantees ) %] > <li> > <span class="circ-hlt">Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %]. >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >index 8483d5763b..c6ea668bd8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >@@ -46,18 +46,26 @@ > <div class="dialog alert">You are not allowed to use batch checkout for this patron</div> > [% ELSIF patron and noissues and not checkout_infos %] > <div class="dialog alert"> >- Cannot check out! >- [% IF charges %] >- <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span> >- [% END %] >- [% IF charges_guarantees %] >- <li> >- <span class="circ-hlt">Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %]. >- </li> >- <li> >- <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span> >- </li> >- [% END %] >+ Cannot check out! >+ [% IF ( charges ) %] >+ [% INCLUDE 'blocked-fines.inc' fines = chargesamount %] >+ [% END %] >+ [% IF ( charges_guarantors_guarantees ) %] >+ <li> >+ <span class="circ-hlt">Charges:</span> Patron's guarantors and their other guarantees collectively owe [% charges_guarantors_guarantees | $Price %]. >+ [% IF noissues %] >+ <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span> >+ [% END %] >+ </li> >+ [% END %] >+ [% IF ( charges_guarantees ) %] >+ <li> >+ <span class="circ-hlt">Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %]. >+ [% IF noissues %] >+ <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span> >+ [% END %] >+ </li> >+ [% END %] > </div> > [% ELSIF patron and not checkout_infos %] > <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl"> >-- >2.24.1 (Apple Git-126)
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 19382
:
97234
|
97235
|
97303
|
99196
|
102090
|
106534
|
107344
|
109210
|
109211
|
109349
|
109357
|
109634
|
109635
|
109636
|
109841
|
109937
|
111570
|
111571
|
111572
|
111573
|
111574
|
111609