From c9bf321bd90572498186d9ef57d9d7071e5113f5 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 --- 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.20.1