Bugzilla – Attachment 189694 Details for
Bug 41265
NoIssuesChargeGuarantees and NoIssuesChargeGuarantorsWithGuarantees circulation checks not precise enough
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41265: Checks if NoIssuesChargeGuarantees && NoIssuesChargeGuarantorsWithGuarantees sysprefs limits are not empty
Bug-41265-Checks-if-NoIssuesChargeGuarantees--NoIs.patch (text/plain), 3.28 KB, created by
Thibaud Guillot (thibaud_g)
on 2025-11-19 08:45:50 UTC
(
hide
)
Description:
Bug 41265: Checks if NoIssuesChargeGuarantees && NoIssuesChargeGuarantorsWithGuarantees sysprefs limits are not empty
Filename:
MIME Type:
Creator:
Thibaud Guillot (thibaud_g)
Created:
2025-11-19 08:45:50 UTC
Size:
3.28 KB
patch
obsolete
>From de9ab7a875dcec12a739d446606d4808a295aee3 Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Tue, 18 Nov 2025 17:13:29 +0100 >Subject: [PATCH] Bug 41265: Checks if NoIssuesChargeGuarantees && > NoIssuesChargeGuarantorsWithGuarantees sysprefs limits are not empty > >Test plan: > >1) Create relation between guarantor and guarantees >2) Be sure that one (or both) has outstanding charges >3) Be sure that concerning sysprefs are "empty" / not defined >4) Perform a checkout >5) A warning appears normally, you can fore checkout if you have enough > permission >6) Apply this patch >7) Repeat step 4), no warning appears > >Sponsored-by: BibLibre >--- > C4/Circulation.pm | 4 ++-- > C4/SIP/ILS/Patron.pm | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 0a8df342638..c32ad794df7 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -898,7 +898,7 @@ sub CanBookBeIssued { > > # Check the debt of this patrons guarantees > my $no_issues_charge_guarantees = $patron_borrowing_status->{NoIssuesChargeGuarantees}->{limit}; >- if ( defined $no_issues_charge_guarantees ) { >+ if ( defined $no_issues_charge_guarantees && length($no_issues_charge_guarantees) > 0 ) { > if ( $patron_borrowing_status->{NoIssuesChargeGuarantees}->{overlimit} && !$inprocess && !$allowfineoverride ) { > $issuingimpossible{DEBT_GUARANTEES} = $patron_borrowing_status->{NoIssuesChargeGuarantees}->{charge}; > } elsif ( $patron_borrowing_status->{NoIssuesChargeGuarantees}->{overlimit} >@@ -916,7 +916,7 @@ sub CanBookBeIssued { > > # Check the debt of this patrons guarantors *and* the guarantees of those guarantors > my $no_issues_charge_guarantors = $patron_borrowing_status->{NoIssuesChargeGuarantorsWithGuarantees}->{limit}; >- if ( defined $no_issues_charge_guarantors ) { >+ if ( defined $no_issues_charge_guarantors && length($no_issues_charge_guarantors) > 0 ) { > if ( $patron_borrowing_status->{NoIssuesChargeGuarantorsWithGuarantees}->{overlimit} > && !$inprocess > && !$allowfineoverride ) >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index 1caf2888fe6..db991c909aa 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -118,11 +118,11 @@ sub new { > if ( $patron_charge_limits->{noissuescharge}->{overlimit} ) { > $fine_blocked = 1; > $fines_msg .= " -- " . "Patron blocked by fines" if $fine_blocked; >- } elsif ($noissueschargeguarantorswithguarantees) { >+ } elsif ($noissueschargeguarantorswithguarantees && length($noissueschargeguarantorswithguarantees) > 0) { > $fines_amount = $patron_charge_limits->{NoIssuesChargeGuarantorsWithGuarantees}->{charge}; > $fine_blocked = $patron_charge_limits->{NoIssuesChargeGuarantorsWithGuarantees}->{overlimit}; > $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on related accounts" if $fine_blocked; >- } elsif ($noissueschargeguarantees) { >+ } elsif ($noissueschargeguarantees && length($noissueschargeguarantees) > 0) { > if ( $patron->guarantee_relationships->count ) { > $fines_amount += $patron_charge_limits->{NoIssuesChargeGuarantees}->{charge}; > $fine_blocked = $patron_charge_limits->{NoIssuesChargeGuarantees}->{overlimit}; >-- >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 41265
: 189694