You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/08/30 17:32:48 UTC

svn commit: r809357 - in /ofbiz/trunk/applications: accounting/src/org/ofbiz/accounting/payment/ accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/ accounting/src/org/ofbiz/accounting/thirdparty/paypal/ manufacturing/src/org/ofbiz/manufactur...

Author: jleroux
Date: Sun Aug 30 15:32:46 2009
New Revision: 809357

URL: http://svn.apache.org/viewvc?rev=809357&view=rev
Log:
Revert r809336, I thought I did something wrong in r804935 when it was actually ok.

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java?rev=809357&r1=809356&r2=809357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java Sun Aug 30 15:32:46 2009
@@ -151,8 +151,8 @@
                 EntityCondition.makeCondition("billingAccountId", EntityOperator.EQUALS, billingAccountId),
                 EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "EXT_BILLACT"),
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_IN, UtilMisc.toList("ORDER_CANCELLED", "ORDER_REJECTED")),
-                EntityCondition.makeCondition("preferenceStatusId", EntityOperator.NOT_IN, UtilMisc.toList("PAYMENT_SETTLED", "PAYMENT_RECEIVED", "PAYMENT_DECLINED", "PAYMENT_CANCELLED"))) // PAYMENT_NOT_AUTH
-                , EntityOperator.AND);
+                EntityCondition.makeCondition("preferenceStatusId", EntityOperator.NOT_IN, UtilMisc.toList("PAYMENT_SETTLED", "PAYMENT_RECEIVED", "PAYMENT_DECLINED", "PAYMENT_CANCELLED")) // PAYMENT_NOT_AUTH
+           ), EntityOperator.AND);
 
         List orderPaymentPreferenceSums = delegator.findList("OrderPurchasePaymentSummary", whereConditions, UtilMisc.toSet("maxAmount"), null, null, false);
         for (Iterator oppsi = orderPaymentPreferenceSums.iterator(); oppsi.hasNext();) {

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java?rev=809357&r1=809356&r2=809357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java Sun Aug 30 15:32:46 2009
@@ -306,7 +306,8 @@
         try {
             List cond = UtilMisc.toList(
                     EntityCondition.makeCondition("paymentId", EntityOperator.EQUALS, payment.getString("paymentId")),
-                    EntityCondition.makeCondition("toPaymentId", EntityOperator.EQUALS, payment.getString("paymentId")));
+                    EntityCondition.makeCondition("toPaymentId", EntityOperator.EQUALS, payment.getString("paymentId"))
+                   );
             EntityCondition partyCond = EntityCondition.makeCondition(cond, EntityOperator.OR);
             paymentApplications = payment.getDelegator().findList("PaymentApplication", partyCond, null, UtilMisc.toList("invoiceId", "billingAccountId"), null, false);
             if (UtilValidate.isNotEmpty(paymentApplications)) {

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java?rev=809357&r1=809356&r2=809357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java Sun Aug 30 15:32:46 2009
@@ -105,7 +105,8 @@
                     "creditCard", creditCard,
                     "billingAddress", billingAddress,
                     "shippingAddress", shippingAddress,
-                    "orderId", orderId);
+                    "orderId", orderId
+           );
             serviceInput.put("processAmount", new BigDecimal("200.00"));
 
             // run the service (make sure in payment
@@ -138,7 +139,8 @@
                     "creditAmount", creditAmount,
                     "billToEmail", emailAddr,
                     "creditCard", creditCard,
-                    "creditAmount", new BigDecimal("200.00"));
+                    "creditAmount", new BigDecimal("200.00")
+           );
             // run the service
             Map result = dispatcher.runSync("clearCommerceCCCredit",serviceMap);
 
@@ -169,7 +171,8 @@
                     "creditAmount", creditAmount,
                     "billToEmail", emailAddr,
                     "creditCard", creditCard,
-                    "pbOrder", pbOrder);          // if supplied, the crediting is for a subscription and credit by period is managed by ClearCommerce
+                    "pbOrder", pbOrder          // if supplied, the crediting is for a subscription and credit by period is managed by ClearCommerce
+           );
             serviceMap.put("creditAmount", new BigDecimal("200.00"));
 
             // run the service
