From: Jeff Davis Date: Thu, 27 Apr 2017 20:54:12 +0000 (-0700) Subject: LP#1647852: Use correct method during adjust to zero on negative balance X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7b9c44dbd11965a8475bbf589560642621ed1aeb;p=Evergreen.git LP#1647852: Use correct method during adjust to zero on negative balance Implementing Brent Mills' suggestion on Launchpad. Signed-off-by: Jeff Davis Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm index 4b27e221f5..22d37a996a 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm @@ -966,7 +966,7 @@ sub _rebill_xact { if ($U->is_true($billing->voided)) { $amount = $billing->amount; } else { # adjusted billing - map { $amount = $U->fpadd($amount, $_->amount) } @{$billing->adjustments}; + map { $amount = $U->fpsum($amount, $_->amount) } @{$billing->adjustments}; } my $evt = $CC->create_bill( $e, @@ -989,7 +989,7 @@ sub _is_fully_adjusted { my ($billing) = @_; my $amount_adj = 0; - map { $amount_adj = $U->fpadd($amount_adj, $_->amount) } @{$billing->adjustments}; + map { $amount_adj = $U->fpsum($amount_adj, $_->amount) } @{$billing->adjustments}; return $billing->amount == $amount_adj; }