Bugzilla – Attachment 149290 Details for
Bug 33411
SIP2 includes other guarantees with the same guarantor when calculating against NoIssuesChargeGuarantees
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33411: Don't count related guarantees fees against NoIssuesChargeGuarantees
Bug-33411-Dont-count-related-guarantees-fees-again.patch (text/plain), 2.09 KB, created by
Nick Clemens (kidclamp)
on 2023-04-07 18:57:33 UTC
(
hide
)
Description:
Bug 33411: Don't count related guarantees fees against NoIssuesChargeGuarantees
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-04-07 18:57:33 UTC
Size:
2.09 KB
patch
obsolete
>From 4dbc2c07da1f272234fe597e67ab54fa4523bb9d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 7 Apr 2023 18:50:25 +0000 >Subject: [PATCH] Bug 33411: Don't count related guarantees fees against > NoIssuesChargeGuarantees > >To test: > 1 - Find an adult patron in Koha > 2 - Add two guarantees > 3 - Add $1 fine to parent, $5 fine to each guarantee > 4 - Set no issues charge guarantees to 10 > 5 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE > 6 - Note the 64 message starts with Y's that mean patron is blocked > 7 - Repeat with each child barcode > 8 - They are blocked? > 9 - Apply patch, restart all >10 - Try again >11 - Parent blocked, children should not be >--- > C4/SIP/ILS/Patron.pm | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index 0aea8ab63c..33de77e387 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -93,9 +93,11 @@ sub new { > $fine_blocked ||= $fines_amount > $noissueschargeguarantorswithguarantees; > $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on related accounts" if $fine_blocked; > } elsif ( $noissueschargeguarantees ) { >- $fines_amount += $patron->relationships_debt({ include_guarantors => 0, only_this_guarantor => 0, include_this_patron => 0 }); >- $fine_blocked ||= $fines_amount > $noissueschargeguarantees; >- $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on guaranteed accounts" if $fine_blocked; >+ if( $patron->guarantee_relationships->count ){ >+ $fines_amount += $patron->relationships_debt({ include_guarantors => 0, only_this_guarantor => 1, include_this_patron => 0 }); >+ $fine_blocked ||= $fines_amount > $noissueschargeguarantees; >+ $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on guaranteed accounts" if $fine_blocked; >+ } > } > > my $circ_blocked =( C4::Context->preference('OverduesBlockCirc') ne "noblock" && defined $flags->{ODUES}->{itemlist} ) ? 1 : 0; >-- >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 33411
:
149289
|
149290
|
149292
|
149293
|
151271
|
151272
|
151278
|
151279
|
151951
|
151970
|
151971
|
151972