Bug 22037: Block SIP checkout if guarantees have debt

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2018-12-20 19:39:34 -03:00 committed by Martin Renvoize
parent 9515677afa
commit 2e91d33381
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -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;