LP#1436906 clean up PO direct charges on delete/cancel user/berick/lp1436906-clear-po-item-debits
authorBill Erickson <berickxx@gmail.com>
Mon, 6 Apr 2015 15:24:33 +0000 (11:24 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 6 Apr 2015 15:43:11 +0000 (11:43 -0400)
commitab6d73b4218132f27ab31e64aab24e0723b8c80b
tree9c010c2f99174248aaa20373dac3fc96cfbd3f10
parent984dfe967eb97afa81e1d5647b75ba1b6d50b7af
LP#1436906 clean up PO direct charges on delete/cancel

1. Deleting a "direct charge" from a PO removes the linked fund_debit if
the fund_debit has not been paid (i.e. it's still encumbered).

If the debit has been paid, the charge cannot be removed, unless/until
the debit is re-encumbered by un-invoicing the charge.

2. When a PO is canceled, fund_debits linked to PO items are removed.
As above, if the debit has been paid (invoiced), the PO cannot be
canceled, unless/until direct charge debits are un-invoiced.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
Open-ILS/web/js/ui/default/acq/po/item_table.js