Bugzilla – Attachment 149152 Details for
Bug 32602
SIP Server doesn't respect IssuingInProcess system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32602: SIP server doesn't respect IssuingInProcess system preference
Bug-32602-SIP-server-doesnt-respect-IssuingInProce.patch (text/plain), 3.99 KB, created by
Alex Buckley
on 2023-04-05 02:00:02 UTC
(
hide
)
Description:
Bug 32602: SIP server doesn't respect IssuingInProcess system preference
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2023-04-05 02:00:02 UTC
Size:
3.99 KB
patch
obsolete
>From ffa85ee7b4da5b1ba4822512be2b90171398b102 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 31 Mar 2023 17:32:58 +0000 >Subject: [PATCH] Bug 32602: SIP server doesn't respect IssuingInProcess system > preference > >The system preference 'IssuingInProcess' when set to "Don't prevent" means patrons will still be allowed to issue items if their rental charge took the patron over the noissuescharge system preference. > >However, SIP returns that a patron is fine blocked (even if 'IssuingInProcess' equals "Don't prevent") when they try to issue items that take them over the noissuecharge amount. > >Test plan: >1. Configure the BK item type to have a rental charge of $2 >2. Configure system preferences: >- noissuescharge = $5 >- IssuingInProcess = Don't prevent >3. From a SIP2 device issue 3 BK items to a borrower and notice after the 2nd item you >cannot issue the third item > >4. Apply patches >5. Restart your SIP2 server >6. From a SIP2 device issue 3 BK items to a different patron and notice you can issue all >three items > >Sponsored-by: Horowhenua District Council, New Zealand >--- > C4/SIP/ILS.pm | 14 ++++++++------ > C4/SIP/ILS/Patron.pm | 8 +++++--- > 2 files changed, 13 insertions(+), 9 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index f33aaee5c48..214e912b4bf 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -140,12 +140,14 @@ sub checkout { > } elsif ($patron->expired) { > $circ->screen_msg("Patron expired on " . output_pref({ dt => dt_from_string( $patron->dateexpiry_iso, 'iso' ), dateonly => 1 })); > } elsif ($patron->fine_blocked) { >- my $message = "Patron has fines"; >- if ($account->{show_outstanding_amount}) { >- my $patron_account = Koha::Account->new( { patron_id => $patron->{borrowernumber} }); >- my $balance = $patron_account->balance; >- if ($balance) { >- $message .= (" - You owe " . Koha::Number::Price->new( $balance )->format({ with_symbol => 1}) . "."); >+ if ( !C4::Context->preference("IssuingInProcess") ) { >+ my $message = "Patron has fines"; >+ if ($account->{show_outstanding_amount}) { >+ my $patron_account = Koha::Account->new( { patron_id => $patron->{borrowernumber} }); >+ my $balance = $patron_account->balance; >+ if ($balance) { >+ $message .= (" - You owe " . Koha::Number::Price->new( $balance )->format({ with_symbol => 1}) . "."); >+ } > } > } > $circ->screen_msg($message); >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index 0aea8ab63c8..596b588f115 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -86,8 +86,10 @@ sub new { > my $fine_blocked = 0; > my $noissueschargeguarantees = C4::Context->preference('NoIssuesChargeGuarantees'); > if( $fines_amount > $fee_limit ){ >- $fine_blocked = 1; >- $fines_msg .= " -- " . "Patron blocked by fines" if $fine_blocked; >+ if ( !C4::Context->preference("IssuingInProcess") ) { >+ $fine_blocked = 1; >+ $fines_msg .= " -- " . "Patron blocked by fines" if $fine_blocked; >+ } > } elsif ( $noissueschargeguarantorswithguarantees ) { > $fines_amount += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 0 }); > $fine_blocked ||= $fines_amount > $noissueschargeguarantorswithguarantees; >@@ -155,7 +157,7 @@ sub new { > if ($_ ne 'NOTES' and $flags->{$_}->{message}) { > $ilspatron{screen_msg} .= " -- " . $flags->{$_}->{message}; # show all but internal NOTES > } >- if ($flags->{$_}->{noissues}) { >+ if ($flags->{$_}->{noissues} && !C4::Context->preference("IssuingInProcess")) { > foreach my $toggle (qw(charge_ok renew_ok recall_ok hold_ok inet)) { > $ilspatron{$toggle} = 0; # if we get noissues, disable everything > } >-- >2.20.1
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 32602
:
145170
|
145249
|
149152
|
149153
|
156808
|
156809
|
157296
|
157297