Acq: re-use more code for two ways of creating invoices (EDI and manual)
This solves two problems.
1) With EDI invoices, we had been failing to disencumber fund debits
related to the invoiced lineitems, although that worked for manual
invoices.
2) With manual invoices, we would not automatically uncancel copies
when the user decided to invoice them despite their canceled status.
This was already working in EDI invoices though. This is especially
important since our schema lumps "backordered" in with "canceled,"
and in theory backordered things do show up eventually.
There were earlier version of this commit out there with bugs that
prevented the EDI workflow from working correctly (the manual invoice
flow worked and still should).
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>