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

Invoice adjustmentsTotal is not updated after a line is created

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.1.1
    • Labels:
      None
    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      ACQ Sprint 118
    • Story Points:
      1
    • Development Team:
      Thunderjet
    • Release:
      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

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

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases