From 0faef1a244537a5f090fb314ed77a63767a46dd0 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 22 Aug 2019 09:25:54 -0400 Subject: [PATCH] Bug 22037: (QA follow-up) Implement use of CHARGES_GUARANTEES Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize (cherry picked from commit 9a5e519d70c168bb44cfea2d8a4490fad9049ab8) Signed-off-by: Fridolin Somers --- C4/SIP/ILS/Patron.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm index 07b6d3f5ce..3f5bfe21d4 100644 --- a/C4/SIP/ILS/Patron.pm +++ b/C4/SIP/ILS/Patron.pm @@ -65,8 +65,12 @@ sub new { $dob and $dob =~ s/-//g; # YYYYMMDD my $dexpiry = $kp->{dateexpiry}; $dexpiry and $dexpiry =~ s/-//g; # YYYYMMDD + 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 $guarantees_fines_amount = $flags->{CHARGES_GUARANTEES} ? $flags->{CHARGES_GUARANTEES}->{amount} : 0; + $fines_amount += $guarantees_fines_amount; + my $fee_limit = _fee_limit(); my $fine_blocked = $fines_amount > $fee_limit; my $circ_blocked =( C4::Context->preference('OverduesBlockCirc') ne "noblock" && defined $flags->{ODUES}->{itemlist} ) ? 1 : 0; -- 2.39.5