MODINVOICE-113, it wad discovered that the awaiting_payment schema needs a couple additional fields: "invoiceId" and "invoiceLineId". These are needed because the encumbrances are created from mod-orders before the invoice exists, so these fields in the encumbrance (transaction) cannot be set at the time of creation. The reference to the invoice is needed for purposes of all-or-nothing operations based on the invoice (awaiting payment, payments, and credits)
The awaiting-payments API should set this field in the encumbrance (transaction) when making the other changes (adjusting encumbered/awaitingPayment). This logic update can be handled in
- the schema and example are updated
- Update the awaitingPayment API to set transaction.sourceInvoiceId and transaction.sourceInvoiceLineId on the encumbrance.
- Update awaitingPayments unit tests (and API tests if needed)
- acq-models submodule in mod-invoice is updated.