LP#1436906 clean up PO direct charges on delete/cancel
authorBill Erickson <berickxx@gmail.com>
Mon, 6 Apr 2015 15:24:33 +0000 (11:24 -0400)
committerBen Shum <bshum@biblio.org>
Fri, 10 Apr 2015 02:05:01 +0000 (22:05 -0400)
commitbe766fb0e06b946aa0eb83738a303433ed46be85
tree2a47d26ed82fc0919bd2d829d44c55e64b01da26
parent41054e3873084f49e50bdfce297bd7f8329d88ba
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>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
Open-ILS/web/js/ui/default/acq/po/item_table.js