OFBiz
  1. OFBiz
  2. OFBIZ-2146

Quote to order - manual adjustments amount not included in cart grand total

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Component/s: order
    • Labels:
      None
    • Environment:

      Ubuntu 8.10, Firefox 3.0.5Quote to order - manual adjustments amount not included in cart grand total

    • Sprint:
      Bug Crush Event - 21/2/2015, Community Day 1 - 2015

      Description

      While creating a order from a quote with a manual adjustment of shipping charges, the adjustment amount is not included in the cart grand total. Although manual adjustments are copied to order adjustment and added to cart adjustment (ShoppingCartService.java, lines 676-781), they are filtered out while calculating the maxAmount for OrderPaymentPreference when calling the cart.getOrderOtherAdjustmentTotal() method which in turns calls the OrderReadHelper.calcOrderAdjustments(List orderHeaderAdjustments, BigDecimal subTotal, boolean includeOther, boolean includeTax, boolean includeShipping). This method filters out the SHIPPING_CHARGES order adjustment as includeShipping parameter is always true.

      One way to solve the problem is to use the value of includeInShipping field from OrderAdjsutment entity in OrderHelper#filterOrderAdjustments(List adjustments, boolean includeOther, boolean includeTax, boolean includeShipping, boolean forTax, boolean forShipping) method and setting this to true in QuoteAdjustment entity. (quote adjustments are copied to order adjustment by loadCartFromQuote service). However, doing so wrongly shows the shipping charges twice in the Order view and also add the shipping charges to the total tax whereas the grand total remains correct.

      1. OFBIZ-2146.patch
        4 kB
        Arun Patidar
      2. order.diff
        4 kB
        Bilgin Ibryam

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2242d 21h 10m 1 Deepak Dixit 21/Mar/15 10:34
        In Progress In Progress Closed Closed
        55s 1 Deepak Dixit 21/Mar/15 10:35
        Closed Closed Reopened Reopened
        4d 23h 59m 1 Deepak Dixit 26/Mar/15 10:34
        Reopened Reopened Resolved Resolved
        57m 14s 1 Deepak Dixit 26/Mar/15 11:32
        Resolved Resolved Closed Closed
        4h 7m 1 Jacques Le Roux 26/Mar/15 15:40
        Hide
        Deepak Dixit added a comment -

        Thanks Jacques

        Show
        Deepak Dixit added a comment - Thanks Jacques
        Jacques Le Roux made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Jacques Le Roux added a comment -

        Hi Deepak, when all is OK we close the issues

        Show
        Jacques Le Roux added a comment - Hi Deepak, when all is OK we close the issues
        Deepak Dixit made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Deepak Dixit added a comment -

        This has been fixed,
        Committed in
        Trunk at r#1669317
        R14.12 at r#1669321
        R13.07 at r#1669325
        R12.04 at r#1669326

        Show
        Deepak Dixit added a comment - This has been fixed, Committed in Trunk at r#1669317 R14.12 at r#1669321 R13.07 at r#1669325 R12.04 at r#1669326
        Deepak Dixit made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Hide
        Deepak Dixit added a comment -

        Found an issue in ShoppingCart.getDisplaySubTotal(), so reopening the issue.

        Show
        Deepak Dixit added a comment - Found an issue in ShoppingCart.getDisplaySubTotal(), so reopening the issue.
        Deepak Dixit made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 14.12.01 [ 12327361 ]
        Fix Version/s 12.04.06 [ 12328243 ]
        Fix Version/s 13.07.02 [ 12328788 ]
        Fix Version/s Upcoming Branch [ 12329183 ]
        Resolution Fixed [ 1 ]
        Deepak Dixit made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Deepak Dixit added a comment -

        Thanks Raj for the reporting the issue.
        Thanks Bilgin Ibryam and Arun Patidar for providing the patch.
        Committed in :
        Trunk at r#1668214
        R14.12 at r#1668224
        R13.07 at r#1668225
        R12.04 at r#1668227

        Show
        Deepak Dixit added a comment - Thanks Raj for the reporting the issue. Thanks Bilgin Ibryam and Arun Patidar for providing the patch. Committed in : Trunk at r#1668214 R14.12 at r#1668224 R13.07 at r#1668225 R12.04 at r#1668227
        Deepak Dixit made changes -
        Assignee Bilgin Ibryam [ bibryam ] Deepak Dixit [ deepak.dixit ]
        Deepak Dixit made changes -
        Sprint Bug Crush Event - 21/2/2015 [ 91 ] Bug Crush Event - 21/2/2015, Community Day 1 - 2015 [ 91, 96 ]
        Arun Patidar made changes -
        Attachment OFBIZ-2146.patch [ 12706142 ]
        Hide
        Arun Patidar added a comment -

        Attached is the updated patch. I have test and verified the fix. Its working fine for me.

        Show
        Arun Patidar added a comment - Attached is the updated patch. I have test and verified the fix. Its working fine for me.
        Sharan Foga made changes -
        Rank Ranked higher
        Sharan Foga made changes -
        Rank Ranked higher
        Sharan Foga made changes -
        Rank Ranked higher
        Sharan Foga made changes -
        Sprint Bug Crush Event - 21/2/2015 [ 91 ]
        Gavin made changes -
        Workflow jira [ 12451270 ] OFbiz Workflow [ 12506268 ]
        Hide
        Raj Saini added a comment -

        Hi Jacques and Bilgin,

        I am out of the office for a week and could not look test it personally. However, I has asked one of my team member to test and he confirmed that it is working. I will look into it next week and will update you.

        Show
        Raj Saini added a comment - Hi Jacques and Bilgin, I am out of the office for a week and could not look test it personally. However, I has asked one of my team member to test and he confirmed that it is working. I will look into it next week and will update you.
        Hide
        Jacques Le Roux added a comment -

        Hi Raj,

        DId you get a chance to test Bilgin's patch ?

        Show
        Jacques Le Roux added a comment - Hi Raj, DId you get a chance to test Bilgin's patch ?
        Bilgin Ibryam made changes -
        Attachment order.diff [ 12399800 ]
        Hide
        Bilgin Ibryam added a comment -

        Raj, could you check if this patch solves the bug ?

        Show
        Bilgin Ibryam added a comment - Raj, could you check if this patch solves the bug ?
        Bilgin Ibryam made changes -
        Field Original Value New Value
        Assignee Bilgin Ibryam [ bibryam ]
        Raj Saini created issue -

          People

          • Assignee:
            Deepak Dixit
            Reporter:
            Raj Saini
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Agile