Details
-
Story
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
-
ACQ Sprint 89
-
5
-
Thunderjet
Description
Overview
With the introduction of pending payments being created upon invoice approval (see MODINVOICE-140), adjustments need to be made to accommodate this.
In order to ensure consistency we need to update several running totals upon pending payment transaction within a database transaction. This ensures that either all of the records are updated, or none of them are.
In order to avoid partially approved invoices, we need to apply all awaiting payments for an invoice at once. The approach for this is documented on the wiki (see below). When applying the pending payments we need to make sure that the running totals in related encumbrances, budget and ledger are also updated.
Approach
- rename the invoice_transaction_summaries.numEncumbrances field to the invoice_transaction_summaries.numPendingPayments
- upon POST /finance-storage/transactions w/ transaction.type = Pending payment:
- apply all or nothing logic based on the invoice_transaction_summaries.numPendingPayments with following calculations - wiki
- update logic of POST /finance-storage/transactions w/ transaction.type = Payment/Credit according to wiki
Acceptance Criteria
- All or nothing processing for pending payments creation added
- Payment/Credit creation logic updated
- invoice_transaction_summary schema and example are updated
- Unit tests updated
TestRail: Results
Attachments
Issue Links
- blocks
-
MODFISTO-108 MODFISTO (mod-finance-storage) release
-
- Closed
-
- has to be done after
-
MODFISTO-89 Transaction schema changes to support creation pending_payment upon invoice approval
-
- Closed
-
- has to be done before
-
MODFISTO-106 Data migration scripts for schema changes
-
- Closed
-
-
MODFISTO-107 Cross-module data migration scripts for pending payments logic
-
- Closed
-
-
UIF-217 support Pending payment transaction details
-
- Closed
-
- has to be finished together with
-
MODINVOICE-140 Create Pending payments upon invoice transition to approved
-
- Closed
-
- relates to
-
UXPROD-2393 Set money aside as awaiting payment for Invoices that are 'Approved'
-
- Closed
-