From: James Fournie Date: Wed, 7 Dec 2011 19:27:45 +0000 (-0800) Subject: Acq fix for LP#901378 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3f1fb76335f639f218cfeacaeee47f92365e1609;p=Evergreen.git Acq fix for LP#901378 Proratable invoice charges do not have a fund_debit, we need to check for this before attempting to delete the charge. If there's no fund_debit we can generally assume that there's no corresponding debit to this charge and skip trying to delete it. Signed-off-by: James Fournie Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Invoice.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Invoice.pm index 305bd077e3..9d59b6accc 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Invoice.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Invoice.pm @@ -133,7 +133,7 @@ sub build_invoice_api { my $debit = $e->retrieve_acq_fund_debit($item->fund_debit); $debit->encumbrance('t'); $e->update_acq_fund_debit($debit) or return $e->die_event; - } else { + } elsif($item->fund_debit) { $e->delete_acq_fund_debit($e->retrieve_acq_fund_debit($item->fund_debit)) or return $e->die_event; }