Uploaded image for project: 'mod-finance-storage'
  1. mod-finance-storage
  2. MODFISTO-90

Support all-or-nothing operations for pending payments by invoice

    XMLWordPrintable

Details

    • 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

            Activity

              People

                Andrei_Makaranka Andrei Makaranka
                cmcnally Craig McNally
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases