OFBiz
  1. OFBiz
  2. OFBIZ-2146

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

    Details

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

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

      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. order.diff
        4 kB
        Bilgin Ibryam

        Activity

        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 ?
        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 ?
        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.

          People

          • Assignee:
            Bilgin Ibryam
            Reporter:
            Raj Saini
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development