Uploaded image for project: 'mod-invoice'
  1. mod-invoice

Insufficient fund validation to approve invoice



    • ACQ Sprint 137, ACQ Sprint 138, ACQ Sprint 139
    • 3
    • Thunderjet
    • Morning Glory (R2 2022)
    • Yes
    • !!!ALL!!!
    • Implementation coding issue



      Fund validation to approve invoice is not taking the fiscal year into account, but mod-finance does take it into account, which can result in an error in the middle of a processing chain. This ticket is about fixing validation so that an error is returned before processing.

      There is an additional issue once the error happens, as mod-finance prevents additional changes. This should be fixed by MODFISTO-268 (which can be done before or after this one).

      Steps to Reproduce:

      • Create order 1
      • Add order line with Fund (Alpha) and an expense class
      • Open order
      • Create order 2
      • Open order
      • Add order line with Fund (POFY 1) no expense class (Note these two funds are for different fiscal years with the same dates)
      • Create invoice
      • Add POL 1 and POL 2
      • Add POL 1 and POL 2 a second time (Now 4 invoice lines)
      • Try to approve invoice (Fail to create pending payment, mod-finance-storage probably returns "Budget not found for pair fiscalYear-fundId")
      • Change Fund ID of Invoice line distributions (Do not remove distributions) for POL 2 to (Beta) no expense class (Same FY as Alpha)
      • Approve invoice (Fail to create pending payment, mod-finance-storage returns "All expected transactions already processed")

      Expected Results:

      An error is returned when first trying to approve the invoice, but then the user can fix the funds and approve the invoice without risking to create an inconsistent state.

      Actual Results:

      An error is returned, and the state of the application is inconsistent. Additionally, until MODFISTO-268 is resolved, user cannot try to fix and approve the invoice again.

      Additional Information:

      Currently mod-invoice is finding the active budget with /finance/funds/{id}/budget. Mod-finance-storage is looking for a budget matching the fund and the fiscal year given by the transaction to create.

      TestRail: Results


          Issue Links



                Andrei_Makaranka Andrei Makaranka
                damieng Damien Guillaume
                Dennis Bridges Dennis Bridges
                0 Vote for this issue
                5 Start watching this issue



                  TestRail: Runs

                    TestRail: Cases