LP#1436906 clean up PO direct charges on delete/cancel user/kmlussier/lp1436906-clear-po-item-debits
authorBill Erickson <berickxx@gmail.com>
Mon, 6 Apr 2015 15:24:33 +0000 (11:24 -0400)
committerKathy Lussier <klussier@masslnc.org>
Tue, 7 Apr 2015 02:06:01 +0000 (22:06 -0400)
commit811a515e2f8f6d6f9b25a1e32562b2e748b50c52
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>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
Open-ILS/web/js/ui/default/acq/po/item_table.js