Uploaded image for project: 'mod-invoice'
  1. mod-invoice
  2. MODINVOICE-309

Attempt to pay invoice on different fund from po; can't approve invoice

    XMLWordPrintable

Details

    • ACQ Sprint 126
    • Thunderjet
    • R3 2021 Bug Fix
    • TAMU

    Description

      Overview:

      This error occurs in TAMU's Juniper HF1 instance and has been replicated in the Juniper bugfest instance.

      When linking an invoice to an open continuations purchase order that has a fund assigned, the fund is copied from the po line to the invoice line as the po is linked to the invoice. If a staff member has to change the fund in the invoice to pay on a different fund, which happens frequently, the invoice cannot be approved. Internally, the system responds with the error: "errors: [{message: "Failed to create pending payment", code: "pendingPaymentError", parameters: []}]total_records: 1".

      A review of the mod-invoice.log after the payment attempt shows the error: "POST /finance/pending-payments' request failed. ... PendingPaymentWorkflowService Failed to create pending payment with id null." The json displayed in the mod-invoice.log shows all the data elements necessary to create the pending payment EXCEPT an id. However, when the *_mod_finance_storage.temporary_invoice_transactions is queried, it shows the json for the pending payment and the json includes an id. A query of the *_mod_finance_storage.invoice_transaction_summaries shows a pending payment for the invoice in question.

      JSON has been included for all of the relevant records at various steps in the process; the invoice line has been included twice, before and after fund change. Also, all relevant module logs have been included, as well as the results of two pertinent sql queries.

      Steps to Reproduce:

      1. Log into a Juniper environment
      2. Create an invoice
      3. Add an invoice line, linking the invoice to an open purchase order that has a fund distribution defined in the po.
      4. Go into the newly-added invoice line and change the fund in the fund distribution.
      5. Approve & pay the invoice

      Expected Results:

      Invoice will be approved and appropriate amount deducted from the fund in the invoice line.
      Actual Results:

      Invoice cannot be approved. Attempt to approve creates a "stuck" pending payment record in the *_mod_finance_storage.temporary_invoice_transactions table.
      Additional Information:

      May be related to MODINVOICE-292 in which invoices also get "stuck" and cannot be paid.
      URL:
      Interested parties:

      TestRail: Results

        Attachments

          1. 2021-10-15T150028_po_line.json
            2 kB
          2. 2021-10-15T150028_po-1.json
            1 kB
          3. 2021-10-15T150759_invoice.json
            0.9 kB
          4. 2021-10-15T151217_invoice_line.json
            1 kB
          5. 2021-10-15T151556_invoice_line.json
            1 kB
          6. 2021-10-15T153629_tables.sql
            1 kB
          7. mod-finance.log
            6 kB
          8. mod-finance-storage.log
            21 kB
          9. mod-invoice.log
            14 kB
          10. mod-invoice-storage.log
            2 kB

          Issue Links

            Activity

              People

                andriy_kundyukov Andriy Kundyukov
                hismith Anne L. Highsmith
                Dennis Bridges Dennis Bridges
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases