Browse Source

Bug 25127: Use Koha::Number::Price->round for comparison

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Martin Renvoize 4 years ago
parent
commit
27bc382535
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 2
      C4/Overdues.pm

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

Loading…
Cancel
Save