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

svn commit: r805012 [4/11] - in /ofbiz/branches/executioncontext20090812: ./ applications/accounting/ applications/accounting/config/ applications/accounting/data/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/scr...

Modified: ofbiz/branches/executioncontext20090812/applications/content/widget/content/DataResourceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/content/widget/content/DataResourceForms.xml?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/content/widget/content/DataResourceForms.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/content/widget/content/DataResourceForms.xml Mon Aug 17 15:42:56 2009
@@ -28,30 +28,39 @@
         <field name="dataResourceName"><text-find default-option="contains" ignore-case="true"/></field>
         <field name="dataResourceTypeId">
             <drop-down allow-empty="true">
-                <entity-options description="${description}" entity-name="DataResourceType" key-field-name="dataResourceTypeId"/>
+                <entity-options description="${description}" entity-name="DataResourceType" key-field-name="dataResourceTypeId">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
             </drop-down>
         </field>
         <field name="mimeTypeId" position="2">
             <drop-down allow-empty="true">
-                <entity-options description="${description}" entity-name="MimeType" key-field-name="mimeTypeId"/>
+                <entity-options description="${description}" entity-name="MimeType" key-field-name="mimeTypeId">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
             </drop-down>
         </field>
         <field name="statusId">
             <drop-down allow-empty="true">
                 <entity-options description="${description}" entity-name="StatusItem">
                     <entity-constraint name="statusTypeId" operator="equals" value="CONTENT_STATUS"/>
+                    <entity-order-by field-name="description"/>
                 </entity-options>
             </drop-down>
         </field>
         <field name="localeString" position="2">
             <drop-down allow-empty="true">
-                <entity-options entity-name="CountryCode" description="${countryName} [${countryCode}]" key-field-name="countryCode"/>
+                <entity-options entity-name="CountryCode" description="${countryName} [${countryCode}]" key-field-name="countryCode">
+                    <entity-order-by field-name="countryName"/>
+                </entity-options>
             </drop-down>
         </field>
         <field name="createdByUserLogin" position="1"><lookup target-form-name="LookupPerson"/></field>
         <field name="dataCategoryId" position="2">
             <drop-down allow-empty="true">
-                <entity-options description="${categoryName}" entity-name="DataCategory"/>
+                <entity-options description="${categoryName}" entity-name="DataCategory">
+                    <entity-order-by field-name="categoryName"/>
+                </entity-options>
             </drop-down>
          </field>
         <field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field>

Modified: ofbiz/branches/executioncontext20090812/applications/humanres/config/HumanResUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/humanres/config/HumanResUiLabels.xml?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/humanres/config/HumanResUiLabels.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/humanres/config/HumanResUiLabels.xml Mon Aug 17 15:42:56 2009
@@ -1838,7 +1838,7 @@
      <property key="PageTitleFindRelocationDetails">
         <value xml:lang="en">Find Relocation Details</value>
     </property>
-	<property key="HumanResPreRequisiteSkill">
+    <property key="HumanResPreRequisiteSkill">
         <value xml:lang="en">Pre Requisite Skill</value>
     </property>
     <property key="HumanResTrainingApprovals">

Modified: ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java Mon Aug 17 15:42:56 2009
@@ -729,7 +729,7 @@
                         } catch (GenericServiceException e) {
                             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingPackageConfiguratorError", locale));
                         }
-                        totalWidth = totalWidth.add( qty.multiply(productDepth) );
+                        totalWidth = totalWidth.add(qty.multiply(productDepth));
                         if (qty.compareTo(maxQuantity) == 0) shipmentPackageSeqId = null;
                         remQuantity = remQuantity.subtract(qty);
                     }

