svn commit: r1033114 - in /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart: ShoppingCartEvents.java ShoppingCartServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1033114 - in /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart: ShoppingCartEvents.java ShoppingCartServices.java

jonesde
Author: jonesde
Date: Tue Nov  9 17:37:00 2010
New Revision: 1033114

URL: http://svn.apache.org/viewvc?rev=1033114&view=rev
Log:
A couple more places needed to clear out adjustments of type VAT_PRICE_CORRECT when updating order through the cart

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1033114&r1=1033113&r2=1033114&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Tue Nov  9 17:37:00 2010
@@ -1342,6 +1342,7 @@ public class ShoppingCartEvents {
             cart = (ShoppingCart) outMap.get("shoppingCart");
 
             cart.removeAdjustmentByType("SALES_TAX");
+            cart.removeAdjustmentByType("VAT_PRICE_CORRECT");
             cart.removeAdjustmentByType("PROMOTION_ADJUSTMENT");
             String shipGroupSeqId = null;
             long groupIndex = cart.getShipInfoSize();

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=1033114&r1=1033113&r2=1033114&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Tue Nov  9 17:37:00 2010
@@ -541,7 +541,8 @@ public class ShoppingCartServices {
                 List<GenericValue> itemAdjustments = orh.getOrderItemAdjustments(item);
                 if (itemAdjustments != null) {
                     for(GenericValue itemAdjustment : itemAdjustments) {
-                        if ("SALES_TAX".equals(itemAdjustment.get("orderAdjustmentTypeId"))) {
+                        if ("SALES_TAX".equals(itemAdjustment.get("orderAdjustmentTypeId")) ||
+                                "VAT_PRICE_CORRECT".equals(itemAdjustment.get("orderAdjustmentTypeId"))) {
                             continue;
                         }
                         cartItem.addAdjustment(itemAdjustment);