Bugzilla – Attachment 151279 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.16 KB, created by
David Nind
on 2023-05-16 12:49:56 UTC
(
hide
)
Description:
Bug 33411: Don't count related guarantees fees against NoIssuesChargeGuarantees
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-05-16 12:49:56 UTC
Size:
2.16 KB
patch
obsolete
>From 7abfcbdd3ef034dedaeef5922f1922d8ce9715b4 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 9 > 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 (restart_all will restart SIP) >10 - Try again >11 - Parent blocked, children should not be > >Signed-off-by: David Nind <david@davidnind.com> >--- > 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