From 9a2a8a8234a6a8580deba19a0fbd754c72110f61 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 20 Dec 2018 19:39:34 -0300 Subject: [PATCH] Bug 22037: Block SIP checkout if guarantees have debt Signed-off-by: Kyle M Hall Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize (cherry picked from commit 2e91d33381cb29da30bfe16f022f1d07fe2b327f) Signed-off-by: Fridolin Somers (cherry picked from commit b74949a821944384df3e319d43e35f3c124f40a7) Signed-off-by: Lucas Gass --- 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 34866508e3..07b6d3f5ce 100644 --- a/C4/SIP/ILS/Patron.pm +++ b/C4/SIP/ILS/Patron.pm @@ -65,7 +65,7 @@ sub new { $dob and $dob =~ s/-//g; # YYYYMMDD my $dexpiry = $kp->{dateexpiry}; $dexpiry and $dexpiry =~ s/-//g; # YYYYMMDD - my $fines_amount = $patron->account->balance; + my $fines_amount = $flags->{CHARGES}->{amount}; # This "amount" is the negative balance or the one of the guarantees $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0; my $fee_limit = _fee_limit(); my $fine_blocked = $fines_amount > $fee_limit; -- 2.39.5