@@ -218,7 +221,8 @@
 
             Map serviceMap = UtilMisc.toMap(
                     "orderId", "4488668f-2db0-3002-002b-0003ba1d84d5",
-                    "paymentConfig", configFile);
+                    "paymentConfig", configFile
+           );
 
             // run the service
             Map result = dispatcher.runSync("clearCommerceCCReport",serviceMap);

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java?rev=809357&r1=809356&r2=809357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java Sun Aug 30 15:32:46 2009
@@ -85,7 +85,7 @@
     // Used to maintain a weak reference to the ShoppingCart for customers who have gone to PayPal to checkout
     // so that we can quickly grab the cart, perform shipment estimates and send the info back to PayPal.
     // The weak key is a simple wrapper for the checkout token String and is stored as a cart attribute. The value
-    // is a weak reference to the ShoppingCart itself.  Entries will be removed as carts are removed from the
+    // is a weak reference to the ShoppingCart itself.  Entries will be removed as carts are removed from the 
     // session (i.e. on cart clear or successful checkout) or when the session is destroyed
     private static Map<TokenWrapper, WeakReference<ShoppingCart>> tokenCartMap = new WeakHashMap<TokenWrapper, WeakReference<ShoppingCart>>();
 
@@ -441,7 +441,9 @@
             EntityCondition cond = EntityCondition.makeCondition(UtilMisc.toList(
                     EntityCondition.makeCondition(UtilMisc.toMap("partyId", partyId, "contactMechTypeId", "EMAIL_ADDRESS")),
                     EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("infoString"), EntityComparisonOperator.EQUALS, EntityFunction.UPPER(emailAddress)),
-                    EntityUtil.getFilterByDateExpr()));
+                    EntityUtil.getFilterByDateExpr()
+
+           ));
             try {
                 GenericValue matchingEmail = EntityUtil.getFirst(delegator.findList("PartyAndContactMech", cond, null, UtilMisc.toList("fromDate"), null, false));
                 if (matchingEmail != null) {
@@ -524,14 +526,16 @@
                     EntityCondition.makeCondition(postalMap),
                     EntityCondition.makeCondition(UtilMisc.toMap("attnName", null, "directions", null, "postalCodeExt", null,"postalCodeGeoId", null)),
                     EntityUtil.getFilterByDateExpr(),
-                    EntityCondition.makeCondition("partyId", partyId)));
+                    EntityCondition.makeCondition("partyId", partyId)
+           ));
             try {
                 GenericValue postalMatch = EntityUtil.getFirst(delegator.findList("PartyAndPostalAddress", cond, null, UtilMisc.toList("fromDate"), null, false));
                 if (postalMatch != null) {
                     postalContactId = postalMatch.getString("contactMechId");
                     EntityCondition purposeCond = EntityCondition.makeCondition(UtilMisc.toList(
                             EntityCondition.makeCondition(UtilMisc.toMap("partyId", partyId, "contactMechId", postalContactId)),
-                            EntityUtil.getFilterByDateExpr()));
+                            EntityUtil.getFilterByDateExpr()
+                   ));
                     List<GenericValue> postalPurposes = delegator.findList("PartyContactMechPurpose", purposeCond, null, null, null, false);
                     List<Object> purposeStrings = EntityUtil.getFieldListFromEntityList(postalPurposes, "contactMechPurposeTypeId", false);
                     if (UtilValidate.isNotEmpty(purposeStrings) && purposeStrings.contains("SHIPPING_LOCATION")) {
@@ -588,8 +592,8 @@
             String shippingMethodTypeDesc = StringUtils.join(shipMethodSplit, " - ", 1, shipMethodSplit.length);
             try {
                 EntityCondition cond = EntityCondition.makeCondition(
-                        UtilMisc.toMap("productStoreId", cart.getProductStoreId(),
-                                "partyId", shipMethodSplit[0], "roleTypeId", "CARRIER", "description", shippingMethodTypeDesc));
+                        UtilMisc.toMap("productStoreId", cart.getProductStoreId(), "partyId", shipMethodSplit[0], "roleTypeId", "CARRIER", "description", shippingMethodTypeDesc)
+               );
                 GenericValue shipmentMethod = EntityUtil.getFirst(delegator.findList("ProductStoreShipmentMethView", cond, null, null, null, false));
                 cart.setShipmentMethodTypeId(shipmentMethod.getString("shipmentMethodTypeId"));
             } catch (GenericEntityException e1) {
@@ -872,7 +876,7 @@
             // so until further testing proves we should do otherwise I'm just going to return requested void amount
             result.put("releaseAmount", context.get("releaseAmount"));
             result.put("releaseRefNum", decoder.get("AUTHORIZATIONID"));
-        }
+        }        
         return result;
     }
 
