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

Transaction Calculations - Payments/Credits

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.2.0
    • Labels:
      None
    • Template:
    • Sprint:
      ACQ Sprint 76, ACQ Sprint 77, ACQ Sprint 79
    • Story Points:
      5
    • Development Team:
      Thunderjet

      Description

      Overview

      In order to ensure consistency we need to update several running totals upon transaction (allocation, transfer, payment, credit, encumbrance) within a database transaction. This ensures that either all of the records are updated, or none of them are.

      In order to avoid partially paid invoices, we need to apply all payments/credits for an invoice at once. The approach for this is documented on the wiki (see below). When applying the payments we need to make sure that the running totals in budget and ledger are also updated.

      NOTE that this involves creation of a couple new APIs:

      • POST /finance-storage/transaction
      • POST /finance-storage/invoice-transaction-summaries
      • GET /finance-storage/invoice-transaction-summaries/<invoice id>
      • DELETE /finance-storage/invoice-transaction-summaries

      TODO: @cmcnally to provide details on unique indices to help with making this stuff idempotent.
      See MODFISTO-46.

      NOTE: Implied - schema creation: invoice_transaction_summary

      See the following wiki pages for details:
      Calculations
      Preventing Partially Paid Invoices (Overview)
      Preventing Partially Paid Invoices (Spike)

      Acceptance Criteria

      • Running totals in budget and ledger are updated as described on wiki upon transaction
      • All tables involved are updated within a database transaction
      • Unit tests are updated
      • JavaMoney API is used for all calculations

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                cmcnally Craig McNally
                Reporter:
                cmcnally Craig McNally
                Tester Assignee:
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases