OFBiz
  1. OFBiz
  2. OFBIZ-1866

Problems in order items cancellation and update

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: SVN trunk
    • Fix Version/s: SVN trunk
    • Component/s: order
    • Labels:
      None

      Description

      Some problems that occur in order item cancellation and update:

      1. Wrong amount of promo order header adjustment is calculated when cancelling order item.

      How to reproduce: Add 2 item to cart that have promo adjustments, cancel one of the items, you will get promo header adjustment with the amount of all items promo adjustments.

      2. If part of an order item is cancelled then cancelled quantity is not excluded during recalculation of tax and promotions.

      How to reproduce: create an order with one item for example GZ-1000 x 10, then split quantities between 2 ship groups - ship group 00001 = 5 and 00002 = 5, use DemoCustCompany as a buyer, use CA, USA for ship address for both ship groups. Then cancel one of the ship gorups. After that update the order(you can simply push "update items" button without any specific changes). Tax and promotional adjustments are not recalculated properly when updating the order.

      3. Order grand total, order sub total and order tax total are not displayed properly in view order screen. These values include also canceled item adjustment amounts.

      How to reproduce: Create an order with DemoCustCompany buyer that contains 2 order items. E.g. GZ-1000 x 5 and GZ-1001 x 5. Use CA, USA for ship address. Then cancel one of the order items. OrderHeader.grandTotal and OrderHeader.remainingSubTotal fields will have different amounts from that displayed on the view order screen.

      4. Order item cancellation creates strange balancing order header adjustments that reduce the amount of the cancelled order item adjustments. These adjustments are deleted after subsequent updates of the order.

      5. The problem regarding update of an order that have partial invoiced order items is still present.
      You can try this by creating order with 2 order items and 2 different ship groups. Then ship items from one of the ship groups. Then try to edit the price or quantity of the other(not shipped) item.
      This is happening because update of order items is connected to creation of shopping cart from order. In this process all the promotional, tax and shipping adjustments are removed and then recreated again.

        Activity

        Hide
        Rashko Rejmer added a comment -

        This patch fixes first 3 points.

        Show
        Rashko Rejmer added a comment - This patch fixes first 3 points.
        Hide
        Jacques Le Roux added a comment -

        Hi Rashko,

        I just tested the patch (I put the line of orderview.bsh in orderview.groovy was quite simple) creating some orders with the couple Round Gizmo + Tiny Chrome Widget (one of each). Could you try the same and tell me if you think it's correct. I don't think so.

        Thanks

        Show
        Jacques Le Roux added a comment - Hi Rashko, I just tested the patch (I put the line of orderview.bsh in orderview.groovy was quite simple) creating some orders with the couple Round Gizmo + Tiny Chrome Widget (one of each). Could you try the same and tell me if you think it's correct. I don't think so. Thanks
        Hide
        Rashko Rejmer added a comment -

        Hi Jacques,
        Thanks for reviewing the patch. Could you please tell me the exact combination of products that you have added to the order, or to create one in the demo server? I have created an order with DemoCustCompany party for 2 x GX-2644 and 2 x WG-1111 and I think that everything is correct in this order. If you describe the problem I will take a look.
        I will submit also new patch for the issue, because of the orderview.bsh changes.

        Regards,
        Rashko Rejmer

        Show
        Rashko Rejmer added a comment - Hi Jacques, Thanks for reviewing the patch. Could you please tell me the exact combination of products that you have added to the order, or to create one in the demo server? I have created an order with DemoCustCompany party for 2 x GX-2644 and 2 x WG-1111 and I think that everything is correct in this order. If you describe the problem I will take a look. I will submit also new patch for the issue, because of the orderview.bsh changes. Regards, Rashko Rejmer
        Hide
        Jacques Le Roux added a comment -

        Hi Rahsko,

        As I said aboce "the couple Round Gizmo + Tiny Chrome Widget (one of each)". With them OOTB (without prior orders but the demo one) you get some other product as gift(s?). Then when you try do cancel one of the couple, (i tried both I guess, one at a time of course), you get into trouble because you get a total greater than what you have ordered. Let me know if you need more information

        Cheers

        Jacques

        Show
        Jacques Le Roux added a comment - Hi Rahsko, As I said aboce "the couple Round Gizmo + Tiny Chrome Widget (one of each)". With them OOTB (without prior orders but the demo one) you get some other product as gift(s?). Then when you try do cancel one of the couple, (i tried both I guess, one at a time of course), you get into trouble because you get a total greater than what you have ordered. Let me know if you need more information Cheers Jacques
        Hide
        Jacques Le Roux added a comment -

        Just tested this today in trunk, still the same issue. Note: I did not have to split the order to get it wrong. I guess it's related to promotion, really annoying

        Show
        Jacques Le Roux added a comment - Just tested this today in trunk, still the same issue. Note: I did not have to split the order to get it wrong. I guess it's related to promotion, really annoying
        Hide
        Jacques Le Roux added a comment -

        I checked, this is still totally wrong and I guess will never be fixed. There is a promotions intrication case hard to clear up. Actually when you remove one of the item group then the order does not make sense anymore.
        I tried to remove either the 3 "WG-5569 - Tiny Chrome Widget" or the "GZ-2644 - Round Gizmo" same wrong result

        But it seems that we can live with it, nobody never complains about it. I let open though...

        I think in such case uses recreate an order rather than trying to fix this problem...

        Now I wonder if Rashko's patch is not good for other cases which make more sense. Unfortunately it does not apply anymore

        Show
        Jacques Le Roux added a comment - I checked, this is still totally wrong and I guess will never be fixed. There is a promotions intrication case hard to clear up. Actually when you remove one of the item group then the order does not make sense anymore. I tried to remove either the 3 "WG-5569 - Tiny Chrome Widget" or the "GZ-2644 - Round Gizmo" same wrong result But it seems that we can live with it, nobody never complains about it. I let open though... I think in such case uses recreate an order rather than trying to fix this problem... Now I wonder if Rashko's patch is not good for other cases which make more sense. Unfortunately it does not apply anymore

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Rashko Rejmer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development