From 349908509e140e30121a9315f032bded9a077b53 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 20 Apr 2020 12:02:20 +0200 Subject: [PATCH] Bug 25127: Compare with 2 decimals --- C4/Overdues.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index b6773c2cf1..4acec4f0b1 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -559,7 +559,7 @@ sub UpdateFine { if ( my $maxfine = C4::Context->preference('MaxFine') ) { my $maxIncrease = $maxfine - $total_amount_other; - return if $maxIncrease <= 0.00; + return if sprintf("%.2f", $maxIncrease) <= 0.00; if ($accountline) { if ( ( $amount - $accountline->amount ) > $maxIncrease ) { my $new_amount = $accountline->amount + $maxIncrease; -- 2.20.1