From 0730f5e2eb3b68b5324ab382cb504c00bf6f6969 Mon Sep 17 00:00:00 2001 From: "David E. Jones" Date: Mon, 6 Dec 2010 22:54:51 +0000 Subject: [PATCH] Small fix so that the new VAT_TAX adjustments are removed when updating an order through the ShoppingCart git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042834 13f79535-47bb-0310-9956-ffa450edef68 --- applications/order/src/org/ofbiz/order/order/OrderServices.java | 1 + .../src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java | 1 + .../src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java | 1 + 3 files changed, 3 insertions(+) diff --git a/applications/order/src/org/ofbiz/order/order/OrderServices.java b/applications/order/src/org/ofbiz/order/order/OrderServices.java index 8758c639f83..446aeb9fa20 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderServices.java +++ b/applications/order/src/org/ofbiz/order/order/OrderServices.java @@ -3796,6 +3796,7 @@ private static ShoppingCart loadCartForUpdate(LocalDispatcher dispatcher, Delega exprs.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "PROMOTION_ADJUSTMENT")); exprs.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "SHIPPING_CHARGES")); exprs.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "SALES_TAX")); + exprs.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "VAT_TAX")); exprs.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "VAT_PRICE_CORRECT")); adjExprs.add(EntityCondition.makeCondition(exprs, EntityOperator.OR)); EntityCondition cond = EntityCondition.makeCondition(adjExprs, EntityOperator.AND); diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java index f1192580cc7..0423d16b131 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java @@ -1357,6 +1357,7 @@ public static String loadCartFromOrder(HttpServletRequest request, HttpServletRe cart = (ShoppingCart) outMap.get("shoppingCart"); cart.removeAdjustmentByType("SALES_TAX"); + cart.removeAdjustmentByType("VAT_TAX"); cart.removeAdjustmentByType("VAT_PRICE_CORRECT"); cart.removeAdjustmentByType("PROMOTION_ADJUSTMENT"); String shipGroupSeqId = null; diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java index 1e433fc3464..47398b70f33 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java @@ -543,6 +543,7 @@ public static Map assignItemShipGroup(DispatchContext dctx, Map< if (itemAdjustments != null) { for(GenericValue itemAdjustment : itemAdjustments) { if ("SALES_TAX".equals(itemAdjustment.get("orderAdjustmentTypeId")) || + "VAT_TAX".equals(itemAdjustment.get("orderAdjustmentTypeId")) || "VAT_PRICE_CORRECT".equals(itemAdjustment.get("orderAdjustmentTypeId"))) { continue; }