Bugzilla – Attachment 130214 Details for
Bug 29754
Patron fines counted twice for SIP when NoIssuesChargeGuarantorsWithGuarantees is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29754: Don't include patron when fetching guarantees fines
Bug-29754-Dont-include-patron-when-fetching-guaran.patch (text/plain), 2.30 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-02-07 12:03:43 UTC
(
hide
)
Description:
Bug 29754: Don't include patron when fetching guarantees fines
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-02-07 12:03:43 UTC
Size:
2.30 KB
patch
obsolete
>From 9171f125cd5806e99efe15d3a3373ad4a2ecafba Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 22 Dec 2021 15:25:44 +0000 >Subject: [PATCH] Bug 29754: Don't include patron when fetching guarantees > fines > >This patch removes the flag to fetch the patrons own debts as we have already >calculated them > >This test plan highlights another issue - the value of NoIssuesChargeGuarantorsWithGuarantees >is not checked in SIP code - we merely get the total owed including guarantees and compares to >noissuescharge >See bug 29755 > >To test: > 1 - Apply first patch only > 2 - prove t/db_dependent/SIP/Patron.t > 3 - It fails > 4 - Enable NoIssuesChargeGuarantorsWithGuarantees, you can set to 1 > 5 - Create/find a patron > 6 - Add a $10 charge to parons account > 7 - Add a guarantee to patron > 8 - Add a $5 charge to guarantee > 9 - Set noissuescharge to 15.01 >10 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE >11 - Note the 64 message starts with Y's that mean patron is blocked >12 - Patron shouldn't be blocked as under 15.01 >13 - Apply patch >14 - Restart all >15 - repeat 10 >16 - Patron is no longer blocked > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/SIP/ILS/Patron.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index e40dbdbf39..fcd760fa44 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -80,7 +80,7 @@ sub new { > my $fines_amount = $flags->{CHARGES}->{amount}; #TODO Replace with $patron->account->non_issues_charges > $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0; > if ( C4::Context->preference('NoIssuesChargeGuarantorsWithGuarantees') ) { >- $fines_amount += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 }); >+ $fines_amount += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 0 }); > } else { > my $guarantees_fines_amount = $flags->{CHARGES_GUARANTEES} ? $flags->{CHARGES_GUARANTEES}->{amount} : 0; #TODO: Replace with $patron->relationships_debt > $fines_amount += $guarantees_fines_amount; >-- >2.32.0
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 29754
:
128863
|
128864
|
129732
|
129733
|
130213
| 130214 |
130215