svn commit: r1065835 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java

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

svn commit: r1065835 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java

mrisaliti
Author: mrisaliti
Date: Mon Jan 31 22:22:31 2011
New Revision: 1065835

URL: http://svn.apache.org/viewvc?rev=1065835&view=rev
Log:
Replace some tabs to 4 spaces

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1065835&r1=1065834&r2=1065835&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Mon Jan 31 22:22:31 2011
@@ -1758,17 +1758,17 @@ public class ProductPromoWorker {
             BigDecimal percentage = (productPromoAction.get("amount") == null ? BigDecimal.ZERO : (productPromoAction.getBigDecimal("amount").movePointLeft(2))).negate();
             BigDecimal amount = cart.getTotalShipping().multiply(percentage);
             if (amount.compareTo(BigDecimal.ZERO) != 0) {
-             int existingOrderPromoIndex = cart.getAdjustmentPromoIndex(productPromoAction.getString("productPromoId"));
-             if (existingOrderPromoIndex != -1 && cart.getAdjustment(existingOrderPromoIndex).getBigDecimal("amount").compareTo(amount) == 0) {
-                 actionResultInfo.ranAction = false;  // already ran, no need to repeat
-             } else {
-             if (existingOrderPromoIndex != -1 && cart.getAdjustment(existingOrderPromoIndex).getBigDecimal("amount").compareTo(amount) != 0) {
-             cart.removeAdjustment(existingOrderPromoIndex);
-             }
-         doOrderPromoAction(productPromoAction, cart, amount, "amount", delegator);
-             actionResultInfo.ranAction = true;
-             actionResultInfo.totalDiscountAmount = amount;
-             }
+                int existingOrderPromoIndex = cart.getAdjustmentPromoIndex(productPromoAction.getString("productPromoId"));
+                if (existingOrderPromoIndex != -1 && cart.getAdjustment(existingOrderPromoIndex).getBigDecimal("amount").compareTo(amount) == 0) {
+                        actionResultInfo.ranAction = false;  // already ran, no need to repeat
+                } else {
+                    if (existingOrderPromoIndex != -1 && cart.getAdjustment(existingOrderPromoIndex).getBigDecimal("amount").compareTo(amount) != 0) {
+                        cart.removeAdjustment(existingOrderPromoIndex);
+                    }
+                    doOrderPromoAction(productPromoAction, cart, amount, "amount", delegator);
+                    actionResultInfo.ranAction = true;
+                    actionResultInfo.totalDiscountAmount = amount;
+                }
             }
         } else {
             Debug.logError("An un-supported productPromoActionType was used: " + productPromoActionEnumId + ", not performing any action", module);