@@ -918,7 +922,7 @@
             result.put("refundResult", true);
             result.put("refundAmount", new BigDecimal(decoder.get("NETREFUNDAMT")));
             result.put("refundRefNum", decoder.get("REFUNDTRANSACTIONID"));
-        }
+        }        
         return result;
     }
 

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=809357&r1=809356&r2=809357&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Sun Aug 30 15:32:46 2009
@@ -373,7 +373,8 @@
                                 "roleTypeId",  workEffortPartyAssignment.getString("roleTypeId"),
                                 "fromDate",  workEffortPartyAssignment.getTimestamp("fromDate"),
                                 "statusId",  workEffortPartyAssignment.getString("statusId"),
-                                "userLogin", userLogin);
+                                "userLogin", userLogin
+                       );
                         try {
                             resultService = dispatcher.runSync("assignPartyToWorkEffort", partyToWorkEffort);
                         } catch (GenericServiceException e) {
@@ -1434,7 +1435,8 @@
                         "roleTypeId",  workEffortPartyAssignment.getString("roleTypeId"),
                         "fromDate",  workEffortPartyAssignment.getTimestamp("fromDate"),
                         "statusId",  workEffortPartyAssignment.getString("statusId"),
-                        "userLogin", userLogin);
+                        "userLogin", userLogin
+               );
                 try {
                     resultService = dispatcher.runSync("assignPartyToWorkEffort", partyToWorkEffort);
                 } catch (GenericServiceException e) {
@@ -2228,7 +2230,7 @@
                     BigDecimal totalQuantity = (BigDecimal)components.get(componentProductId);
                     componentQuantity = totalQuantity.add(componentQuantity);
                 }
-
+                
                 // check if a bom exists
                 List bomList = null;
                 try {
@@ -2257,7 +2259,7 @@
                     } catch (GenericEntityException e) {
                         return ServiceUtil.returnError("try to create workeffort assoc");
                     }
