From 27bc382535dea91f1c5adb353858b2df9ef3f2a3 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 20 Apr 2020 12:09:27 +0100 Subject: [PATCH] Bug 25127: Use Koha::Number::Price->round for comparison Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- C4/Overdues.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index b6773c2cf1..a9de67d1ee 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 Koha::Number::Price->new($maxIncrease)->round <= 0.00; if ($accountline) { if ( ( $amount - $accountline->amount ) > $maxIncrease ) { my $new_amount = $accountline->amount + $maxIncrease; -- 2.39.5