Details
-
Bug
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
None
-
ACQ Sprint 134
-
2
-
Thunderjet
-
Lotus R1 2022
-
Incomplete/missing requirements
Description
Purpose/Overview:
Encumbrances that have been released when an invoice was approved need to be unreleased when the invoice is cancelled.
Requirements/Scope:
- This only applies to invoice lines with releaseEncumbrance=true
- This should only be done if Orders are in the status "Open" and POL payment status is Awaiting payment, Partially paid or Fully paid.
- Update encumbrances to change their status to Unreleased (by calling mod-finance, which should update the budgets accordingly)
Approach:
- Update InvoiceCancelService to unrelease encumbrances at the end of the cancelling process.
- Select all unique po line ids from invoice lines with releaseEncumbrance=true.
- Get the related order lines and orders, filter order lines based on order workflowStatus and order line paymentStatus.
- Use baseTransactionService.getEncumbrancesByPoLineIds to get the encumbrances.
- Change encumbrances status to Unreleased.
- For each order, update order transaction summaries and use baseTransactionService.updateTransactions().
- If an error occurs while doing this, return an error message saying there was an error while unreleasing the encumbrance after cancelling the invoice and include the initial error message.
Acceptance criteria:
- Unit tests updated
- Cross-module integration test cancel-invoice-linked-to-order from
MODFISTO-284updated
TestRail: Results
Attachments
Issue Links
- defines
-
UXPROD-3433 Allow user to cancel invoices
-
- Closed
-
- has to be finished together with
-
MODFIN-236 Missing permissions for payment/credit PUT
-
- Closed
-
- is blocked by
-
MODFISTO-284 Cancel invoice does not update the encumbrance correctly
-
- Closed
-