-
+                    
                 } else {
                     components.put(componentProductId, componentQuantity);
                 }

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java?rev=809357&r1=809356&r2=809357&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java Sun Aug 30 15:32:46 2009
@@ -125,7 +125,8 @@
                 if (! workEffortIdFrom.equals(routingTaskAssoc.getString("workEffortIdFrom")) ||
                 ! workEffortIdTo.equals(routingTaskAssoc.getString("workEffortIdTo")) ||
                 ! workEffortAssocTypeId.equals(routingTaskAssoc.getString("workEffortAssocTypeId")) ||
-                ! sequenceNum.equals(routingTaskAssoc.getLong("sequenceNum"))) {
+                ! sequenceNum.equals(routingTaskAssoc.getLong("sequenceNum"))
+               ) {
                     if (routingTaskAssoc.getTimestamp("thruDate") == null && routingTaskAssoc.getTimestamp("fromDate") == null) sequenceNumNotOk = "Y";
                     else if (routingTaskAssoc.getTimestamp("thruDate") == null) {
                         if (thruDate == null) sequenceNumNotOk = "Y";

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=809357&r1=809356&r2=809357&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Sun Aug 30 15:32:46 2009
@@ -306,7 +306,7 @@
     public static Map sendReturnCancelNotification(DispatchContext dctx, Map context) {
         return sendReturnNotificationScreen(dctx, context, "PRDS_RTN_CANCEL");
     }
-
+    
     // cancel replacement order if return not received within 30 days and send notification
     public static Map<String,Object> autoCancelReplacementOrders(DispatchContext dctx, Map<String, ? extends Object> context) {
         GenericDelegator delegator = dctx.getDelegator();
@@ -315,7 +315,7 @@
         List<GenericValue> returnHeaders = null;
         try {
             returnHeaders = delegator.findList("ReturnHeader", EntityCondition.makeCondition(
-                    EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "RETURN_ACCEPTED"), EntityOperator.AND,
+                    EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "RETURN_ACCEPTED"), EntityOperator.AND, 
                     EntityCondition.makeCondition("returnHeaderTypeId", EntityOperator.EQUALS, "CUSTOMER_RETURN")), null, UtilMisc.toList("entryDate"), null, false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Problem getting Return headers", module);
@@ -339,7 +339,7 @@
                 if (cancelDate.equals(nowDate) || nowDate.after(cancelDate)) {
                     try {
                         List<GenericValue> returnItems = delegator.findList("ReturnItem", EntityCondition.makeCondition(
-                                EntityCondition.makeCondition("returnId", EntityOperator.EQUALS, returnId), EntityOperator.AND,
+                                EntityCondition.makeCondition("returnId", EntityOperator.EQUALS, returnId), EntityOperator.AND, 
                                 EntityCondition.makeCondition("returnTypeId", EntityOperator.EQUALS, "RTN_WAIT_REPLACE_RES")), null, UtilMisc.toList("createdStamp"), null, false);
                         for (GenericValue returnItem : returnItems) {
                             GenericValue returnItemResponse = returnItem.getRelatedOne("ReturnItemResponse");
@@ -464,11 +464,12 @@
             // OrderItems which have been issued may be returned.
             EntityConditionList whereConditions = EntityCondition.makeCondition(UtilMisc.toList(
                     EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderHeader.getString("orderId")),
-                    EntityCondition.makeCondition("orderItemStatusId", EntityOperator.IN,
-                            UtilMisc.toList("ITEM_APPROVED", "ITEM_COMPLETED"))), EntityOperator.AND);
+                    EntityCondition.makeCondition("orderItemStatusId", EntityOperator.IN, UtilMisc.toList("ITEM_APPROVED", "ITEM_COMPLETED"))
+               ), EntityOperator.AND);
             /*
             EntityConditionList havingConditions = EntityCondition.makeCondition(UtilMisc.toList(
-                    EntityCondition.makeCondition("quantityIssued", EntityOperator.GREATER_THAN, Double.valueOf(0))), EntityOperator.AND);               
+                    EntityCondition.makeCondition("quantityIssued", EntityOperator.GREATER_THAN, Double.valueOf(0))
+               ), EntityOperator.AND);
              */
             List orderItemQuantitiesIssued = null;
             try {
@@ -963,7 +964,7 @@
 
         return ServiceUtil.returnSuccess();
     }
-
+    
     /**
      * Helper method to get billing account balance, cannot use BillingAccountWorker.getBillingAccountBalance()
      * due to circular build dependency.
@@ -987,9 +988,8 @@
                 EntityCondition.makeCondition("billingAccountId", EntityOperator.EQUALS, billingAccountId),
                 EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "EXT_BILLACT"),
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_IN, UtilMisc.toList("ORDER_CANCELLED", "ORDER_REJECTED")),
-                EntityCondition.makeCondition("preferenceStatusId", EntityOperator.NOT_IN,
-                        UtilMisc.toList("PAYMENT_SETTLED", "PAYMENT_RECEIVED", "PAYMENT_DECLINED", "PAYMENT_CANCELLED"))),
-                        EntityOperator.AND); // PAYMENT_NOT_AUTH
+                EntityCondition.makeCondition("preferenceStatusId", EntityOperator.NOT_IN, UtilMisc.toList("PAYMENT_SETTLED", "PAYMENT_RECEIVED", "PAYMENT_DECLINED", "PAYMENT_CANCELLED")) // PAYMENT_NOT_AUTH
+           ), EntityOperator.AND);
 
         List orderPaymentPreferenceSums = delegator.findList("OrderPurchasePaymentSummary", whereConditions, UtilMisc.toSet("maxAmount"), null, null, false);
         for (Iterator oppsi = orderPaymentPreferenceSums.iterator(); oppsi.hasNext();) {
@@ -1089,7 +1089,7 @@
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         String orderId = (String) context.get("orderId");
         Map serviceResult = FastMap.newInstance();
-
+        
         GenericValue orderHeader = null;
         List<GenericValue> orderPayPrefs = FastList.newInstance();
         try {
@@ -1099,7 +1099,7 @@
             Debug.logError("Problem looking up order information for orderId #" + orderId, module);
             ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "OrderCannotGetOrderHeader", locale));
         }
-
+         
         // Check for replacement order
         if (UtilValidate.isEmpty(orderPayPrefs)) {
             List<GenericValue> returnItemResponses = FastList.newInstance();
@@ -1109,7 +1109,7 @@
                 Debug.logError("Problem getting ReturnItemResponses", module);
                 ServiceUtil.returnError(e.getMessage());
             }
-
+            
             for (GenericValue returnItemResponse : returnItemResponses) {
                 GenericValue returnItem = null;
                 GenericValue returnHeader = null;
@@ -1120,7 +1120,7 @@
                     Debug.logError("Problem getting ReturnItem", module);
                     ServiceUtil.returnError(e.getMessage());
                 }
-
+                
                 if ("RETURN_RECEIVED".equals(returnHeader.getString("statusId"))) {
                     String returnId = returnItem.getString("returnId");
                     String returnTypeId = returnItem.getString("returnTypeId");
@@ -1199,7 +1199,7 @@
 
                     List exprs = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PAYMENT_SETTLED"), EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PAYMENT_RECEIVED"));
                     orderPayPrefs = EntityUtil.filterByOr(orderPayPrefs, exprs);
-
+                    
                     // Check for replacement order
                     if (UtilValidate.isEmpty(orderPayPrefs)) {
                         List<GenericValue> orderItemAssocs = delegator.findByAnd("OrderItemAssoc", UtilMisc.toMap("toOrderId", orderId, "orderItemAssocTypeId", "REPLACEMENT"));
@@ -1250,10 +1250,10 @@
                 // We break the OPPs down this way because we need to process the refunds to payment methods in a particular order
                 Map receivedPaymentTotalsByPaymentMethod = orderReadHelper.getReceivedPaymentTotalsByPaymentMethod() ;
                 Map refundedTotalsByPaymentMethod = orderReadHelper.getReturnedTotalsByPaymentMethod() ;
-
-                // getOrderPaymentPreferenceTotalByType has been called because getReceivedPaymentTotalsByPaymentMethod does not
+                
+                // getOrderPaymentPreferenceTotalByType has been called because getReceivedPaymentTotalsByPaymentMethod does not 
                 // return payments captured from Billing Account.This is because when payment is captured from Billing Account
-                // then no entry is maintained in Payment entity.
+                // then no entry is maintained in Payment entity. 
                 BigDecimal receivedPaymentTotalsByBillingAccount = orderReadHelper.getOrderPaymentPreferenceTotalByType("EXT_BILLACT");
 
                 /*
@@ -1273,7 +1273,7 @@
                     if (receivedPaymentTotalsByPaymentMethod.containsKey(orderPayPrefKey)) {
                         orderPayPrefReceivedTotal = orderPayPrefReceivedTotal.add((BigDecimal)receivedPaymentTotalsByPaymentMethod.get(orderPayPrefKey)).setScale(decimals, rounding);
                     }
-
+                    
                     if (receivedPaymentTotalsByBillingAccount != null) {
                         orderPayPrefReceivedTotal = orderPayPrefReceivedTotal.add(receivedPaymentTotalsByBillingAccount);
                     }
@@ -1301,7 +1301,7 @@
 
                 // This can be extended to support additional electronic types
                 List electronicTypes = UtilMisc.toList("CREDIT_CARD", "EFT_ACCOUNT", "FIN_ACCOUNT", "GIFT_CARD");
-
+                
                 // Figure out if EXT_PAYPAL should be considered as an electronic type
                 if (productStore != null) {
                     ExpressCheckoutEvents.CheckoutType payPalType = ExpressCheckoutEvents.determineCheckoutType(delegator, productStore.getString("productStoreId"));
@@ -1428,7 +1428,7 @@
                             Iterator itemsIter = items.iterator();
                             while (itemsIter.hasNext()) {
                                 GenericValue item = (GenericValue) itemsIter.next();
-
+                                
                                 Map returnItemMap = UtilMisc.toMap("returnItemResponseId", responseId, "returnId", item.get("returnId"), "returnItemSeqId", item.get("returnItemSeqId"), "statusId", returnItemStatusId, "userLogin", userLogin);
                                 //Debug.log("Updating item status", module);
                                 try {
@@ -2069,7 +2069,7 @@
                         }
                         if (ServiceUtil.isError(serviceResult)) {
                             return ServiceUtil.returnError(ServiceUtil.getErrorMessage(serviceResult));
-                        }
+                        }                        
                     } else {
                         OrderChangeHelper.approveOrder(dispatcher, userLogin, createdOrderId);
                     }

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=809357&r1=809356&r2=809357&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 Sun Aug 30 15:32:46 2009
@@ -932,7 +932,7 @@
                 toBeStored.add(productPromoUse);
             }
         }
-
+        
         // store the orderProductPromoCodes
         Set orderProductPromoCodes = (Set) context.get("orderProductPromoCodes");
         if (UtilValidate.isNotEmpty(orderProductPromoCodes)) {
@@ -2794,7 +2794,8 @@
                 EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"),
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_COMPLETED"),
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
-                EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"));
+                EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED")
+       );
         EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(exprs, EntityOperator.AND);
 
         // get the orders
@@ -3586,7 +3587,7 @@
 
         // run promotions to handle all changes in the cart
         ProductPromoWorker.doPromotions(cart, dispatcher);
-
+        
         // log an order note
         try {
             dispatcher.runSync("createOrderNote", UtilMisc.<String, Object>toMap("orderId", orderId, "note", "Updated order.", "internalNote", "Y", "userLogin", userLogin));
@@ -3858,7 +3859,7 @@
 
         toStore.addAll(cart.makeOrderItems());
         toStore.addAll(cart.makeAllAdjustments());
-
+        
         String shipGroupSeqId = null;
         long groupIndex = cart.getShipInfoSize();
         List orderAdjustments = new ArrayList();
@@ -3884,7 +3885,7 @@
         }
         for (GenericValue toAdd: (List<GenericValue>)toAddList) {
             if ("OrderAdjustment".equals(toAdd.getEntityName())) {
-                if (toAdd.get("comments") != null && ((String)toAdd.get("comments")).startsWith("Added manually by") && (("PROMOTION_ADJUSTMENT".equals(toAdd.get("orderAdjustmentTypeId"))) ||
+                if (toAdd.get("comments") != null && ((String)toAdd.get("comments")).startsWith("Added manually by") && (("PROMOTION_ADJUSTMENT".equals(toAdd.get("orderAdjustmentTypeId"))) || 
                         ("SHIPPING_CHARGES".equals(toAdd.get("orderAdjustmentTypeId"))) || ("SALES_TAX".equals(toAdd.get("orderAdjustmentTypeId"))))) {
                     toStore.add(toAdd);
                 }
@@ -5313,7 +5314,7 @@
         LocalDispatcher dispatcher = dctx.getDispatcher();
         // All orders with an entryDate > orderEntryFromDateTime will be processed
         Timestamp orderEntryFromDateTime = (Timestamp) context.get("orderEntryFromDateTime");
-        // If true all orders ever created will be processed and any pre-existing ALSO_BOUGHT ProductAssocs will be expired
+        // If true all orders ever created will be processed and any pre-existing ALSO_BOUGHT ProductAssocs will be expired 
         boolean processAllOrders = context.get("processAllOrders") == null ? false : (Boolean) context.get("processAllOrders");
         if (orderEntryFromDateTime == null && !processAllOrders) {
             // No from date supplied, check to see when this service last ran and use the startDateTime
@@ -5377,14 +5378,14 @@
         }
         return ServiceUtil.returnSuccess();
     }
-
+    
     public static Map<String, Object> createAlsoBoughtProductAssocsForOrder(DispatchContext dctx, Map context) {
         LocalDispatcher dispatcher = dctx.getDispatcher();
         GenericDelegator delegator = dctx.getDelegator();
         String orderId = (String) context.get("orderId");
         OrderReadHelper orh = new OrderReadHelper(delegator, orderId);
         List<GenericValue> orderItems = orh.getOrderItems();
-        // In order to improve efficiency a little bit, we will always create the ProductAssoc records
+        // In order to improve efficiency a little bit, we will always create the ProductAssoc records 
         // with productId < productIdTo when the two are compared.  This way when checking for an existing
         // record we don't have to check both possible combinations of productIds
         TreeSet<String> productIdSet = new TreeSet<String>();
@@ -5445,7 +5446,7 @@
                 }
             }
         }
-
+        
         return ServiceUtil.returnSuccess();
     }
 }