Modified: ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java Mon Aug 17 15:42:56 2009
@@ -55,7 +55,7 @@
         //        Timestamp now = UtilDateTime.nowTimestamp();
 
         try {
-            if (productionRunId != null ) {
+            if (productionRunId != null) {
                 GenericValue productionRun = delegator.findByPrimaryKey("WorkEffort", UtilMisc.toMap("workEffortId", productionRunId));
                 if (productionRun != null) {
                     List productionRunProducts = productionRun.getRelated("WorkEffortGoodStandard", UtilMisc.toMap("workEffortGoodStdTypeId", "PRUN_PROD_DELIV"),null);

Modified: ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Mon Aug 17 15:42:56 2009
@@ -374,7 +374,7 @@
                                 "fromDate",  workEffortPartyAssignment.getTimestamp("fromDate"),
                                 "statusId",  workEffortPartyAssignment.getString("statusId"),
                                 "userLogin", userLogin
-                        );
+                       );
                         try {
                             resultService = dispatcher.runSync("assignPartyToWorkEffort", partyToWorkEffort);
                         } catch (GenericServiceException e) {
@@ -1133,7 +1133,7 @@
                         if (! priority.equals(routingTask.get("priority"))) {
                             routingTask.set("priority", priority);
                             // update the routingTask List and re-read it to be able to have it sorted with the new value
-                            if ( ! productionRun.store()) {
+                            if (! productionRun.store()) {
                                 Debug.logError("productionRun.store(), in routingTask.priority update, fail for productionRunId ="+productionRunId,module);
                                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotUpdated", locale));
                             }
@@ -1426,7 +1426,7 @@
                         "fromDate",  workEffortPartyAssignment.getTimestamp("fromDate"),
                         "statusId",  workEffortPartyAssignment.getString("statusId"),
                         "userLogin", userLogin
-                );
+               );
                 try {
                     resultService = dispatcher.runSync("assignPartyToWorkEffort", partyToWorkEffort);
                 } catch (GenericServiceException e) {
@@ -2224,34 +2224,34 @@
                 // check if a bom exists
                 List bomList = null;
                 try {
-                	bomList = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", componentProductId, "productAssocTypeId", "MANUF_COMPONENT"));
-                	bomList = EntityUtil.filterByDate(bomList, UtilDateTime.nowTimestamp());
+                    bomList = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", componentProductId, "productAssocTypeId", "MANUF_COMPONENT"));
+                    bomList = EntityUtil.filterByDate(bomList, UtilDateTime.nowTimestamp());
                 } catch (GenericEntityException e) {
-                	return ServiceUtil.returnError("try to get BOM list from productAssoc");
+                    return ServiceUtil.returnError("try to get BOM list from productAssoc");
                 }
                 // if so create a mandatory predecessor to this production run
-                if(UtilValidate.isNotEmpty(bomList)) {
-                	serviceContext.clear();
-                	serviceContext.put("productId", componentProductId);
-                	serviceContext.put("quantity", componentQuantity);
-                	serviceContext.put("startDate", UtilDateTime.nowTimestamp());
-                	serviceContext.put("facilityId", facilityId);
-                	serviceContext.put("userLogin", userLogin);
-                	resultService = null;
-                	try {
-                		resultService = dispatcher.runSync("createProductionRunsForProductBom", serviceContext);
-                		GenericValue workEffortPreDecessor = delegator.makeValue("WorkEffortAssoc", UtilMisc.toMap(
-                				"workEffortIdTo", productionRunId, "workEffortIdFrom", resultService.get("productionRunId"),
-                				"workEffortAssocTypeId", "WORK_EFF_PRECEDENCY", "fromDate", UtilDateTime.nowTimestamp()));
-                		workEffortPreDecessor.create();
-                	} catch (GenericServiceException e) {
-                		return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotCreated", locale));
-                	} catch (GenericEntityException e) {
-                		return ServiceUtil.returnError("try to create workeffort assoc");
-                	}
-                	
+                if (UtilValidate.isNotEmpty(bomList)) {
+                    serviceContext.clear();
+                    serviceContext.put("productId", componentProductId);
+                    serviceContext.put("quantity", componentQuantity);
+                    serviceContext.put("startDate", UtilDateTime.nowTimestamp());
+                    serviceContext.put("facilityId", facilityId);
+                    serviceContext.put("userLogin", userLogin);
+                    resultService = null;
+                    try {
+                        resultService = dispatcher.runSync("createProductionRunsForProductBom", serviceContext);
+                        GenericValue workEffortPreDecessor = delegator.makeValue("WorkEffortAssoc", UtilMisc.toMap(
+                                "workEffortIdTo", productionRunId, "workEffortIdFrom", resultService.get("productionRunId"),
+                                "workEffortAssocTypeId", "WORK_EFF_PRECEDENCY", "fromDate", UtilDateTime.nowTimestamp()));
+                        workEffortPreDecessor.create();
+                    } catch (GenericServiceException e) {
+                        return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotCreated", locale));
+                    } catch (GenericEntityException e) {
+                        return ServiceUtil.returnError("try to create workeffort assoc");
+                    }
+                    
                 } else {
-                	components.put(componentProductId, componentQuantity);
+                    components.put(componentProductId, componentQuantity);
                 }
 
                 //  create production run notes from comments

Modified: ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java Mon Aug 17 15:42:56 2009
@@ -122,11 +122,11 @@
             Iterator  i = listRoutingTaskAssoc.iterator();
             while (i.hasNext()) {
                 GenericValue routingTaskAssoc = (GenericValue) i.next();
-                if ( ! workEffortIdFrom.equals(routingTaskAssoc.getString("workEffortIdFrom")) ||
+                if (! workEffortIdFrom.equals(routingTaskAssoc.getString("workEffortIdFrom")) ||
                 ! workEffortIdTo.equals(routingTaskAssoc.getString("workEffortIdTo")) ||
                 ! workEffortAssocTypeId.equals(routingTaskAssoc.getString("workEffortAssocTypeId")) ||
                 ! 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";
@@ -136,14 +136,14 @@
                         if (fromDate == null) sequenceNumNotOk = "Y";
                         else if (fromDate.before(routingTaskAssoc.getTimestamp("thruDate"))) sequenceNumNotOk = "Y";
                     }
-                    else if ( fromDate == null && thruDate == null) sequenceNumNotOk = "Y";
+                    else if (fromDate == null && thruDate == null) sequenceNumNotOk = "Y";
                     else if (thruDate == null) {
                         if (fromDate.before(routingTaskAssoc.getTimestamp("thruDate"))) sequenceNumNotOk = "Y";
                     }
                     else if (fromDate == null) {
                         if (thruDate.after(routingTaskAssoc.getTimestamp("fromDate"))) sequenceNumNotOk = "Y";
                     }
-                    else if ( routingTaskAssoc.getTimestamp("fromDate").before(thruDate) && fromDate.before(routingTaskAssoc.getTimestamp("thruDate")) ) sequenceNumNotOk = "Y";
+                    else if (routingTaskAssoc.getTimestamp("fromDate").before(thruDate) && fromDate.before(routingTaskAssoc.getTimestamp("thruDate"))) sequenceNumNotOk = "Y";
                 } else if (createProcess) sequenceNumNotOk = "Y";
             }
         }
@@ -207,7 +207,7 @@
         Double capacity = null;
         Time startTime = null;
         while (capacity == null || capacity.doubleValue()==0) {
-            switch ( dayStart) {
+            switch (dayStart) {
                 case Calendar.MONDAY:
                     capacity =  techDataCalendarWeek.getDouble("mondayCapacity");
                     startTime =  techDataCalendarWeek.getTime("mondayStartTime");
@@ -273,7 +273,7 @@
         Time startTime = (Time) position.get("startTime");
         Double capacity = (Double) position.get("capacity");
         Timestamp startAvailablePeriod = new Timestamp(UtilDateTime.getDayStart(dateFrom).getTime() + startTime.getTime() + cDateTrav.get(Calendar.ZONE_OFFSET) + cDateTrav.get(Calendar.DST_OFFSET));
-        if (dateFrom.before(startAvailablePeriod) ) return 0;
+        if (dateFrom.before(startAvailablePeriod)) return 0;
         Timestamp endAvailablePeriod = new Timestamp(startAvailablePeriod.getTime()+capacity.longValue());
         if (dateFrom.after(endAvailablePeriod)) return 0;
         return  endAvailablePeriod.getTime() - dateFrom.getTime();
@@ -304,7 +304,7 @@
         int moveDay = ((Integer) position.get("moveDay")).intValue();
         dateTo = (moveDay == 0) ? dateFrom : UtilDateTime.getDayStart(dateFrom,moveDay);
         Timestamp startAvailablePeriod = new Timestamp(UtilDateTime.getDayStart(dateTo).getTime() + startTime.getTime() + cDateTrav.get(Calendar.ZONE_OFFSET) + cDateTrav.get(Calendar.DST_OFFSET));
-        if (dateTo.before(startAvailablePeriod) ) {
+        if (dateTo.before(startAvailablePeriod)) {
             dateTo = startAvailablePeriod;
         }
         else {
@@ -362,7 +362,7 @@
         Double capacity = null;
         Time startTime = null;
         while (capacity == null || capacity.doubleValue() == 0) {
-            switch ( dayEnd) {
+            switch (dayEnd) {
                 case Calendar.MONDAY:
                     capacity =  techDataCalendarWeek.getDouble("mondayCapacity");
                     startTime =  techDataCalendarWeek.getTime("mondayStartTime");
@@ -427,7 +427,7 @@
         Time startTime = (Time) position.get("startTime");
         Double capacity = (Double) position.get("capacity");
         Timestamp startAvailablePeriod = new Timestamp(UtilDateTime.getDayStart(dateFrom).getTime() + startTime.getTime() + cDateTrav.get(Calendar.ZONE_OFFSET) + cDateTrav.get(Calendar.DST_OFFSET));
-        if (dateFrom.before(startAvailablePeriod) ) return 0;
+        if (dateFrom.before(startAvailablePeriod)) return 0;
         Timestamp endAvailablePeriod = new Timestamp(startAvailablePeriod.getTime()+capacity.longValue());
         if (dateFrom.after(endAvailablePeriod)) return 0;
         return  dateFrom.getTime() - startAvailablePeriod.getTime();
@@ -459,7 +459,7 @@
         Double capacity = (Double) position.get("capacity");
         dateTo = (moveDay == 0) ? dateFrom : UtilDateTime.getDayEnd(dateFrom, Long.valueOf(moveDay));
         Timestamp endAvailablePeriod = new Timestamp(UtilDateTime.getDayStart(dateTo).getTime() + startTime.getTime() + capacity.longValue() + cDateTrav.get(Calendar.ZONE_OFFSET) + cDateTrav.get(Calendar.DST_OFFSET));
-        if (dateTo.after(endAvailablePeriod) ) {
+        if (dateTo.after(endAvailablePeriod)) {
             dateTo = endAvailablePeriod;
         }
         else {

Modified: ofbiz/branches/executioncontext20090812/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml Mon Aug 17 15:42:56 2009
@@ -21,6 +21,7 @@
 <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
     <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
+    <include location="component://commonext/webapp/WEB-INF/controller.xml"/>
     <description>Manufacturing Component Site Configuration File</description>
     <owner>Copyright 2001-2009 The Apache Software Foundation</owner>
 

Modified: ofbiz/branches/executioncontext20090812/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java Mon Aug 17 15:42:56 2009
@@ -260,7 +260,7 @@
                 }
             }
 
-            if ( visitorSiteId == null || (visitorSiteId != null && !visitorSiteId.equals(siteId)) ) {
+            if (visitorSiteId == null || (visitorSiteId != null && !visitorSiteId.equals(siteId))) {
                 // if trackingCode.siteId is  not null  write a trackable cookie with name in the form: Ofbiz.TKCSiteId and timeout will be 60 * 60 * 24 * 365
                 Cookie siteIdCookie = new Cookie("Ofbiz.TKCD.SiteId" ,siteId);
                 siteIdCookie.setMaxAge(siteIdCookieAge);
@@ -499,7 +499,7 @@
             GenericValue trackingCodeOrder = delegator.makeValue("TrackingCodeOrder",
                     UtilMisc.toMap("trackingCodeTypeId", trackingCode.get("trackingCodeTypeId"),
                     "trackingCodeId", trackingCodeId, "isBillable", isBillable, "siteId", siteId,
-                    "hasExported", "N", "affiliateReferredTimeStamp",affiliateReferredTimeStamp ));
+                    "hasExported", "N", "affiliateReferredTimeStamp",affiliateReferredTimeStamp));
 
             Debug.logInfo(" trackingCodeOrder is " + trackingCodeOrder, module);
             trackingCodeOrders.add(trackingCodeOrder);

Modified: ofbiz/branches/executioncontext20090812/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java Mon Aug 17 15:42:56 2009
@@ -138,7 +138,7 @@
                             break;
                         }
                     }
-                    if(UtilValidate.isNotEmpty(email)) {
+                    if (UtilValidate.isNotEmpty(email)) {
                         serviceCtx.put("emailAddress", email);
                     }
                     for (Iterator iter = communications.getPhoneNumbers(); iter.hasNext();) {

Modified: ofbiz/branches/executioncontext20090812/applications/marketing/webapp/marketing/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/marketing/webapp/marketing/WEB-INF/controller.xml?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/marketing/webapp/marketing/WEB-INF/controller.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/marketing/webapp/marketing/WEB-INF/controller.xml Mon Aug 17 15:42:56 2009
@@ -21,6 +21,7 @@
 <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
     <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
+    <include location="component://commonext/webapp/WEB-INF/controller.xml"/>
     <description>Marketing Manager Module Site Configuration File</description>
     <owner>Copyright 2001-2009 The Apache Software Foundation</owner>
 

Modified: ofbiz/branches/executioncontext20090812/applications/order/email/default/emailprocessnotify.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/email/default/emailprocessnotify.ftl?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/email/default/emailprocessnotify.ftl (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/email/default/emailprocessnotify.ftl Mon Aug 17 15:42:56 2009
@@ -75,7 +75,7 @@
   </tr>
   <tr>
     <td colspan="2' align="center">
-	  <a href="${baseUrl}/ordermgr/control/orderview?orderId=${orderId}">View Order #${orderId}</a>
+      <a href="${baseUrl}/ordermgr/control/orderview?orderId=${orderId}">View Order #${orderId}</a>
     </td>
   </tr>
 </table>

Modified: ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml Mon Aug 17 15:42:56 2009
@@ -909,7 +909,7 @@
                         <set field="createOrderMap.returnTypeId" value="RTN_WAIT_REPLACE_RES"/>
                         <call-service service-name="processReplacementReturn" in-map-name="createOrderMap"/>
                     </if-compare>
-	            </if-not-empty>                                
+                </if-not-empty>                                
             </if-not-empty>
         </if-compare>
     </simple-method>

Modified: ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderServices.xml?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderServices.xml Mon Aug 17 15:42:56 2009
@@ -1020,9 +1020,9 @@
                     </entity-and>
                     <first-from-list entry="pcmp" list="pcmpList"/>
                     <if-not-empty field="pcmp">
-	                    <set-service-fields service-name="deletePartyContactMechPurposeIfExists" map="pcmp" to-map="serviceInMap"/>
-	                    <call-service service-name="deletePartyContactMechPurposeIfExists" in-map-name="serviceInMap"/>
-	                    <clear-field field="serviceInMap"/>
+                        <set-service-fields service-name="deletePartyContactMechPurposeIfExists" map="pcmp" to-map="serviceInMap"/>
+                        <call-service service-name="deletePartyContactMechPurposeIfExists" in-map-name="serviceInMap"/>
+                        <clear-field field="serviceInMap"/>
                     </if-not-empty>
                     <if-compare field="keepAddressBook" operator="equals" value="N">
                         <set field="serviceInMap.contactMechId" from-field="parameters.billToContactMechId"/>
@@ -1036,10 +1036,10 @@
                         <field-map field-name="contactMechPurposeTypeId" value="BILLING_LOCATION"/>
                     </entity-and>
                     <if-empty field="pcmpList">
-	                    <set field="billToAddressCtx.contactMechPurposeTypeId" value="BILLING_LOCATION"/>
-	                    <set-service-fields service-name="createPartyContactMechPurpose" map="billToAddressCtx" to-map="serviceInMap"/>
-	                    <set field="serviceInMap.contactMechId" from-field="parameters.shipToContactMechId"/>
-	                    <call-service service-name="createPartyContactMechPurpose" in-map-name="serviceInMap"/>
+                        <set field="billToAddressCtx.contactMechPurposeTypeId" value="BILLING_LOCATION"/>
+                        <set-service-fields service-name="createPartyContactMechPurpose" map="billToAddressCtx" to-map="serviceInMap"/>
+                        <set field="serviceInMap.contactMechId" from-field="parameters.shipToContactMechId"/>
+                        <call-service service-name="createPartyContactMechPurpose" in-map-name="serviceInMap"/>
                     </if-empty>
                     <log level="info" message="Billing address updated with contactMechId ${parameters.billToContactMechId}"/>
                 </if-compare-field>

Modified: ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml Mon Aug 17 15:42:56 2009
@@ -50,7 +50,7 @@
         <check-errors/>
         <entity-one entity-name="OrderAdjustment" value-field="lookedUpValue"/>
         <remove-value value-field="lookedUpValue"/>
-		
+        
         <if-not-empty field="parameters.productPromoCodeId">
             <entity-one entity-name="OrderProductPromoCode" value-field="lookedUpValue"/>
             <if-not-empty field="lookedUpValue">

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderEvents.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderEvents.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderEvents.java Mon Aug 17 15:42:56 2009
@@ -124,7 +124,7 @@
                         try {
                             resultMap = dispatcher.runSync("cancelOrderItem", contextMap);
                             
-                            if(ServiceUtil.isError(resultMap)) {
+                            if (ServiceUtil.isError(resultMap)) {
                                 String errorMessage = (String) resultMap.get("errorMessage");
                                 Debug.logError(errorMessage, module);
                                 request.setAttribute("_ERROR_MESSAGE_", errorMessage);
@@ -137,7 +137,7 @@
                             return "error";
                         }
                     }
-                } catch (GenericEntityException e ) {
+                } catch (GenericEntityException e) {
                     Debug.logError(e, module);
                     return "error";
                 }

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderListState.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderListState.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderListState.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderListState.java Mon Aug 17 15:42:56 2009
@@ -151,7 +151,7 @@
     }
 
     private void changeOrderListStates(HttpServletRequest request) {
-        for (Iterator iter = parameterToOrderStatusId.keySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = parameterToOrderStatusId.keySet().iterator(); iter.hasNext();) {
             String param = (String) iter.next();
             String value = request.getParameter(param);
             if ("Y".equals(value)) {
@@ -160,7 +160,7 @@
                 orderStatusState.put(param, "N");
             }
         }
-        for (Iterator iter = parameterToOrderTypeId.keySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = parameterToOrderTypeId.keySet().iterator(); iter.hasNext();) {
             String param = (String) iter.next();
             String value = request.getParameter(param);
             if ("Y".equals(value)) {
@@ -169,7 +169,7 @@
                 orderTypeState.put(param, "N");
             }
         }
-        for (Iterator iter = parameterToFilterId.keySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = parameterToFilterId.keySet().iterator(); iter.hasNext();) {
             String param = (String) iter.next();
             String value = request.getParameter(param);
             if ("Y".equals(value)) {
@@ -194,7 +194,7 @@
     public boolean hasFilter(String param) { return ("Y".equals(orderFilterState.get(param))); }
 
     public boolean hasAllStatus() {
-        for (Iterator iter = orderStatusState.values().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = orderStatusState.values().iterator(); iter.hasNext();) {
             if (!"Y".equals(iter.next())) return false;
         }
         return true;
@@ -225,16 +225,16 @@
         }
 
         List statusConditions = new ArrayList();
-        for (Iterator iter = orderStatusState.keySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = orderStatusState.keySet().iterator(); iter.hasNext();) {
             String status = (String) iter.next();
             if (!hasStatus(status)) continue;
-            statusConditions.add( EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, parameterToOrderStatusId.get(status)) );
+            statusConditions.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, parameterToOrderStatusId.get(status)));
         }
         List typeConditions = new ArrayList();
-        for (Iterator iter = orderTypeState.keySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = orderTypeState.keySet().iterator(); iter.hasNext();) {
             String type = (String) iter.next();
             if (!hasType(type)) continue;
-            typeConditions.add( EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, parameterToOrderTypeId.get(type)) );
+            typeConditions.add(EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, parameterToOrderTypeId.get(type)));
         }
 
         EntityCondition statusConditionsList = EntityCondition.makeCondition(statusConditions,  EntityOperator.OR);

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java Mon Aug 17 15:42:56 2009
@@ -275,7 +275,7 @@
             dve.addAlias("OISG", "carrierPartyId");
             dve.addViewLink("OH", "OISG", Boolean.FALSE, UtilMisc.toList(ModelFactory.createModelKeyMap("orderId", "orderId")));
 
-            if (UtilValidate.isNotEmpty(carrierPartyId )) {
+            if (UtilValidate.isNotEmpty(carrierPartyId)) {
                 paramList.add("carrierPartyId=" + carrierPartyId);
                 conditions.add(makeExpr("carrierPartyId", carrierPartyId));
             }

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Mon Aug 17 15:42:56 2009
@@ -996,7 +996,7 @@
             Iterator i = validItems.iterator();
             while (i.hasNext()) {
                 GenericValue item = (GenericValue) i.next();
-                shippableWeight = shippableWeight.add(this.getItemWeight(item).multiply( getOrderItemQuantity(item))).setScale(scale, rounding);
+                shippableWeight = shippableWeight.add(this.getItemWeight(item).multiply(getOrderItemQuantity(item))).setScale(scale, rounding);
             }
         }
 
@@ -1062,7 +1062,7 @@
      */
     public BigDecimal getOrderPaymentPreferenceTotalByType(String paymentMethodTypeId) {
         BigDecimal total = ZERO;
-        for (Iterator iter = getPaymentPreferences().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = getPaymentPreferences().iterator(); iter.hasNext();) {
             GenericValue preference = (GenericValue) iter.next();
             if (preference.get("maxAmount") == null) continue;
             if (paymentMethodTypeId == null || paymentMethodTypeId.equals(preference.get("paymentMethodTypeId"))) {
@@ -1096,7 +1096,7 @@
             // get a set of invoice IDs that belong to the order
             List orderItemBillings = orderHeader.getRelatedCache("OrderItemBilling");
             Set invoiceIds = new HashSet();
-            for (Iterator iter = orderItemBillings.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = orderItemBillings.iterator(); iter.hasNext();) {
                 GenericValue orderItemBilling = (GenericValue) iter.next();
                 invoiceIds.add(orderItemBilling.get("invoiceId"));
             }
@@ -1105,14 +1105,14 @@
             List conditions = UtilMisc.toList(
                     EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED"),
                     EntityCondition.makeCondition("invoiceId", EntityOperator.IN, invoiceIds)
-                    );
+                   );
             if (paymentMethodTypeId != null) {
                 conditions.add(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, paymentMethodTypeId));
             }
             EntityConditionList ecl = EntityCondition.makeCondition(conditions, EntityOperator.AND);
             List payments = orderHeader.getDelegator().findList("PaymentAndApplication", ecl, null, null, null, true);
 
-            for (Iterator iter = payments.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = payments.iterator(); iter.hasNext();) {
                 GenericValue payment = (GenericValue) iter.next();
                 if (payment.get("amountApplied") == null) continue;
                 total = total.add(payment.getBigDecimal("amountApplied")).setScale(scale, rounding);
@@ -1288,13 +1288,13 @@
         List prefs = getPaymentPreferences();
 
         // add up the covered amount, but skip preferences which are declined or cancelled
-        for (Iterator iter = prefs.iterator(); iter.hasNext(); ) {
+        for (Iterator iter = prefs.iterator(); iter.hasNext();) {
             GenericValue pref = (GenericValue) iter.next();
             if ("PAYMENT_CANCELLED".equals(pref.get("statusId")) || "PAYMENT_DECLINED".equals(pref.get("statusId"))) {
                 continue;
             } else if ("PAYMENT_SETTLED".equals(pref.get("statusId"))) {
                 List responses = pref.getRelatedByAnd("PaymentGatewayResponse", UtilMisc.toMap("transCodeEnumId", "PGT_CAPTURE"));
-                for (Iterator respIter = responses.iterator(); respIter.hasNext(); ) {
+                for (Iterator respIter = responses.iterator(); respIter.hasNext();) {
                     GenericValue response = (GenericValue) respIter.next();
                     BigDecimal amount = response.getBigDecimal("amount");
                     if (amount != null) {
@@ -1302,7 +1302,7 @@
                     }
                 }
                 responses = pref.getRelatedByAnd("PaymentGatewayResponse", UtilMisc.toMap("transCodeEnumId", "PGT_REFUND"));
-                for (Iterator respIter = responses.iterator(); respIter.hasNext(); ) {
+                for (Iterator respIter = responses.iterator(); respIter.hasNext();) {
                     GenericValue response = (GenericValue) respIter.next();
                     BigDecimal amount = response.getBigDecimal("amount");
                     if (amount != null) {
@@ -1692,7 +1692,7 @@
     /** Get a set of productIds in the order. */
     public Collection getOrderProductIds() {
         Set productIds = new HashSet();
-        for (Iterator iter = getOrderItems().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = getOrderItems().iterator(); iter.hasNext();) {
             productIds.add(((GenericValue) iter.next()).getString("productId"));
         }
         return productIds;
@@ -1723,14 +1723,14 @@
 
        // since we don't have a handy grouped view entity, we'll have to group the return items by hand
        Map returnMap = FastMap.newInstance();
-       for (Iterator iter = this.getValidOrderItems().iterator(); iter.hasNext(); ) {
+       for (Iterator iter = this.getValidOrderItems().iterator(); iter.hasNext();) {
            GenericValue orderItem = (GenericValue) iter.next();
            List group = EntityUtil.filterByAnd(returnItems,
                    UtilMisc.toMap("orderId", orderItem.get("orderId"), "orderItemSeqId", orderItem.get("orderItemSeqId")));
 
            // add up the returned quantities for this group TODO: received quantity should be used eventually
            BigDecimal returned = BigDecimal.ZERO;
-           for (Iterator groupiter = group.iterator(); groupiter.hasNext(); ) {
+           for (Iterator groupiter = group.iterator(); groupiter.hasNext();) {
                GenericValue returnItem = (GenericValue) groupiter.next();
                if (returnItem.getBigDecimal("returnQuantity") != null) {
                    returned = returned.add(returnItem.getBigDecimal("returnQuantity"));
@@ -1941,7 +1941,7 @@
 
         // sum up the return items that have a return item response with a billing account defined
         try {
-            for (Iterator iter = returnedItems.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = returnedItems.iterator(); iter.hasNext();) {
                 GenericValue returnItem = (GenericValue) iter.next();
                 GenericValue returnItemResponse = returnItem.getRelatedOne("ReturnItemResponse");
                 if (returnItemResponse == null) continue;
@@ -2805,7 +2805,7 @@
        try {
            // this is simply the sum of quantity billed in all related OrderItemBillings
            List billings = orderItem.getRelated("OrderItemBilling");
-           for (Iterator iter = billings.iterator(); iter.hasNext(); ) {
+           for (Iterator iter = billings.iterator(); iter.hasNext();) {
                GenericValue billing = (GenericValue) iter.next();
                BigDecimal quantity = billing.getBigDecimal("quantity");
                if (quantity != null) {

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Mon Aug 17 15:42:56 2009
@@ -465,11 +465,11 @@
             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);
+               ), EntityOperator.AND);
             /*
             EntityConditionList havingConditions = EntityCondition.makeCondition(UtilMisc.toList(
                     EntityCondition.makeCondition("quantityIssued", EntityOperator.GREATER_THAN, Double.valueOf(0))
-                ), EntityOperator.AND);
+               ), EntityOperator.AND);
              */
             List orderItemQuantitiesIssued = null;
             try {
@@ -486,7 +486,7 @@
                     GenericValue item = null;
                     try {
                         item = orderItemQuantityIssued.getRelatedOne("OrderItem");
-                    } catch ( GenericEntityException e ) {
+                    } catch (GenericEntityException e) {
                         Debug.logError(e, module);
                         return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderErrorUnableToGetOrderItemInformation", locale));
                     }
@@ -517,7 +517,7 @@
                     } else {
 
                         // Don't add the OrderItem to the map of returnable OrderItems if there isn't any returnable quantity.
-                        if (((BigDecimal) serviceResult.get("returnableQuantity")).compareTo(BigDecimal.ZERO) == 0 ) {
+                        if (((BigDecimal) serviceResult.get("returnableQuantity")).compareTo(BigDecimal.ZERO) == 0) {
                             continue;
                         }
                         Map returnInfo = new HashMap();
@@ -842,7 +842,7 @@
 
             // first, compute the total credit from the return items
             BigDecimal creditTotal = ZERO;
-            for (Iterator itemsIter = returnItems.iterator(); itemsIter.hasNext(); ) {
+            for (Iterator itemsIter = returnItems.iterator(); itemsIter.hasNext();) {
                 GenericValue item = (GenericValue) itemsIter.next();
                 BigDecimal quantity = item.getBigDecimal("returnQuantity");
                 BigDecimal price = item.getBigDecimal("returnPrice");
@@ -919,7 +919,7 @@
             String itemResponseId = (String) serviceResults.get("returnItemResponseId");
 
             // loop through the items again to update them and store a status change history
-            for (Iterator itemsIter = returnItems.iterator(); itemsIter.hasNext(); ) {
+            for (Iterator itemsIter = returnItems.iterator(); itemsIter.hasNext();) {
                 GenericValue item = (GenericValue) itemsIter.next();
                 Map returnItemMap = UtilMisc.toMap("returnItemResponseId", itemResponseId, "returnId", item.get("returnId"), "returnItemSeqId", item.get("returnItemSeqId"), "statusId", "RETURN_COMPLETED", "userLogin", userLogin);
                 // store the item changes (attached responseId)
@@ -989,10 +989,10 @@
                 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);
+           ), EntityOperator.AND);
 
         List orderPaymentPreferenceSums = delegator.findList("OrderPurchasePaymentSummary", whereConditions, UtilMisc.toSet("maxAmount"), null, null, false);
-        for (Iterator oppsi = orderPaymentPreferenceSums.iterator(); oppsi.hasNext(); ) {
+        for (Iterator oppsi = orderPaymentPreferenceSums.iterator(); oppsi.hasNext();) {
             GenericValue orderPaymentPreferenceSum = (GenericValue) oppsi.next();
             BigDecimal maxAmount = orderPaymentPreferenceSum.getBigDecimal("maxAmount");
             balance = maxAmount != null ? balance.subtract(maxAmount) : balance;
@@ -1000,7 +1000,7 @@
 
         List paymentAppls = delegator.findByAnd("PaymentApplication", UtilMisc.toMap("billingAccountId", billingAccountId));
         // TODO: cancelled payments?
-        for (Iterator pAi = paymentAppls.iterator(); pAi.hasNext(); ) {
+        for (Iterator pAi = paymentAppls.iterator(); pAi.hasNext();) {
             GenericValue paymentAppl = (GenericValue) pAi.next();
             if (paymentAppl.getString("invoiceId") == null) {
                 BigDecimal amountApplied = paymentAppl.getBigDecimal("amountApplied");
@@ -1039,7 +1039,7 @@
 
             // find the minimum storeCreditValidDays of all the ProductStores associated with all the Orders on the Return, skipping null ones
             Long storeCreditValidDays = null;
-            for (Iterator iter = productStores.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = productStores.iterator(); iter.hasNext();) {
                 GenericValue productStore = (GenericValue) iter.next();
                 Long thisStoreValidDays = productStore.getLong("storeCreditValidDays");
                 if (thisStoreValidDays == null) continue;
@@ -1101,7 +1101,7 @@
         }
          
         // Check for replacement order
-        if (UtilValidate.isEmpty(orderPayPrefs)){
+        if (UtilValidate.isEmpty(orderPayPrefs)) {
             List<GenericValue> returnItemResponses = FastList.newInstance();
             try {
                 returnItemResponses = orderHeader.getRelated("ReplacementReturnItemResponse");
@@ -1201,7 +1201,7 @@
                     orderPayPrefs = EntityUtil.filterByOr(orderPayPrefs, exprs);
                     
                     // Check for replacement order
-                    if (UtilValidate.isEmpty(orderPayPrefs)){
+                    if (UtilValidate.isEmpty(orderPayPrefs)) {
                         List<GenericValue> orderItemAssocs = delegator.findByAnd("OrderItemAssoc", UtilMisc.toMap("toOrderId", orderId, "orderItemAssocTypeId", "REPLACEMENT"));
                         if (UtilValidate.isNotEmpty(orderItemAssocs)) {
                             String originalOrderId = EntityUtil.getFirst(orderItemAssocs).getString("orderId");
@@ -1236,7 +1236,7 @@
                     if (UtilValidate.isNotEmpty(orgAcctgPref)) {
                         try {
                             refundPaymentMethod = orgAcctgPref.getRelatedOne("PaymentMethod");
-                        } catch ( GenericEntityException e ) {
+                        } catch (GenericEntityException e) {
                             Debug.logError("Error retrieving related refundPaymentMethod from PartyAcctgPreference for partyId " + productStore.get("payToPartyId"), module);
                         }
                     }
@@ -1245,7 +1245,7 @@
                 // now; for all timestamps
                 Timestamp now = UtilDateTime.nowTimestamp();
 
-                // Assemble a map of orderPaymentPreferenceId -> list of maps of ( OPP and availableAmountForRefunding )
+                // Assemble a map of orderPaymentPreferenceId -> list of maps of (OPP and availableAmountForRefunding)
                 //     where availableAmountForRefunding = receivedAmount - alreadyRefundedAmount
                 // 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() ;
@@ -1577,10 +1577,10 @@
             // for each return item in the response, get the list of return item billings and then a list of invoices
             Map returnInvoices = FastMap.newInstance(); // key is invoiceId, value is Invoice GenericValue
             List items = response.getRelated("ReturnItem");
-            for (Iterator itemIter = items.iterator(); itemIter.hasNext(); ) {
+            for (Iterator itemIter = items.iterator(); itemIter.hasNext();) {
                 GenericValue item = (GenericValue) itemIter.next();
                 List billings = item.getRelated("ReturnItemBilling");
-                for (Iterator billIter = billings.iterator(); billIter.hasNext(); ) {
+                for (Iterator billIter = billings.iterator(); billIter.hasNext();) {
                     GenericValue billing = (GenericValue) billIter.next();
                     GenericValue invoice = billing.getRelatedOne("Invoice");
 
@@ -1594,12 +1594,12 @@
             // for each return invoice found, sum up the related billings
             Map invoiceTotals = FastMap.newInstance(); // key is invoiceId, value is the sum of all billings for that invoice
             BigDecimal grandTotal = ZERO; // The sum of all return invoice totals
-            for (Iterator iter = returnInvoices.values().iterator(); iter.hasNext(); ) {
+            for (Iterator iter = returnInvoices.values().iterator(); iter.hasNext();) {
                 GenericValue invoice = (GenericValue) iter.next();
 
                 List billings = invoice.getRelated("ReturnItemBilling");
                 BigDecimal runningTotal = ZERO;
-                for (Iterator billIter = billings.iterator(); billIter.hasNext(); ) {
+                for (Iterator billIter = billings.iterator(); billIter.hasNext();) {
                     GenericValue billing = (GenericValue) billIter.next();
                     runningTotal = runningTotal.add(billing.getBigDecimal("amount").multiply(billing.getBigDecimal("quantity")).setScale(decimals, rounding));
                 }
@@ -1609,7 +1609,7 @@
             }
 
             // now allocate responseAmount * invoiceTotal / grandTotal to each invoice
-            for (Iterator iter = returnInvoices.values().iterator(); iter.hasNext(); ) {
+            for (Iterator iter = returnInvoices.values().iterator(); iter.hasNext();) {
                 GenericValue invoice = (GenericValue) iter.next();
                 String invoiceId = invoice.getString("invoiceId");
                 BigDecimal invoiceTotal = (BigDecimal) invoiceTotals.get(invoiceId);

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Aug 17 15:42:56 2009
@@ -388,7 +388,7 @@
                             String excMsg = "Could not find related Fixed Asset for the product: " + orderItem.getString("productId");
                             Debug.logError(excMsg, module);
                             errorMessages.add(excMsg);
-                            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderCouldNotFindRelatedFixedAssetForTheProduct",UtilMisc.toMap("productId",orderItem.getString("productId")), locale ));
+                            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderCouldNotFindRelatedFixedAssetForTheProduct",UtilMisc.toMap("productId",orderItem.getString("productId")), locale));
                         }
 
                         if (UtilValidate.isNotEmpty(selFixedAssetProduct)) {
@@ -693,7 +693,7 @@
                         }
                     }
                 }
-                if (techDataCalendar == null ) {
+                if (techDataCalendar == null) {
                     techDataCalendar = delegator.makeValue("TechDataCalendar");
                     Debug.logInfo("create techdata calendar because it does not exist",module);
                     String calendarId = delegator.getNextSeqId("TechDataCalendar");
@@ -1436,7 +1436,7 @@
         List orderTaxAdjustments = null;
         try {
             orderTaxAdjustments = delegator.findByAnd("OrderAdjustment", UtilMisc.toMap("orderId", orderId, "orderAdjustmentTypeId", "SALES_TAX"));
-        } catch ( GenericEntityException e ) {
+        } catch (GenericEntityException e) {
             Debug.logError(e, "Unable to retrieve SALES_TAX adjustments for order : " + orderId, module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderUnableToRetrieveSalesTaxAdjustments",locale));
         }
@@ -1446,7 +1446,7 @@
         Iterator otait = UtilMisc.toIterator(orderTaxAdjustments);
         while (otait != null && otait.hasNext()) {
             GenericValue orderTaxAdjustment = (GenericValue) otait.next();
-            if ( orderTaxAdjustment.get("amount") != null) {
+            if (orderTaxAdjustment.get("amount") != null) {
                 totalExistingOrderTax = totalExistingOrderTax.add(orderTaxAdjustment.getBigDecimal("amount").setScale(taxDecimals, taxRounding));
             }
         }
@@ -1557,7 +1557,7 @@
                         Iterator oai = orderAdj.iterator();
                         while (oai.hasNext()) {
                             GenericValue oa = (GenericValue) oai.next();
-                            if ( oa.get("amount") != null) {
+                            if (oa.get("amount") != null) {
                                 totalNewOrderTax = totalNewOrderTax.add(oa.getBigDecimal("amount").setScale(taxDecimals, taxRounding));
                             }
 
@@ -1572,7 +1572,7 @@
                             Iterator ida = itemAdjustments.iterator();
                             while (ida.hasNext()) {
                                 GenericValue ia = (GenericValue) ida.next();
-                                if ( ia.get("amount") != null) {
+                                if (ia.get("amount") != null) {
                                     totalNewOrderTax = totalNewOrderTax.add(ia.getBigDecimal("amount").setScale(taxDecimals, taxRounding));
                                 }
                             }
@@ -1597,7 +1597,7 @@
                 Map createOrderAdjResponse = null;
                 try {
                     createOrderAdjResponse = dispatcher.runSync("createOrderAdjustment", createOrderAdjContext);
-                } catch ( GenericServiceException e ) {
+                } catch (GenericServiceException e) {
                     String createOrderAdjErrMsg = UtilProperties.getMessage(resource_error, "OrderErrorCallingCreateOrderAdjustmentService", locale);
                     Debug.logError(createOrderAdjErrMsg, module);
                     return ServiceUtil.returnError(createOrderAdjErrMsg);
@@ -2419,7 +2419,7 @@
         uiLabelMap.addBottomResourceBundle("CommonUiLabels");
 
         Map bodyParameters = UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId, "userLogin", placingUserLogin, "uiLabelMap", uiLabelMap, "locale", locale);
-        if ( placingParty!= null) {
+        if (placingParty!= null) {
             bodyParameters.put("partyId", placingParty.get("partyId"));
         }
         bodyParameters.put("note", note);
@@ -2795,7 +2795,7 @@
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_COMPLETED"),
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED")
-        );
+       );
         EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(exprs, EntityOperator.AND);
 
         // get the orders
@@ -4351,7 +4351,7 @@
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         List orderIds = (List) context.get("orderIdList");
 
-        for (Object orderId : orderIds){
+        for (Object orderId : orderIds) {
             if (UtilValidate.isEmpty(orderId)) {
                 continue;
             }
@@ -4635,7 +4635,7 @@
             // the original method did a "\d+" regexp to decide which is the case, this version is more explicit with its lookup of PaymentMethodType
             if (checkOutPaymentId != null) {
                 List paymentMethodTypes = delegator.findList("PaymentMethodType", null, null, null, null, true);
-                for (Iterator iter = paymentMethodTypes.iterator(); iter.hasNext(); ) {
+                for (Iterator iter = paymentMethodTypes.iterator(); iter.hasNext();) {
                     GenericValue type = (GenericValue) iter.next();
                     if (type.get("paymentMethodTypeId").equals(checkOutPaymentId)) {
                         paymentMethodTypeId = (String) type.get("paymentMethodTypeId");
@@ -4715,7 +4715,7 @@
 
                 // Get the cancelled quantity for the item
                 BigDecimal orderItemCancelQuantity = BigDecimal.ZERO;
-                if (! UtilValidate.isEmpty(orderItem.get("cancelQuantity")) ) {
+                if (! UtilValidate.isEmpty(orderItem.get("cancelQuantity"))) {
                     orderItemCancelQuantity = orderItem.getBigDecimal("cancelQuantity");
                 }
 
@@ -4791,7 +4791,7 @@
                     orderItemQuantity = orderItem.getBigDecimal("quantity");
                 }
                 BigDecimal orderItemCancelQuantity = BigDecimal.ZERO;
-                if (! UtilValidate.isEmpty(orderItem.get("cancelQuantity")) ) {
+                if (! UtilValidate.isEmpty(orderItem.get("cancelQuantity"))) {
                     orderItemCancelQuantity = orderItem.getBigDecimal("cancelQuantity");
                 }
 
@@ -4801,7 +4801,7 @@
                 Iterator srit = shipmentReceipts.iterator();
                 while (srit.hasNext()) {
                     GenericValue shipmentReceipt = (GenericValue) srit.next();
-                    if (! UtilValidate.isEmpty(shipmentReceipt.get("quantityAccepted")) ) {
+                    if (! UtilValidate.isEmpty(shipmentReceipt.get("quantityAccepted"))) {
                         receivedQuantity = receivedQuantity.add(shipmentReceipt.getBigDecimal("quantityAccepted"));
                     }
                 }
@@ -5335,7 +5335,7 @@
             EntityCondition cond = EntityCondition.makeCondition(UtilMisc.toList(
                     EntityCondition.makeCondition("productAssocTypeId", "ALSO_BOUGHT"),
                     EntityCondition.makeConditionDate("fromDate", "thruDate")
-            ));
+           ));
             try {
                 delegator.storeByCondition("ProductAssoc", UtilMisc.toMap("thruDate", UtilDateTime.nowTimestamp()), cond);
             } catch (GenericEntityException e) {
@@ -5406,8 +5406,8 @@
                                 EntityCondition.makeCondition("productAssocTypeId", "ALSO_BOUGHT"),
                                 EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, UtilDateTime.nowTimestamp()),
                                 EntityCondition.makeCondition("thruDate", null)
-                        )
-                );
+                       )
+               );
                 GenericValue existingProductAssoc = null;
                 try {
                     // No point in using the cache because of the filterByDateExpr

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java Mon Aug 17 15:42:56 2009
@@ -60,22 +60,22 @@
             List<EntityCondition> conditions = UtilMisc.toList(
                     EntityCondition.makeCondition("requirementTypeId", EntityOperator.EQUALS, "PRODUCT_REQUIREMENT"),
                     EntityUtil.getFilterByDateExpr()
-                    );
+                   );
             if (UtilValidate.isNotEmpty(statusIds)) {
-                conditions.add( EntityCondition.makeCondition("statusId", EntityOperator.IN, statusIds) );
+                conditions.add(EntityCondition.makeCondition("statusId", EntityOperator.IN, statusIds));
             } else {
-                conditions.add( EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "REQ_APPROVED") );
+                conditions.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "REQ_APPROVED"));
             }
             if (requirementConditions != null) conditions.add(requirementConditions);
 
             // we're either getting the requirements for a given supplier, unassigned requirements, or requirements for all suppliers
             if (UtilValidate.isNotEmpty(partyId)) {
-                conditions.add( EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId) );
-                conditions.add( EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "SUPPLIER") );
+                conditions.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
+                conditions.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "SUPPLIER"));
             } else if (UtilValidate.isNotEmpty(unassignedRequirements)) {
-                conditions.add( EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, null) );
+                conditions.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, null));
             } else {
-                conditions.add( EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "SUPPLIER") );
+                conditions.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "SUPPLIER"));
             }
 
             EntityConditionList<EntityCondition> ecl = EntityCondition.makeCondition(conditions, EntityOperator.AND);
@@ -97,7 +97,7 @@
 
             // join in fields with extra data about the suppliers and products
             List requirements = FastList.newInstance();
-            for (Iterator iter = requirementAndRoles.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = requirementAndRoles.iterator(); iter.hasNext();) {
                 Map union = FastMap.newInstance();
                 GenericValue requirement = (GenericValue) iter.next();
                 String productId = requirement.getString("productId");
@@ -114,7 +114,7 @@
                             EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId),
                             EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId),
                             EntityUtil.getFilterByDateExpr("availableFromDate", "availableThruDate")
-                            );
+                           );
                     ecl = EntityCondition.makeCondition(conditions, EntityOperator.AND);
                     List<GenericValue> supplierProducts = delegator.findList("SupplierProduct", ecl, null, UtilMisc.toList("minimumOrderQuantity", "lastPrice"), null, false);
 
@@ -157,14 +157,14 @@
                 // how many of the products were sold (note this is for a fixed time period across all product stores)
                 BigDecimal sold = (BigDecimal) productsSold.get(productId);
                 if (sold == null) {
-                    EntityCondition prodConditions = EntityCondition.makeCondition( UtilMisc.toList(
+                    EntityCondition prodConditions = EntityCondition.makeCondition(UtilMisc.toList(
                                 EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId),
                                 EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"),
                                 EntityCondition.makeCondition("orderStatusId", EntityOperator.NOT_IN, UtilMisc.toList("ORDER_REJECTED", "ORDER_CANCELLED")),
                                 EntityCondition.makeCondition("orderItemStatusId", EntityOperator.NOT_IN, UtilMisc.toList("ITEM_REJECTED", "ITEM_CANCELLED")),
                                 EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, timePeriodStart)
-                                ), EntityOperator.AND);
-                    GenericValue count = EntityUtil.getFirst( delegator.findList("OrderItemQuantityReportGroupByProduct", prodConditions, UtilMisc.toSet("quantityOrdered"), null, null, false));
+                               ), EntityOperator.AND);
+                    GenericValue count = EntityUtil.getFirst(delegator.findList("OrderItemQuantityReportGroupByProduct", prodConditions, UtilMisc.toSet("quantityOrdered"), null, null, false));
                     if (count != null) {
                         sold = count.getBigDecimal("quantityOrdered");
                         if (sold != null) productsSold.put(productId, sold);
@@ -211,7 +211,7 @@
             GenericValue productStore = order.getRelatedOneCache("ProductStore");
             String facilityId = productStore.getString("inventoryFacilityId");
             List orderItems = order.getRelated("OrderItem");
-            for (Iterator iter = orderItems.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = orderItems.iterator(); iter.hasNext();) {
                 GenericValue item = (GenericValue) iter.next();
                 GenericValue product = item.getRelatedOne("Product");
                 if (product == null) continue;
@@ -265,7 +265,7 @@
             GenericValue productStore = order.getRelatedOneCache("ProductStore");
             String facilityId = productStore.getString("inventoryFacilityId");
             List orderItems = order.getRelated("OrderItem");
-            for (Iterator iter = orderItems.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = orderItems.iterator(); iter.hasNext();) {
                 GenericValue item = (GenericValue) iter.next();
                 GenericValue product = item.getRelatedOne("Product");
                 if (product == null) continue;
@@ -296,7 +296,7 @@
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "REQ_REJECTED")),
                         EntityOperator.AND);
                 List requirements = delegator.findList("Requirement", ecl, null, null, null, false);
-                for (Iterator riter = requirements.iterator(); riter.hasNext(); ) {
+                for (Iterator riter = requirements.iterator(); riter.hasNext();) {
                     GenericValue requirement = (GenericValue) riter.next();
                     pendingRequirements = pendingRequirements.add(requirement.get("quantity") == null ? BigDecimal.ZERO : requirement.getBigDecimal("quantity"));
                 }

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Mon Aug 17 15:42:56 2009
@@ -126,7 +126,7 @@
     }
 
     public Map setCheckOutShippingOptions(String shippingMethod, String shippingInstructions,
-            String orderAdditionalEmails, String maySplit, String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate ) {
+            String orderAdditionalEmails, String maySplit, String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate) {
         List errorMessages = new ArrayList();
         Map result;
         String errMsg = null;
@@ -151,7 +151,7 @@
     }
 
     private List setCheckOutShippingOptionsInternal(String shippingMethod, String shippingInstructions, String orderAdditionalEmails,
-            String maySplit, String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate ) {
+            String maySplit, String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate) {
         List errorMessages = new ArrayList();
         String errMsg = null;
 
@@ -956,7 +956,7 @@
         List<EntityExpr> payPalExprs = UtilMisc.toList(
                 EntityCondition.makeCondition("paymentMethodId", EntityOperator.NOT_EQUAL, null),
                 EntityCondition.makeCondition("paymentMethodTypeId", "EXT_PAYPAL")
-            );
+           );
         List<GenericValue> payPalPaymentPrefs = EntityUtil.filterByAnd(allPaymentPreferences, payPalExprs);
         if (UtilValidate.isNotEmpty(payPalPaymentPrefs)) {
             GenericValue payPalPaymentPref = EntityUtil.getFirst(payPalPaymentPrefs);

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Mon Aug 17 15:42:56 2009
@@ -495,7 +495,7 @@
                     String isAvailable = ShoppingCartItem.checkAvailability(productId, newQuantity, reservStart, reservLength, this);
                     if (isAvailable.compareTo("OK") != 0) {
                         Map messageMap = UtilMisc.toMap("productId", productId, "availableMessage", isAvailable);
-                        String excMsg = UtilProperties.getMessage(ShoppingCartItem.resource, "item.product_not_available", messageMap, this.getLocale() );
+                        String excMsg = UtilProperties.getMessage(ShoppingCartItem.resource, "item.product_not_available", messageMap, this.getLocale());
                         Debug.logInfo(excMsg, module);
                         throw new CartItemModifyException(isAvailable);
                     }
@@ -592,7 +592,7 @@
         return addItemToEnd(ShoppingCartItem.makeItem(null, productId, amount, quantity, unitPrice, reservStart, reservLength, reservPersons, null, null, features, attributes, prodCatalogId, configWrapper, itemType, null, dispatcher, this, triggerExternalOps, triggerPriceRules, null, skipInventoryChecks, skipProductChecks));
     }
 
-    /** Add an accommodation(rental )item to the shopping cart. */
+    /** Add an accommodation(rental)item to the shopping cart. */
     public int addItemToEnd(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, HashMap features, HashMap attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules) throws CartItemModifyException, ItemNotFoundException {
         return addItemToEnd(ShoppingCartItem.makeItem(null, productId, amount, quantity, unitPrice, reservStart, reservLength, reservPersons, accommodationMapId, accommodationSpotId, null, null, features, attributes, prodCatalogId, null, itemType, null, dispatcher, this, triggerExternalOps, triggerPriceRules, null, Boolean.FALSE, Boolean.FALSE));
     }
@@ -1626,7 +1626,7 @@
     /** remove all the paymentMethods based on the paymentMethodIds */
     public void clearPaymentMethodsById(List paymentMethodIdsToRemove) {
         if (UtilValidate.isEmpty(paymentMethodIdsToRemove)) return;
-        for (Iterator iter = paymentInfo.iterator(); iter.hasNext(); ) {
+        for (Iterator iter = paymentInfo.iterator(); iter.hasNext();) {
             CartPaymentInfo info = (CartPaymentInfo) iter.next();
             if (paymentMethodIdsToRemove.contains(info.paymentMethodId)) {
                 iter.remove();
@@ -1642,7 +1642,7 @@
                 List declinedPaymentMethods = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toMap("orderId", orderId, "statusId", "PAYMENT_DECLINED"));
                 if (!UtilValidate.isEmpty(declinedPaymentMethods)) {
                     List paymentMethodIdsToRemove = new ArrayList();
-                    for (Iterator iter = declinedPaymentMethods.iterator(); iter.hasNext(); ) {
+                    for (Iterator iter = declinedPaymentMethods.iterator(); iter.hasNext();) {
                         GenericValue opp = (GenericValue) iter.next();
                         paymentMethodIdsToRemove.add(opp.getString("paymentMethodId"));
                     }
@@ -1993,7 +1993,7 @@
         Map shipGroups = this.getShipGroups(item);
 
         if ((shipGroups != null) && (shipGroups.keySet() != null)) {
-            for (Iterator shipGroupKeys = shipGroups.keySet().iterator(); shipGroupKeys.hasNext(); ) {
+            for (Iterator shipGroupKeys = shipGroups.keySet().iterator(); shipGroupKeys.hasNext();) {
                 Integer shipGroup = (Integer) shipGroupKeys.next();
                 CartShipInfo cartShipInfo = this.getShipInfo(shipGroup.intValue());
 
@@ -2565,7 +2565,7 @@
     public BigDecimal getOrderPaymentPreferenceTotalByType(String paymentMethodTypeId) {
         BigDecimal total = BigDecimal.ZERO;
         String thisPaymentMethodTypeId = null;
-        for (Iterator iter = paymentInfo.iterator(); iter.hasNext(); ) {
+        for (Iterator iter = paymentInfo.iterator(); iter.hasNext();) {
             CartPaymentInfo payment = (CartPaymentInfo) iter.next();
             if (payment.amount == null) continue;
             if (payment.paymentMethodId != null) {

Modified: ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=805012&r1=805011&r2=805012&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Mon Aug 17 15:42:56 2009
@@ -634,7 +634,7 @@
         }
         String orderId = request.getParameter("orderId_o_0");
         // set the order id if supplied
-        if(UtilValidate.isNotEmpty(orderId)) {
+        if (UtilValidate.isNotEmpty(orderId)) {
             GenericValue thisOrder = null;
             try {
                 thisOrder = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), false);
@@ -728,11 +728,11 @@
             return "error";
         } else {
             totalQuantity = (BigDecimal)result.get("totalQuantity");
-            Map messageMap = UtilMisc.toMap("totalQuantity", UtilFormatOut.formatQuantity(totalQuantity.doubleValue()) );
+            Map messageMap = UtilMisc.toMap("totalQuantity", UtilFormatOut.formatQuantity(totalQuantity.doubleValue()));
 
             request.setAttribute("_EVENT_MESSAGE_",
                                   UtilProperties.getMessage(resource_error, "cart.add_category_defaults",
-                                          messageMap, locale ));
+                                          messageMap, locale));
 
             return "success";
         }