Skip to content

Commit

Permalink
Small fix so that the new VAT_TAX adjustments are removed when updati…
Browse files Browse the repository at this point in the history
…ng an order through the ShoppingCart

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042834 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jonesde committed Dec 6, 2010
1 parent f852262 commit 0730f5e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ public static Map<String, Object> 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;
}
Expand Down

0 comments on commit 0730f5e

Please sign in to comment.