svn commit: r737003 [5/11] - in /ofbiz/trunk: ./ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/script/org/ofbiz/accounting/ledger/ applications/accounting/servicedef/ application...

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

svn commit: r737003 [5/11] - in /ofbiz/trunk: ./ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/script/org/ofbiz/accounting/ledger/ applications/accounting/servicedef/ application...

jleroux@apache.org
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Fri Jan 23 03:08:47 2009
@@ -256,7 +256,7 @@
                     normalizedItemQuantities.put(currentProductId, orderItem.getBigDecimal("quantity"));
                     normalizedItemNames.put(currentProductId, orderItem.getString("itemDescription"));
                 } else {
-                 BigDecimal currentQuantity = (BigDecimal) normalizedItemQuantities.get(currentProductId);
+                    BigDecimal currentQuantity = (BigDecimal) normalizedItemQuantities.get(currentProductId);
                     normalizedItemQuantities.put(currentProductId, currentQuantity.add(orderItem.getBigDecimal("quantity")));
                 }
 
@@ -3414,7 +3414,7 @@
                 if (overridePriceMap.containsKey(itemSeqId)) {
                     String priceStr = (String) itemPriceMap.get(itemSeqId);
                     if (UtilValidate.isNotEmpty(priceStr)) {
-                     BigDecimal price = new BigDecimal("-1");
+                        BigDecimal price = new BigDecimal("-1");
                         price = new BigDecimal(priceStr).setScale(orderDecimals, orderRounding);
                         cartItem.setBasePrice(price);
                         cartItem.setIsModifiedPrice(true);
@@ -4905,9 +4905,9 @@
 
                     Calendar endDate = Calendar.getInstance();
                     endDate.setTime(UtilDateTime.nowTimestamp());
-                 //check if the thruedate - cancel period (if provided) is earlier than todays date
+                    //check if the thruedate - cancel period (if provided) is earlier than todays date
                     int field = Calendar.MONTH;
-                 if (subscription.get("canclAutmExtTime") != null && subscription.get("canclAutmExtTimeUomId") != null) {
+                    if (subscription.get("canclAutmExtTime") != null && subscription.get("canclAutmExtTimeUomId") != null) {
                         if ("TF_day".equals(subscription.getString("canclAutmExtTimeUomId"))) {
                             field = Calendar.DAY_OF_YEAR;  
                         } else if ("TF_wk".equals(subscription.getString("canclAutmExtTimeUomId"))) {
@@ -4920,30 +4920,30 @@
                             Debug.logWarning("Don't know anything about useTimeUomId [" + subscription.getString("canclAutmExtTimeUomId") + "], defaulting to month", module);
                         }
 
-                 endDate.add(field, new Integer(subscription.getString("canclAutmExtTime")).intValue());
-                 }
-                
+                        endDate.add(field, new Integer(subscription.getString("canclAutmExtTime")).intValue());
+                    }
+                    
                     Calendar endDateSubscription = Calendar.getInstance();
                     endDateSubscription.setTime(subscription.getTimestamp("thruDate"));
-                
+                    
                     if (endDate.before(endDateSubscription)) {
-                     // nor expired yet.....
-                     continue;
+                        // nor expired yet.....
+                        continue;
                     }
-                
-                 result = dispatcher.runSync("loadCartFromOrder", UtilMisc.toMap("orderId", subscription.get("orderId"), "userLogin", userLogin));
-                 ShoppingCart cart = (ShoppingCart) result.get("shoppingCart");
-                
-                 // only keep the orderitem with the related product.
-                 List cartItems = cart.items();
-                 Iterator ci = cartItems.iterator();
-                 while (ci.hasNext()) {
-                 ShoppingCartItem shoppingCartItem = (ShoppingCartItem) ci.next();
-                 if (!subscription.get("productId").equals(shoppingCartItem.getProductId())) {
-                 cart.removeCartItem(shoppingCartItem, dispatcher);
-                 }
-                 }
-                
+                    
+                    result = dispatcher.runSync("loadCartFromOrder", UtilMisc.toMap("orderId", subscription.get("orderId"), "userLogin", userLogin));
+                    ShoppingCart cart = (ShoppingCart) result.get("shoppingCart");
+                    
+                    // only keep the orderitem with the related product.
+                    List cartItems = cart.items();
+                    Iterator ci = cartItems.iterator();
+                    while (ci.hasNext()) {
+                        ShoppingCartItem shoppingCartItem = (ShoppingCartItem) ci.next();
+                        if (!subscription.get("productId").equals(shoppingCartItem.getProductId())) {
+                            cart.removeCartItem(shoppingCartItem, dispatcher);
+                        }
+                    }
+                    
                     CheckOutHelper helper = new CheckOutHelper(dispatcher, delegator, cart);
     
                     // store the order

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Fri Jan 23 03:08:47 2009
@@ -1577,7 +1577,7 @@
     
     /** returns the total payment amounts */
     public BigDecimal getPaymentTotal() {
-     BigDecimal total = BigDecimal.ZERO;
+        BigDecimal total = BigDecimal.ZERO;
         Iterator i = paymentInfo.iterator();
         while (i.hasNext()) {
             CartPaymentInfo inf = (CartPaymentInfo) i.next();
@@ -2537,7 +2537,7 @@
 
     /** Returns the sub-total in the cart (item-total - discount). */
     public BigDecimal getSubTotalForPromotions() {
-     BigDecimal itemsTotal = BigDecimal.ZERO;
+        BigDecimal itemsTotal = BigDecimal.ZERO;
         Iterator i = iterator();
 
         while (i.hasNext()) {

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=737003&r1=737002&r2=737003&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 Fri Jan 23 03:08:47 2009
@@ -326,7 +326,7 @@
             }
 
             if (reservStart != null && reservEnd != null) {
-             reservLength = new BigDecimal(UtilDateTime.getInterval(reservStart,reservEnd)).divide(new BigDecimal("86400000"), generalRounding);
+                reservLength = new BigDecimal(UtilDateTime.getInterval(reservStart,reservEnd)).divide(new BigDecimal("86400000"), generalRounding);
             }
 
             if (reservStart != null && paramMap.containsKey("reservLength")) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java Fri Jan 23 03:08:47 2009
@@ -310,7 +310,7 @@
                     continue;
                 // never read: int itemId = -1;
                 if (UtilValidate.isNotEmpty(productId) && orderItem.get("quantity") != null) {
-                 BigDecimal amount = orderItem.getBigDecimal("selectedAmount");
+                    BigDecimal amount = orderItem.getBigDecimal("selectedAmount");
                     ProductConfigWrapper configWrapper = null;
                     String aggregatedProdId = null;
                     if ("AGGREGATED_CONF".equals(ProductWorker.getProductTypeId(delegator, productId))) {
@@ -405,7 +405,7 @@
             }
 
             if (quantStr != null && quantStr.length() > 0) {
-             BigDecimal quantity = BigDecimal.ZERO;
+                BigDecimal quantity = BigDecimal.ZERO;
 
                 try {
                     quantity = new BigDecimal(quantStr);
@@ -481,7 +481,7 @@
                 }
 
                 if (quantStr != null && quantStr.length() > 0) {
-                 BigDecimal quantity = BigDecimal.ZERO;
+                    BigDecimal quantity = BigDecimal.ZERO;
                     try {
                         quantity = new BigDecimal(nf.parse(quantStr).doubleValue());
                     } catch (ParseException nfe) {
@@ -689,12 +689,12 @@
                         }
                     } else if (parameterName.startsWith("reservLength")) {
                         if (item != null) {
-                     BigDecimal reservLength = new BigDecimal(nf.parse(quantString).doubleValue());
+                            BigDecimal reservLength = new BigDecimal(nf.parse(quantString).doubleValue());
                             item.setReservLength(reservLength);
                         }
                     } else if (parameterName.startsWith("reservPersons")) {
                         if (item != null) {
-                         BigDecimal reservPersons = new BigDecimal(nf.parse(quantString).doubleValue());
+                            BigDecimal reservPersons = new BigDecimal(nf.parse(quantString).doubleValue());
                             item.setReservPersons(reservPersons);
                         }
                     } else if (parameterName.startsWith("shipBeforeDate")) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Fri Jan 23 03:08:47 2009
@@ -381,7 +381,7 @@
      * @throws CartItemModifyException
      */
     public static ShoppingCartItem makeItem(Integer cartLocation, GenericValue product, BigDecimal selectedAmount,
-     BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons,
+            BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons,
             Timestamp shipBeforeDate, Timestamp shipAfterDate, Map additionalProductFeatureAndAppls, Map attributes,
             String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher,
             ShoppingCart cart, Boolean triggerExternalOpsBool, Boolean triggerPriceRulesBool, GenericValue parentProduct, Boolean skipInventoryChecks, Boolean skipProductChecks) throws CartItemModifyException {
@@ -399,7 +399,7 @@
      * @param accommodationSpotId Optional. reservations add into workeffort
     */
     public static ShoppingCartItem makeItem(Integer cartLocation, GenericValue product, BigDecimal selectedAmount,
-     BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons,
+            BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons,
             String accommodationMapId,String accommodationSpotId,
             Timestamp shipBeforeDate, Timestamp shipAfterDate, Map additionalProductFeatureAndAppls, Map attributes,
             String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher,
@@ -506,7 +506,7 @@
             newItem.setReservLength(reservLength);
             
             if (product.get("reservMaxPersons") != null) {
-             BigDecimal reservMaxPersons = product.getBigDecimal("reservMaxPersons");
+                BigDecimal reservMaxPersons = product.getBigDecimal("reservMaxPersons");
                  if (reservMaxPersons.compareTo(reservPersons) < 0)    {
                      Map messageMap = UtilMisc.toMap("reservMaxPersons", product.getString("reservMaxPersons"),
                                                      "reservPersons", reservPersons);
@@ -596,7 +596,7 @@
      * @throws CartItemModifyException
      */
     public static ShoppingCartItem makeItem(Integer cartLocation, String itemType, String itemDescription, String productCategoryId,
-     BigDecimal basePrice, BigDecimal selectedAmount, BigDecimal quantity, Map attributes, String prodCatalogId, ShoppingCart.ShoppingCartItemGroup itemGroup,
+            BigDecimal basePrice, BigDecimal selectedAmount, BigDecimal quantity, Map attributes, String prodCatalogId, ShoppingCart.ShoppingCartItemGroup itemGroup,
             LocalDispatcher dispatcher, ShoppingCart cart, Boolean triggerExternalOpsBool) throws CartItemModifyException {
 
         GenericDelegator delegator = cart.getDelegator();
@@ -924,13 +924,13 @@
                 // see if we can get the number of assets available
                 // first try techDataCalendarExcDay(exceptionCapacity) and then FixedAsset(productionCapacity)
                 // if still zero, do not check availability
-             BigDecimal exceptionCapacity = BigDecimal.ZERO;
+                BigDecimal exceptionCapacity = BigDecimal.ZERO;
                 if (techDataCalendarExcDay.get("exceptionCapacity") != null)
                     exceptionCapacity = techDataCalendarExcDay.getBigDecimal("exceptionCapacity");
                 if (exceptionCapacity.compareTo(BigDecimal.ZERO) == 0 && fixedAsset.get("productionCapacity") != null)
                     exceptionCapacity = fixedAsset.getBigDecimal("productionCapacity");
                 if (exceptionCapacity.compareTo(BigDecimal.ZERO) != 0) {
-                 BigDecimal usedCapacity = BigDecimal.ZERO;
+                    BigDecimal usedCapacity = BigDecimal.ZERO;
                     if (techDataCalendarExcDay.get("usedCapacity") != null)
                         usedCapacity = techDataCalendarExcDay.getBigDecimal("usedCapacity");
                     if (exceptionCapacity.compareTo(quantity.add(usedCapacity)) < 0) {
@@ -1312,7 +1312,7 @@
     }
 
     public BigDecimal getPromoQuantityCandidateUseActionAndAllConds(GenericValue productPromoAction) {
-     BigDecimal totalUse = BigDecimal.ZERO;
+        BigDecimal totalUse = BigDecimal.ZERO;
         String productPromoId = productPromoAction.getString("productPromoId");
         String productPromoRuleId = productPromoAction.getString("productPromoRuleId");
 
@@ -1684,7 +1684,7 @@
     public BigDecimal getWeight() {
         GenericValue product = getProduct();
         if (product != null) {
-         BigDecimal weight = product.getBigDecimal("weight");
+            BigDecimal weight = product.getBigDecimal("weight");
 
             // if the weight is null, see if there is an associated virtual product and get the weight of that product
             if (weight == null) {
@@ -1790,9 +1790,9 @@
     public BigDecimal getSize() {
         GenericValue product = getProduct();
         if (product != null) {
-         BigDecimal height = product.getBigDecimal("shippingHeight");
-         BigDecimal width = product.getBigDecimal("shippingWidth");
-         BigDecimal depth = product.getBigDecimal("shippingDepth");
+            BigDecimal height = product.getBigDecimal("shippingHeight");
+            BigDecimal width = product.getBigDecimal("shippingWidth");
+            BigDecimal depth = product.getBigDecimal("shippingDepth");
 
             // if all are null, see if there is an associated virtual product and get the info of that product
             if (height == null && width == null && depth == null) {
@@ -1841,7 +1841,7 @@
 
     /** Returns the base price. */
     public BigDecimal getBasePrice() {
-     BigDecimal curBasePrice;
+        BigDecimal curBasePrice;
         if (selectedAmount.compareTo(BigDecimal.ZERO) > 0) {
             curBasePrice = basePrice.multiply(selectedAmount);
         } else {
@@ -1851,7 +1851,7 @@
     }
     
     public BigDecimal getDisplayPrice() {
-     BigDecimal curDisplayPrice;
+        BigDecimal curDisplayPrice;
         if (this.displayPrice == null) {
             curDisplayPrice = this.getBasePrice();
         } else {
@@ -1973,7 +1973,7 @@
     }
 
     public BigDecimal getDisplayItemRecurringSubTotal() {
-     BigDecimal curRecurringDisplayPrice = this.getRecurringDisplayPrice();
+        BigDecimal curRecurringDisplayPrice = this.getRecurringDisplayPrice();
         
         if (curRecurringDisplayPrice == null) {
             return this.getOtherAdjustmentsRecurring();
@@ -1983,7 +1983,7 @@
     }
 
     public BigDecimal getDisplayItemRecurringSubTotalNoAdj() {
-     BigDecimal curRecurringDisplayPrice = this.getRecurringDisplayPrice();
+        BigDecimal curRecurringDisplayPrice = this.getRecurringDisplayPrice();
         if (curRecurringDisplayPrice == null) return BigDecimal.ZERO;
         
         return curRecurringDisplayPrice.multiply(this.getQuantity());
@@ -2022,7 +2022,7 @@
 
         BigDecimal recurringAmount = (BigDecimal) additionalProductFeatureAndAppl.get("recurringAmount");
         if (recurringAmount != null) {
-         recurringAmount = recurringAmount.multiply(this.getQuantity());
+            recurringAmount = recurringAmount.multiply(this.getQuantity());
             orderAdjustment.set("recurringAmount", recurringAmount);
             //Debug.logInfo("Setting recurringAmount " + recurringAmount + " for " + orderAdjustment, module);
         }
@@ -2379,7 +2379,7 @@
     }
 
     public void explodeItem(ShoppingCart cart, LocalDispatcher dispatcher) throws CartItemModifyException {
-     BigDecimal baseQuantity = this.getQuantity();
+        BigDecimal baseQuantity = this.getQuantity();
         int thisIndex = cart.items().indexOf(this);
         List newItems = new ArrayList();
 

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=737003&r1=737002&r2=737003&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 Fri Jan 23 03:08:47 2009
@@ -825,8 +825,8 @@
             }
         } else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
             // this type of condition allows items involved to be involved in other quantity consuming cond/action, and does pro-rate the price
-         BigDecimal amountNeeded = new BigDecimal(condValue);
-         BigDecimal amountAvailable = BigDecimal.ZERO;
+            BigDecimal amountNeeded = new BigDecimal(condValue);
+            BigDecimal amountAvailable = BigDecimal.ZERO;
 
             // Debug.logInfo("Doing Amount Not Counted Cond with Value: " + amountNeeded, module);
             
@@ -1352,7 +1352,7 @@
                 // clear out any action uses for this so they don't become part of anything else
                 cart.resetPromoRuleUse(productPromoAction.getString("productPromoId"), productPromoAction.getString("productPromoRuleId"));
             } else {
-             BigDecimal totalAmount = getCartItemsUsedTotalAmount(cart, productPromoAction);
+                BigDecimal totalAmount = getCartItemsUsedTotalAmount(cart, productPromoAction);
                 if (Debug.verboseOn()) Debug.logVerbose("Applying promo [" + productPromoAction.getPrimaryKey() + "]\n totalAmount=" + totalAmount + ", discountAmountTotal=" + discountAmountTotal, module);
                 distributeDiscountAmount(discountAmountTotal, totalAmount, getCartItemsUsed(cart, productPromoAction), productPromoAction, delegator);
                 actionResultInfo.ranAction = true;
@@ -1422,7 +1422,7 @@
                 if (!cartItem.getIsPromo() && (productIds.contains(cartItem.getProductId()) || (parentProductId != null && productIds.contains(parentProductId))) &&
                         (product == null || !"N".equals(product.getString("includeInPromotions")))) {
                     // reduce quantity still needed to qualify for promo (quantityNeeded)
-                 BigDecimal quantityUsed = cartItem.addPromoQuantityCandidateUse(quantityDesired, productPromoAction, false);
+                    BigDecimal quantityUsed = cartItem.addPromoQuantityCandidateUse(quantityDesired, productPromoAction, false);
                     if (quantityUsed.compareTo(BigDecimal.ZERO) > 0) {
                         quantityDesired = quantityDesired.subtract(quantityUsed);
                         totalAmount = totalAmount.add(quantityUsed.multiply(cartItem.getBasePrice()).multiply(cartItem.getRentalAdjustment()));
@@ -1432,7 +1432,7 @@
             }
 
             if (totalAmount.compareTo(desiredAmount) > 0 && quantityDesired.compareTo(BigDecimal.ZERO) == 0) {
-             BigDecimal discountAmountTotal = totalAmount.subtract(desiredAmount).negate();
+                BigDecimal discountAmountTotal = totalAmount.subtract(desiredAmount).negate();
                 distributeDiscountAmount(discountAmountTotal, totalAmount, cartItemsUsed, productPromoAction, delegator);
                 actionResultInfo.ranAction = true;
                 actionResultInfo.totalDiscountAmount = discountAmountTotal;
@@ -1451,9 +1451,9 @@
                 actionResultInfo.totalDiscountAmount = amount;
             }
         } else if ("PROMO_ORDER_AMOUNT".equals(productPromoActionEnumId)) {
-         BigDecimal amount = (productPromoAction.get("amount") == null ? BigDecimal.ZERO : productPromoAction.getBigDecimal("amount")).negate();
+            BigDecimal amount = (productPromoAction.get("amount") == null ? BigDecimal.ZERO : productPromoAction.getBigDecimal("amount")).negate();
             // if amount is greater than the order sub total, set equal to order sub total, this normally wouldn't happen because there should be a condition that the order total be above a certain amount, but just in case...
-         BigDecimal subTotal = cart.getSubTotalForPromotions();
+            BigDecimal subTotal = cart.getSubTotalForPromotions();
             if (amount.negate().compareTo(subTotal) > 0) {
                 amount = subTotal.negate();
             }
@@ -1487,9 +1487,9 @@
                 BigDecimal difference = cartItem.getBasePrice().multiply(cartItem.getRentalAdjustment()).subtract(cartItem.getSpecialPromoPrice()).negate();
 
                 if (difference.compareTo(BigDecimal.ZERO) != 0) {
-                 BigDecimal quantityUsed = cartItem.addPromoQuantityCandidateUse(cartItem.getQuantity(), productPromoAction, false);
+                    BigDecimal quantityUsed = cartItem.addPromoQuantityCandidateUse(cartItem.getQuantity(), productPromoAction, false);
                     if (quantityUsed.compareTo(BigDecimal.ZERO) > 0) {
-                     BigDecimal amount = difference.multiply(quantityUsed);
+                        BigDecimal amount = difference.multiply(quantityUsed);
                         doOrderItemPromoAction(productPromoAction, cartItem, amount, "amount", delegator);
                         actionResultInfo.ranAction = true;
                         actionResultInfo.totalDiscountAmount = amount;
@@ -1538,7 +1538,7 @@
     }
     
     protected static void distributeDiscountAmount(BigDecimal discountAmountTotal, BigDecimal totalAmount, List cartItemsUsed, GenericValue productPromoAction, GenericDelegator delegator) {
-     BigDecimal discountAmount = discountAmountTotal;
+        BigDecimal discountAmount = discountAmountTotal;
         // distribute the discount evenly weighted according to price over the order items that the individual quantities came from; avoids a number of issues with tax/shipping calc, inclusion in the sub-total for other promotions, etc
         Iterator cartItemsUsedIter = cartItemsUsed.iterator();
         while (cartItemsUsedIter.hasNext()) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java Fri Jan 23 03:08:47 2009
@@ -237,7 +237,7 @@
 
         // call the generic estimate service
         try {
-         BigDecimal genericAmt = getGenericShipEstimate(dispatcher, storeShipMethod, serviceFields);
+            BigDecimal genericAmt = getGenericShipEstimate(dispatcher, storeShipMethod, serviceFields);
             if (genericAmt != null) {
                 shippingTotal = shippingTotal.add(genericAmt);
             }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java Fri Jan 23 03:08:47 2009
@@ -570,8 +570,8 @@
                     GenericValue shoppingListItem=delegator.findByPrimaryKey("ShoppingListItem", UtilMisc.toMap("shoppingListId",
                                 shoppingListId, "shoppingListItemSeqId", shoppingListItemSeqId));
                     if (shoppingListItem != null) {
-                     BigDecimal quantityPurchased = shoppingListItem.getBigDecimal("quantityPurchased");
-                     BigDecimal orderQuantity = orderItem.getBigDecimal("quantity");
+                        BigDecimal quantityPurchased = shoppingListItem.getBigDecimal("quantityPurchased");
+                        BigDecimal orderQuantity = orderItem.getBigDecimal("quantity");
                         if (quantityPurchased != null) {
                             shoppingListItem.set("quantityPurchased", orderQuantity.add(quantityPurchased));
                         }else{

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/test/OrderTestServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/test/OrderTestServices.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/test/OrderTestServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/test/OrderTestServices.java Fri Jan 23 03:08:47 2009
@@ -55,13 +55,13 @@
         
         int numberOfOrdersInt = numberOfOrders.intValue();
         for (int i = 1; i <= numberOfOrdersInt; i++) {
-         try {
- ModelService modelService = dctx.getModelService("createTestSalesOrderSingle");
- dispatcher.runSync("createTestSalesOrderSingle", modelService.makeValid(context, ModelService.IN_PARAM));
- } catch (GenericServiceException e) {
- String errMsg = "Error calling createTestSalesOrderSingle: " + e.toString();
- Debug.logError(e, errMsg, module);
- }
+            try {
+                ModelService modelService = dctx.getModelService("createTestSalesOrderSingle");
+                dispatcher.runSync("createTestSalesOrderSingle", modelService.makeValid(context, ModelService.IN_PARAM));
+            } catch (GenericServiceException e) {
+                String errMsg = "Error calling createTestSalesOrderSingle: " + e.toString();
+                Debug.logError(e, errMsg, module);
+            }
         }
         return ServiceUtil.returnSuccess();
     }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java Fri Jan 23 03:08:47 2009
@@ -322,7 +322,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_STATE").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_STATE").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_STATE").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_STATE").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_STATE") != null ? rec.getString("JUR_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -333,7 +333,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTY").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTY_CODE") != null ? rec.getString("JUR_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -344,7 +344,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_CITY").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_CITY").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_CITY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_CITY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_CITY") != null ? rec.getString("JUR_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -355,7 +355,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_STATE").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_STATE").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_STATE").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_STATE").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_STATE") != null ? rec.getString("JUR_SEC_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -366,7 +366,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_COUNTY").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_COUNTY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_COUNTY_CODE") != null ? rec.getString("JUR_SEC_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -377,7 +377,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_CITY").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_CITY").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_CITY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_CITY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_CITY") != null ? rec.getString("JUR_SEC_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -392,7 +392,7 @@
 
             } else if (orderAdjustments.size() == 0) {
                 if (rec.getBigDecimal("TAX_AMT_COUNTRY").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTRY").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTRY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_COUNTRY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTRY") != null ? rec.getString("JUR_COUNTRY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -403,7 +403,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_STATE").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_STATE").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_STATE").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_STATE").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_STATE") != null ? rec.getString("JUR_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -414,7 +414,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTY").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTY_CODE") != null ? rec.getString("JUR_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -425,7 +425,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_CITY").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_CITY").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_CITY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_CITY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_CITY") != null ? rec.getString("JUR_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -436,7 +436,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_STATE").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_STATE").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_STATE").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_STATE").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_STATE") != null ? rec.getString("JUR_SEC_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -447,7 +447,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_COUNTY").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_COUNTY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_COUNTY_CODE") != null ? rec.getString("JUR_SEC_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
@@ -458,7 +458,7 @@
                 }
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_CITY").compareTo(BigDecimal.ZERO) > 0) {
-                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_CITY").movePointRight(2);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_CITY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_CITY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_CITY") != null ? rec.getString("JUR_SEC_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy Fri Jan 23 03:08:47 2009
@@ -46,7 +46,7 @@
     orderHeader = shipment.getRelatedOne("PrimaryOrderHeader");
 }
 
-if (!invoice && invoiceId) {
+if (!invoice && invoiceId)    {
     invoice = delegator.findByPrimaryKey("Invoice", [invoiceId : invoiceId]);
 }
 
@@ -131,7 +131,7 @@
 if (selAddresses) {
     address = delegator.findByPrimaryKey("PostalAddress", [contactMechId : selAddresses[0].contactMechId]);
 }
-if (address) {
+if (address)    {
    // get the country name and state/province abbreviation
    country = address.getRelatedOneCache("CountryGeo");
    if (country) {
@@ -161,9 +161,9 @@
     selContacts = EntityUtil.filterByDate(contacts, nowTimestamp, "fromDate", "thruDate", true);
     if (selContacts) {
         i = selContacts.iterator();
-        while (i.hasNext()) {
+        while (i.hasNext())    {
             email = i.next().getRelatedOne("ContactMech");
-            if ("ELECTRONIC_ADDRESS".equals(email.contactMechTypeId)) {
+            if ("ELECTRONIC_ADDRESS".equals(email.contactMechTypeId))    {
                 context.email = email;
                 break;
             }
@@ -176,7 +176,7 @@
 selContacts = EntityUtil.filterByDate(contacts, nowTimestamp, "fromDate", "thruDate", true);        
 if (selContacts) {
     Iterator i = selContacts.iterator();
-    while (i.hasNext()) {
+    while (i.hasNext())    {
         website = i.next().getRelatedOne("ContactMech");
         if ("WEB_ADDRESS".equals(website.contactMechTypeId)) {
             context.website = website;

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy Fri Jan 23 03:08:47 2009
@@ -29,5 +29,5 @@
         lastSequenceNum = lastItem.sequenceNum;
         nextSequenceNum = lastSequenceNum + 10;
     }
-}
+}    
 context.nextSequenceNum = nextSequenceNum;

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/SetRequestQuote.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/SetRequestQuote.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/SetRequestQuote.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/SetRequestQuote.groovy Fri Jan 23 03:08:47 2009
@@ -27,4 +27,4 @@
     if (requestQuote) {
         context.quoteId = requestQuote.quoteId;
     }
-}
+}    

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.groovy Fri Jan 23 03:08:47 2009
@@ -19,7 +19,7 @@
 
 prepare = dispatcher.runSync("prepareFind", [inputFields : parameters, entityName : "Requirement"]);
 if (prepare.entityConditionList) {
- results = dispatcher.runSync("getRequirementsForSupplier", [requirementConditions : prepare.entityConditionList, partyId : parameters.partyId]);
- context.requirementsForSupplier = results.requirementsForSupplier;
- context.quantityReport = [distinctProductCount : results.distinctProductCount, quantityTotal : results.quantityTotal, amountTotal : results.amountTotal];
+    results = dispatcher.runSync("getRequirementsForSupplier", [requirementConditions : prepare.entityConditionList, partyId : parameters.partyId]);
+    context.requirementsForSupplier = results.requirementsForSupplier;
+    context.quantityReport = [distinctProductCount : results.distinctProductCount, quantityTotal : results.quantityTotal, amountTotal : results.amountTotal];
 }

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/task/OrderTaskList.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/task/OrderTaskList.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/task/OrderTaskList.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/task/OrderTaskList.groovy Fri Jan 23 03:08:47 2009
@@ -96,7 +96,7 @@
     poGv = poIter.next();
     poOrderId = poGv.orderId;
     if (listedPoIds.contains(poOrderId)) {
-     poIter.remove();
+        poIter.remove();
     } else {
         listedPoIds.add(poOrderId);
     }