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

Invoice adjustmentsTotal is not updated after a line is created

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Done
    • None
    • 5.1.1
    • None
    • ACQ Sprint 118
    • 1
    • Thunderjet
    • R2 2021 Bugfix

    Description

      Overview:

      src/main/java/org/folio/services/invoice/BaseInvoiceService.java#recalculateInvoiceTotals is doing the opposite of what it is supposed to do, and also has wrong Javadoc.

      According to the Javadoc, it is supposed to return "true if adjustments total, sub total or grand total value is different to original one". What it does is that it returns true if the adjustment total is equal to the original one (without looking at the other totals).

      This has an effect in src/main/java/org/folio/invoices/events/handlers/InvoiceSummary.java : the invoice record is updated when it is not needed, and not updated when it is needed.

      Possible Resolution:

      The result of recalculateInvoiceTotals should be reversed, and the Javadoc updated in recalculateInvoiceTotals and recalculateTotals to reflect the fact that the other totals are ignored.

      TestRail: Results

        Attachments

          1. verification 1.jpg
            verification 1.jpg
            277 kB
          2. verification 2.jpg
            verification 2.jpg
            315 kB
          3. verification 3.jpg
            verification 3.jpg
            311 kB
          4. verification 4.jpg
            verification 4.jpg
            318 kB

          Issue Links

            Activity

              People

                Alex1987 Aleksandr Oleinik
                damieng Damien Guillaume
                Dennis Bridges Dennis Bridges
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases