From 86d7b100d7ac474186f44e8b96f8a1c594ab3a18 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 Signed-off-by: Joy Nelson --- C4/Overdues.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index e0cb17a3de..8483a35d4c 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -553,7 +553,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