From: gmc Date: Tue, 18 Jan 2011 22:52:04 +0000 (+0000) Subject: fix glitch that could break invoice proration X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e5653ef369c8a43130cc210eede1b72dd7b1b253;p=evergreen%2Fjoelewis.git fix glitch that could break invoice proration Signed-off-by: Galen Charlton git-svn-id: svn://svn.open-ils.org/ILS/trunk@19195 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Invoice.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Invoice.pm index d0c20d296a..305bd077e3 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Invoice.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Invoice.pm @@ -495,7 +495,7 @@ sub prorate_invoice { my $paid_diff = $full_item_paid - $total_debited; my $cost_diff = $full_item_cost - $total_debited; $logger->info("invoice: repairing prorate descrepency of paid:$paid_diff and cost:$cost_diff"); - my $new_paid = $largest_item->amount + $paid_diff; + my $new_paid = $largest_item->amount_paid + $paid_diff; my $new_cost = $largest_item->cost_billed + $cost_diff; $largest_debit = $e->retrieve_acq_fund_debit($largest_debit->id); # get latest copy