Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9204

Cancelled OrderItems are still included in orderGrandTotal

    Details

      Description

      Cancelled OrderItems are still included in the calculation of the order price.

      Tested with release 16.11, revision: 1781126
      Steps to reproduce:
      1. Setup a fresh OFBiz and do loadDefault
      2. Go to the Order Manager and cancel the only existing demo order named DEMO10090 here: https://localhost:8443/ordermgr/control/orderview?orderId=DEMO10090
      3. The "Total Due" at the bottom right still states 38.36$. It should be 0$ because all the items got cancelled.

      The error is probably in OrderView.groovy line 119: OrderReadHelper.getOrderGrandTotal(orderItems, orderAdjustments)
      This method apparently includes cancelled OrderItems in the grandTotal.

      1. OFBIZ-9204.patch
        0.7 kB
        Maurice Meyer

        Activity

        Hide
        mbrohl Michael Brohl added a comment -

        Hi Maurice,

        thanks for bringing this up. Is it possible for you to provide a patch for this issue?

        Thanks and regards,

        Michael

        Show
        mbrohl Michael Brohl added a comment - Hi Maurice, thanks for bringing this up. Is it possible for you to provide a patch for this issue? Thanks and regards, Michael
        Hide
        deepak.dixit Deepak Dixit added a comment -

        Hi Maurice,

        Better fix is to use OrderReadHelper method directly to get grandTotal.

        orh,getOrderGrandTotal()
        

        You can create patch with these changes.

        Show
        deepak.dixit Deepak Dixit added a comment - Hi Maurice, Better fix is to use OrderReadHelper method directly to get grandTotal. orh,getOrderGrandTotal() You can create patch with these changes.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        I guess Deepak means

        orderReadHelper.getOrderGrandTotal()

        Show
        jacques.le.roux Jacques Le Roux added a comment - I guess Deepak means orderReadHelper.getOrderGrandTotal()
        Hide
        mauricemeyer Maurice Meyer added a comment - - edited

        With the suggestion from Deepak / Jacques it works. Thanks!

        I noticed one more thing, but that doesn't belong to this ticket: The orderGrandTotal is - 0.04$ instead of 0$. This is because of some tax adjustment OFBiz tries to undo when cancelling the order.

        Show
        mauricemeyer Maurice Meyer added a comment - - edited With the suggestion from Deepak / Jacques it works. Thanks! I noticed one more thing, but that doesn't belong to this ticket: The orderGrandTotal is - 0.04$ instead of 0$. This is because of some tax adjustment OFBiz tries to undo when cancelling the order.
        Hide
        mbrohl Michael Brohl added a comment -

        Thanks Maurice,

        your patch is in

        trunk r1781979
        release16.11 r1781979
        release 15.12 r1781982
        release 14.12 r1781983

        Show
        mbrohl Michael Brohl added a comment - Thanks Maurice, your patch is in trunk r1781979 release16.11 r1781979 release 15.12 r1781982 release 14.12 r1781983
        Hide
        mauricemeyer Maurice Meyer added a comment -

        Great, thanks for comitting.

        What about the tax issue? With the patch applied the "Total Due" of the cancelled order "DEMO10090" is - 0.04$. That's not working as intended, is it? Should a new Ticket be opened for that?

        Show
        mauricemeyer Maurice Meyer added a comment - Great, thanks for comitting. What about the tax issue? With the patch applied the "Total Due" of the cancelled order "DEMO10090" is - 0.04$. That's not working as intended, is it? Should a new Ticket be opened for that?
        Hide
        mbrohl Michael Brohl added a comment -

        Yes, please file a new issue, thanks Maurice!

        Show
        mbrohl Michael Brohl added a comment - Yes, please file a new issue, thanks Maurice!

          People

          • Assignee:
            mbrohl Michael Brohl
            Reporter:
            mauricemeyer Maurice Meyer
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development