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

Update Pending payments when exchange rate is edited

    XMLWordPrintable

    Details

    • Template:
      Thunderjet/Firebird Back-end Story Template
    • Sprint:
      ACQ Sprint 97
    • Story Points:
      3
    • Development Team:
      Thunderjet

      Description

      Overview:

      Balancing payment and credit amounts with real world transactions is virtually impossible when exchange rates are involved as the rate is constantly changing. As a result often the rate is not set in stone until the transaction is made by the accounting system.This means the exchange rate could be edited in the invoice until the invoice/voucher is marked as "Paid". The rate will need to be updated by a user or possibly an external system when awaiting payment, as part of paying the voucher/invoice.

      API for getting ROE(Rate of exchange) is added in scope of MODFIN-111 - Exchange rate API(Closed)

      Approach

      If exchange rate is changed after invoice approval:

      • update invoice transaction summary
      • check that is enough money in budgets
      • update pending payments

      Acceptance criteria:

      logic updated
      API test updated
      Unit test updated

      Acceptance test cases

      Case1:
      Given user has permission to edit invoice
      When clicking edit, as long as the status is NOT Paid
      Then user is able to change exchange rate and click save

      Case2:
      Given user is editing exchange rate
      And invoice already approved
      When clicking save
      Then

      • system will check that there is enough money in Funds to make the update to Pending payments'. See MODFISTO-89
      • system will update voucher and voucher lines created upon invoice approval. (In scope of MODINVOICE-123)
        IF not the action will be stopped and user will be show an error message
        IF successful the form will be dismissed and user shown success message

      Case3:
      Given user has permission to create invoice
      When user open form for invoice creation
      Then UI ask BE for the most recent exchange rate
      And Put exchange rate as initial value

      Case4:
      Given user has permission to approve the invoice
      When user approve the invoice
      Then BE checks, that exchange rate is not proposed by user(exchangeRate = null)
      And exchange rate is got from BE side
      And If enough money in Funds
      And System approve the invoice

      Case5:
      Given user has permission to approve for the invoice
      When user approve for the invoice
      Then BE checks, that exchange rate is proposed by user(exchangeRate != null)
      And If enough money in Funds
      And System approve for the invoice

        TestRail: Results

          Attachments

          1. screenshot-3.png
            screenshot-3.png
            24 kB
          2. screenshot-2.png
            screenshot-2.png
            63 kB
          3. screenshot-1.png
            screenshot-1.png
            82 kB

            Issue Links

              Activity

                People

                Assignee:
                siarhei_hrabko Siarhei Hrabko
                Reporter:
                aliaksandr_pautau Aliaksandr Pautau
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases