svn commit: r1767764 [18/33] - in /ofbiz/trunk: applications/accounting/groovyScripts/admin/ applications/accounting/groovyScripts/ap/invoices/ applications/accounting/groovyScripts/ar/ applications/accounting/groovyScripts/chartofaccounts/ application...

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

svn commit: r1767764 [18/33] - in /ofbiz/trunk: applications/accounting/groovyScripts/admin/ applications/accounting/groovyScripts/ap/invoices/ applications/accounting/groovyScripts/ar/ applications/accounting/groovyScripts/chartofaccounts/ application...

Arun Patidar-4
Modified: ofbiz/trunk/applications/product/groovyScripts/catalog/store/EditProductStorePaySetup.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/catalog/store/EditProductStorePaySetup.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/catalog/store/EditProductStorePaySetup.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/catalog/store/EditProductStorePaySetup.groovy Wed Nov  2 19:09:13 2016
@@ -17,71 +17,71 @@
  * under the License.
  */
 
-import org.apache.ofbiz.entity.condition.*;
-import org.apache.ofbiz.entity.util.*;
+import org.apache.ofbiz.entity.condition.*
+import org.apache.ofbiz.entity.util.*
 
-paymentMethodTypeId = request.getParameter("paymentMethodTypeId");
-paymentServiceTypeEnumId = request.getParameter("paymentServiceTypeEnumId");
-customMethodsCond = null;
+paymentMethodTypeId = request.getParameter("paymentMethodTypeId")
+paymentServiceTypeEnumId = request.getParameter("paymentServiceTypeEnumId")
+customMethodsCond = null
 
 if (paymentMethodTypeId && paymentServiceTypeEnumId) {
     if (paymentMethodTypeId == "CREDIT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_AUTH" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_AUTH");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_AUTH")
     } else if (paymentMethodTypeId == "CREDIT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_CAPTURE" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_CAPTURE");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_CAPTURE")
     } else if (paymentMethodTypeId == "CREDIT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_REAUTH" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_AUTH");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_AUTH")
     } else if (paymentMethodTypeId == "CREDIT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_REFUND" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_REFUND");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_REFUND")
     } else if (paymentMethodTypeId == "CREDIT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_RELEASE" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_RELEASE");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_RELEASE")
     } else if (paymentMethodTypeId == "EFT_ACCOUNT" && paymentServiceTypeEnumId == "PRDS_PAY_AUTH" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "EFT_AUTH");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "EFT_AUTH")
     } else if (paymentMethodTypeId == "EFT_ACCOUNT" && paymentServiceTypeEnumId == "PRDS_PAY_RELEASE" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "EFT_RELEASE");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "EFT_RELEASE")
     } else if (paymentMethodTypeId == "FIN_ACCOUNT" && paymentServiceTypeEnumId == "PRDS_PAY_AUTH" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_AUTH");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_AUTH")
     } else if (paymentMethodTypeId == "FIN_ACCOUNT" && paymentServiceTypeEnumId == "PRDS_PAY_CAPTURE" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_CAPTURE");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_CAPTURE")
     } else if (paymentMethodTypeId == "FIN_ACCOUNT" && paymentServiceTypeEnumId == "PRDS_PAY_REFUND" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_REFUND");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_REFUND")
     } else if (paymentMethodTypeId == "FIN_ACCOUNT" && paymentServiceTypeEnumId == "PRDS_PAY_RELEASE" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_RELEASE");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_RELEASE")
     } else if (paymentMethodTypeId == "GIFT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_AUTH" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_AUTH");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_AUTH")
     } else if (paymentMethodTypeId == "GIFT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_CAPTURE" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_CAPTURE");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_CAPTURE")
     } else if (paymentMethodTypeId == "GIFT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_REFUND" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_REFUND");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_REFUND")
     } else if (paymentMethodTypeId == "GIFT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_RELEASE" ) {
-        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_RELEASE");
+        customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_RELEASE")
     }
 }
 
 if (!paymentMethodTypeId || !paymentServiceTypeEnumId) {
-    customMethods = [];
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_AUTH"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_CAPTURE"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_REAUTH"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_REFUND"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_RELEASE"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_CREDIT"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "EFT_AUTH"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "EFT_RELEASE"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_AUTH"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_CAPTURE"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_REFUND"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_RELEASE"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_AUTH"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_CAPTURE"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_REFUND"));
-    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_RELEASE"));
-    customMethodsCond = EntityCondition.makeCondition(customMethods, EntityOperator.OR);
+    customMethods = []
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_AUTH"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_CAPTURE"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_REAUTH"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_REFUND"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_RELEASE"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_CREDIT"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "EFT_AUTH"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "EFT_RELEASE"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_AUTH"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_CAPTURE"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_REFUND"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "FIN_RELEASE"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_AUTH"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_CAPTURE"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_REFUND"))
+    customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "GIFT_RELEASE"))
+    customMethodsCond = EntityCondition.makeCondition(customMethods, EntityOperator.OR)
 }
 if (paymentServiceTypeEnumId == "PRDS_PAY_EXTERNAL") {
-    context.paymentCustomMethods = null;
+    context.paymentCustomMethods = null
 } else if (customMethodsCond) {
-    context.paymentCustomMethods = from("CustomMethod").where(customMethodsCond).orderBy("description").queryList();
+    context.paymentCustomMethods = from("CustomMethod").where(customMethodsCond).orderBy("description").queryList()
 } else {
-    context.paymentCustomMethods = from("CustomMethod").orderBy("description").queryList();
+    context.paymentCustomMethods = from("CustomMethod").orderBy("description").queryList()
 }

Modified: ofbiz/trunk/applications/product/groovyScripts/catalog/store/EditProductStoreSurveys.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/catalog/store/EditProductStoreSurveys.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/catalog/store/EditProductStoreSurveys.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/catalog/store/EditProductStoreSurveys.groovy Wed Nov  2 19:09:13 2016
@@ -21,21 +21,21 @@ import org.apache.ofbiz.base.util.*
 import org.apache.ofbiz.entity.condition.*
 import org.apache.ofbiz.entity.util.*
 
-context.hasPermission = security.hasEntityPermission("CATALOG", "_VIEW", session);
+context.hasPermission = security.hasEntityPermission("CATALOG", "_VIEW", session)
 
-productStoreId = request.getParameter("productStoreId");
+productStoreId = request.getParameter("productStoreId")
 if (productStoreId) {
-    productStore = from("ProductStore").where("productStoreId", productStoreId).queryOne();
-    context.productStoreId = productStoreId;
-    context.productStore = productStore;
+    productStore = from("ProductStore").where("productStoreId", productStoreId).queryOne()
+    context.productStoreId = productStoreId
+    context.productStore = productStore
 }
 
-context.productStoreSurveys = from("ProductStoreSurveyAppl").where("productStoreId", productStoreId).filterByDate().queryList();
+context.productStoreSurveys = from("ProductStoreSurveyAppl").where("productStoreId", productStoreId).filterByDate().queryList()
 
-context.surveys = from("Survey").orderBy("description").queryList();
+context.surveys = from("Survey").orderBy("description").queryList()
 
-context.surveyApplTypes = from("SurveyApplType").orderBy("description").queryList();
+context.surveyApplTypes = from("SurveyApplType").orderBy("description").queryList()
 
-context.productCategories = from("ProductCategory").orderBy("description").queryList();
+context.productCategories = from("ProductCategory").orderBy("description").queryList()
 
-context.nowTimestampString = UtilDateTime.nowTimestamp().toString();
+context.nowTimestampString = UtilDateTime.nowTimestamp().toString()

Modified: ofbiz/trunk/applications/product/groovyScripts/catalog/thesaurus/EditKeywordThesaurus.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/catalog/thesaurus/EditKeywordThesaurus.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/catalog/thesaurus/EditKeywordThesaurus.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/catalog/thesaurus/EditKeywordThesaurus.groovy Wed Nov  2 19:09:13 2016
@@ -19,55 +19,55 @@
 
 import org.apache.ofbiz.entity.condition.*
 
-relationshipEnums = from("Enumeration").where("enumTypeId", "KW_THES_REL").orderBy("sequenceId").cache(true).queryList();
+relationshipEnums = from("Enumeration").where("enumTypeId", "KW_THES_REL").orderBy("sequenceId").cache(true).queryList()
 
-keywordThesauruses = from("KeywordThesaurus").orderBy("enteredKeyword").queryList();
+keywordThesauruses = from("KeywordThesaurus").orderBy("enteredKeyword").queryList()
 
 //if no param sent in make firstLetter 'a' else use firstLetter passed in
-firstLetterString = request.getParameter("firstLetter");
+firstLetterString = request.getParameter("firstLetter")
 if (!firstLetterString) {
-    firstLetter = 'a';
+    firstLetter = 'a'
 }
 else {
-    firstLetter = firstLetterString.charAt(0);
+    firstLetter = firstLetterString.charAt(0)
 }
 
 //add elememts to new list as long as it is smaller then 20,
 //  but always get all of the first letter
-keywordThesaurusIter = keywordThesauruses.iterator();
-newKeywordThesaurus = [];
-specialCharKeywordThesaurus = [];
-currentLetter = firstLetter;
+keywordThesaurusIter = keywordThesauruses.iterator()
+newKeywordThesaurus = []
+specialCharKeywordThesaurus = []
+currentLetter = firstLetter
 if (keywordThesaurusIter) {
     while (keywordThesaurusIter) {
-        keywordThesaurus = keywordThesaurusIter.next();
+        keywordThesaurus = keywordThesaurusIter.next()
         if (keywordThesaurus.get("enteredKeyword").charAt(0)<'a' ||
                 keywordThesaurus.get("enteredKeyword").charAt(0)>'z') {
-            specialCharKeywordThesaurus.add(keywordThesaurus);
+            specialCharKeywordThesaurus.add(keywordThesaurus)
         } else if (keywordThesaurus.get("enteredKeyword").charAt(0) >= firstLetter) {
             if (keywordThesaurus.get("enteredKeyword").charAt(0) == currentLetter ||
                     newKeywordThesaurus.size()<20) {
-                newKeywordThesaurus.add(keywordThesaurus);
-                currentLetter = keywordThesaurus.get("enteredKeyword").charAt(0);
+                newKeywordThesaurus.add(keywordThesaurus)
+                currentLetter = keywordThesaurus.get("enteredKeyword").charAt(0)
             }
         }
     }
 }
 if ((specialCharKeywordThesaurus.size() > 0 && newKeywordThesaurus.size()<20) || firstLetter=='z') {
-    specialCharKeywordThesaurusIter = specialCharKeywordThesaurus.iterator();
+    specialCharKeywordThesaurusIter = specialCharKeywordThesaurus.iterator()
     while (specialCharKeywordThesaurusIter) {
-        keywordThesaurus = specialCharKeywordThesaurusIter.next();
-        newKeywordThesaurus.add(keywordThesaurus);
+        keywordThesaurus = specialCharKeywordThesaurusIter.next()
+        newKeywordThesaurus.add(keywordThesaurus)
     }
 }
 
 //create list for a-z
-letterList = [];
+letterList = []
 for (i='a'; i<='z'; i++) {
-    letterList.add(i);
+    letterList.add(i)
 }
 
-context.relationshipEnums = relationshipEnums;
-context.keywordThesauruses = newKeywordThesaurus;
-context.firstLetter = firstLetter;
-context.letterList = letterList;
+context.relationshipEnums = relationshipEnums
+context.keywordThesauruses = newKeywordThesaurus
+context.firstLetter = firstLetter
+context.letterList = letterList

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/ComputeProductSellThroughData.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/ComputeProductSellThroughData.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/ComputeProductSellThroughData.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/ComputeProductSellThroughData.groovy Wed Nov  2 19:09:13 2016
@@ -17,22 +17,22 @@
  * under the License.
  */
 
-import java.math.MathContext;
-import java.sql.Timestamp;
+import java.math.MathContext
+import java.sql.Timestamp
 
 
 if (parameters.fromDateSellThrough) {
-    Timestamp fromDate = null;
-    Timestamp thruDate = null;
+    Timestamp fromDate = null
+    Timestamp thruDate = null
     try {
-        fromDate = Timestamp.valueOf(parameters.fromDateSellThrough);
-        thruDate = Timestamp.valueOf(parameters.thruDateSellThrough);
+        fromDate = Timestamp.valueOf(parameters.fromDateSellThrough)
+        thruDate = Timestamp.valueOf(parameters.thruDateSellThrough)
     } catch(Exception e) {}
-    inventoryCountResult = runService('countProductInventoryOnHand', [productId : productId, facilityId : facilityId, inventoryCountDate : fromDate, userLogin : userLogin]);
+    inventoryCountResult = runService('countProductInventoryOnHand', [productId : productId, facilityId : facilityId, inventoryCountDate : fromDate, userLogin : userLogin])
     if (inventoryCountResult.quantityOnHandTotal && inventoryCountResult.quantityOnHandTotal > 0) {
-        inventoryShippedForSalesResult = runService('countProductInventoryShippedForSales', [productId : productId, facilityId : facilityId, fromDate : fromDate, thruDate : thruDate, userLogin : userLogin]);
-        context.sellThroughInitialInventory = inventoryCountResult.quantityOnHandTotal;
-        context.sellThroughInventorySold = inventoryShippedForSalesResult.quantityOnHandTotal;
-        context.sellThroughPercentage = new BigDecimal(inventoryShippedForSalesResult.quantityOnHandTotal / inventoryCountResult.quantityOnHandTotal * 100, new java.math.MathContext(2));
+        inventoryShippedForSalesResult = runService('countProductInventoryShippedForSales', [productId : productId, facilityId : facilityId, fromDate : fromDate, thruDate : thruDate, userLogin : userLogin])
+        context.sellThroughInitialInventory = inventoryCountResult.quantityOnHandTotal
+        context.sellThroughInventorySold = inventoryShippedForSalesResult.quantityOnHandTotal
+        context.sellThroughPercentage = new BigDecimal(inventoryShippedForSalesResult.quantityOnHandTotal / inventoryCountResult.quantityOnHandTotal * 100, new java.math.MathContext(2))
     }
 }

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/CountFacilityInventoryByProduct.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/CountFacilityInventoryByProduct.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/CountFacilityInventoryByProduct.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/CountFacilityInventoryByProduct.groovy Wed Nov  2 19:09:13 2016
@@ -41,96 +41,96 @@ import org.apache.ofbiz.entity.model.Mod
 import org.apache.ofbiz.entity.model.ModelViewEntity.ComplexAliasField
 import org.apache.ofbiz.product.inventory.*
 
-action = request.getParameter("action");
+action = request.getParameter("action")
 
-searchParameterString = "action=Y&facilityId=" + facilityId;
+searchParameterString = "action=Y&facilityId=" + facilityId
 
-offsetQOH = -1;
-offsetATP = -1;
-hasOffsetQOH = false;
-hasOffsetATP = false;
+offsetQOH = -1
+offsetATP = -1
+hasOffsetQOH = false
+hasOffsetATP = false
 
-EntityListIterator prodsEli = null;
-rows = [] as ArrayList;
+EntityListIterator prodsEli = null
+rows = [] as ArrayList
 
 if (action) {
     // ------------------------------
-    prodView = new DynamicViewEntity();
-    atpDiffComplexAlias = new ComplexAlias("-");
+    prodView = new DynamicViewEntity()
+    atpDiffComplexAlias = new ComplexAlias("-")
 
-    conditionMap = [facilityId : facilityId];
+    conditionMap = [facilityId : facilityId]
 
     if (offsetQOHQty) {
         try {
-            offsetQOH = Integer.parseInt(offsetQOHQty);
-            hasOffsetQOH = true;
-            searchParameterString = searchParameterString + "&offsetQOHQty=" + offsetQOH;
+            offsetQOH = Integer.parseInt(offsetQOHQty)
+            hasOffsetQOH = true
+            searchParameterString = searchParameterString + "&offsetQOHQty=" + offsetQOH
         } catch (NumberFormatException nfe) {
         }
     }
     if (offsetATPQty) {
         try {
-            offsetATP = Integer.parseInt(offsetATPQty);
-            hasOffsetATP = true;
-            searchParameterString = searchParameterString + "&offsetATPQty=" + offsetATP;
+            offsetATP = Integer.parseInt(offsetATPQty)
+            hasOffsetATP = true
+            searchParameterString = searchParameterString + "&offsetATPQty=" + offsetATP
         } catch (NumberFormatException nfe) {
         }
     }
 
-    prodView.addMemberEntity("PRFA", "ProductFacility");
-    prodView.addAlias("PRFA", "productId", null, null, null, Boolean.TRUE, null);
-    prodView.addAlias("PRFA", "minimumStock", null, null, null, Boolean.TRUE, null);
-    prodView.addAlias("PRFA", "reorderQuantity", null, null, null, Boolean.TRUE, null);
-    prodView.addAlias("PRFA", "daysToShip", null, null, null, Boolean.TRUE, null);
-    prodView.addAlias("PRFA", "facilityId", null, null, null, Boolean.TRUE, null);
-
-    prodView.addMemberEntity("PROD", "Product");
-    prodView.addViewLink("PROD", "PRFA", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
-    prodView.addAlias("PROD", "internalName", null, null, null, Boolean.TRUE, null);
-    prodView.addAlias("PROD", "isVirtual", null, null, null, Boolean.TRUE, null);
-    prodView.addAlias("PROD", "salesDiscontinuationDate", null, null, null, Boolean.TRUE, null);
+    prodView.addMemberEntity("PRFA", "ProductFacility")
+    prodView.addAlias("PRFA", "productId", null, null, null, Boolean.TRUE, null)
+    prodView.addAlias("PRFA", "minimumStock", null, null, null, Boolean.TRUE, null)
+    prodView.addAlias("PRFA", "reorderQuantity", null, null, null, Boolean.TRUE, null)
+    prodView.addAlias("PRFA", "daysToShip", null, null, null, Boolean.TRUE, null)
+    prodView.addAlias("PRFA", "facilityId", null, null, null, Boolean.TRUE, null)
+
+    prodView.addMemberEntity("PROD", "Product")
+    prodView.addViewLink("PROD", "PRFA", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"))
+    prodView.addAlias("PROD", "internalName", null, null, null, Boolean.TRUE, null)
+    prodView.addAlias("PROD", "isVirtual", null, null, null, Boolean.TRUE, null)
+    prodView.addAlias("PROD", "salesDiscontinuationDate", null, null, null, Boolean.TRUE, null)
     if (productTypeId) {
-        prodView.addAlias("PROD", "productTypeId", null, null, null, Boolean.TRUE, null);
-        conditionMap.productTypeId = productTypeId;
-        searchParameterString = searchParameterString + "&productTypeId=" + productTypeId;
-    }
-
-    prodView.addMemberEntity("IITE", "InventoryItem");
-    prodView.addViewLink("PRFA", "IITE", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId", "productId", "facilityId", "facilityId"));
-    prodView.addAlias("IITE", "totalQuantityOnHandTotal", "quantityOnHandTotal", null, null, null, "sum");
-    prodView.addAlias("IITE", "totalAvailableToPromiseTotal", "availableToPromiseTotal", null, null, null, "sum");
-    qohDiffComplexAlias = new ComplexAlias("-");
-    qohDiffComplexAlias.addComplexAliasMember(new ComplexAliasField("IITE", "quantityOnHandTotal", null, "sum"));
-    qohDiffComplexAlias.addComplexAliasMember(new ComplexAliasField("PRFA", "minimumStock", null, null));
-    prodView.addAlias(null, "offsetQOHQtyAvailable", null, null, null, null, null, qohDiffComplexAlias);
-    atpDiffComplexAlias = new ComplexAlias("-");
-    atpDiffComplexAlias.addComplexAliasMember(new ComplexAliasField("IITE", "availableToPromiseTotal", null, "sum"));
-    atpDiffComplexAlias.addComplexAliasMember(new ComplexAliasField("PRFA", "minimumStock", null, null));
-    prodView.addAlias(null, "offsetATPQtyAvailable", null, null, null, null, null, atpDiffComplexAlias);
+        prodView.addAlias("PROD", "productTypeId", null, null, null, Boolean.TRUE, null)
+        conditionMap.productTypeId = productTypeId
+        searchParameterString = searchParameterString + "&productTypeId=" + productTypeId
+    }
+
+    prodView.addMemberEntity("IITE", "InventoryItem")
+    prodView.addViewLink("PRFA", "IITE", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId", "productId", "facilityId", "facilityId"))
+    prodView.addAlias("IITE", "totalQuantityOnHandTotal", "quantityOnHandTotal", null, null, null, "sum")
+    prodView.addAlias("IITE", "totalAvailableToPromiseTotal", "availableToPromiseTotal", null, null, null, "sum")
+    qohDiffComplexAlias = new ComplexAlias("-")
+    qohDiffComplexAlias.addComplexAliasMember(new ComplexAliasField("IITE", "quantityOnHandTotal", null, "sum"))
+    qohDiffComplexAlias.addComplexAliasMember(new ComplexAliasField("PRFA", "minimumStock", null, null))
+    prodView.addAlias(null, "offsetQOHQtyAvailable", null, null, null, null, null, qohDiffComplexAlias)
+    atpDiffComplexAlias = new ComplexAlias("-")
+    atpDiffComplexAlias.addComplexAliasMember(new ComplexAliasField("IITE", "availableToPromiseTotal", null, "sum"))
+    atpDiffComplexAlias.addComplexAliasMember(new ComplexAliasField("PRFA", "minimumStock", null, null))
+    prodView.addAlias(null, "offsetATPQtyAvailable", null, null, null, null, null, atpDiffComplexAlias)
 
     if (searchInProductCategoryId) {
-        prodView.addMemberEntity("PRCA", "ProductCategoryMember");
-        prodView.addViewLink("PRFA", "PRCA", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
-        prodView.addAlias("PRCA", "productCategoryId", null, null, null, Boolean.TRUE, null);
-        conditionMap.productCategoryId = searchInProductCategoryId;
-        searchParameterString = searchParameterString + "&searchInProductCategoryId=" + searchInProductCategoryId;
+        prodView.addMemberEntity("PRCA", "ProductCategoryMember")
+        prodView.addViewLink("PRFA", "PRCA", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"))
+        prodView.addAlias("PRCA", "productCategoryId", null, null, null, Boolean.TRUE, null)
+        conditionMap.productCategoryId = searchInProductCategoryId
+        searchParameterString = searchParameterString + "&searchInProductCategoryId=" + searchInProductCategoryId
     }
 
     if (productSupplierId) {
-        prodView.addMemberEntity("SPPR", "SupplierProduct");
-        prodView.addViewLink("PRFA", "SPPR", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
-        prodView.addAlias("SPPR", "partyId", null, null, null, Boolean.TRUE, null);
-        conditionMap.partyId = productSupplierId;
-        searchParameterString = searchParameterString + "&productSupplierId=" + productSupplierId;
+        prodView.addMemberEntity("SPPR", "SupplierProduct")
+        prodView.addViewLink("PRFA", "SPPR", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"))
+        prodView.addAlias("SPPR", "partyId", null, null, null, Boolean.TRUE, null)
+        conditionMap.partyId = productSupplierId
+        searchParameterString = searchParameterString + "&productSupplierId=" + productSupplierId
     }
 
     // set distinct on so we only get one row per product
-    searchCondition = EntityCondition.makeCondition(conditionMap, EntityOperator.AND);
+    searchCondition = EntityCondition.makeCondition(conditionMap, EntityOperator.AND)
     notVirtualCondition = EntityCondition.makeCondition(EntityCondition.makeCondition("isVirtual", EntityOperator.EQUALS, null),
                                                         EntityOperator.OR,
-                                                        EntityCondition.makeCondition("isVirtual", EntityOperator.NOT_EQUAL, "Y"));
+                                                        EntityCondition.makeCondition("isVirtual", EntityOperator.NOT_EQUAL, "Y"))
 
-    whereConditionsList = [searchCondition, notVirtualCondition];
+    whereConditionsList = [searchCondition, notVirtualCondition]
     // add the discontinuation date condition
     if (productsSoldThruTimestamp) {
         discontinuationDateCondition = EntityCondition.makeCondition(
@@ -138,42 +138,42 @@ if (action) {
                 EntityCondition.makeCondition("salesDiscontinuationDate", EntityOperator.EQUALS, null),
                 EntityCondition.makeCondition("salesDiscontinuationDate", EntityOperator.GREATER_THAN,productsSoldThruTimestamp)
                ],
-               EntityOperator.OR);
-        whereConditionsList.add(discontinuationDateCondition);
-        searchParameterString = searchParameterString + "&productsSoldThruTimestamp=" + productsSoldThruTimestamp;
+               EntityOperator.OR)
+        whereConditionsList.add(discontinuationDateCondition)
+        searchParameterString = searchParameterString + "&productsSoldThruTimestamp=" + productsSoldThruTimestamp
     }
 
     // add search on internal name
     if (internalName) {
-        whereConditionsList.add(EntityCondition.makeCondition("internalName", EntityOperator.LIKE, "%" + internalName + "%"));
-        searchParameterString = searchParameterString + "&internalName=" + internalName;
+        whereConditionsList.add(EntityCondition.makeCondition("internalName", EntityOperator.LIKE, "%" + internalName + "%"))
+        searchParameterString = searchParameterString + "&internalName=" + internalName
     }
 
     // add search on productId
     if (productId) {
-        whereConditionsList.add(EntityCondition.makeCondition("productId", EntityOperator.LIKE, productId + "%"));
-        searchParameterString = searchParameterString + "&productId=" + productId;
+        whereConditionsList.add(EntityCondition.makeCondition("productId", EntityOperator.LIKE, productId + "%"))
+        searchParameterString = searchParameterString + "&productId=" + productId
     }
 
-    orderBy = [];
+    orderBy = []
     if (hasOffsetATP) {
-        orderBy.add("offsetATPQtyAvailable");
+        orderBy.add("offsetATPQtyAvailable")
     }
     if (hasOffsetQOH) {
-        orderBy.add("offsetQOHQtyAvailable");
+        orderBy.add("offsetQOHQtyAvailable")
     }
-    orderBy.add("productId");
+    orderBy.add("productId")
 
     // If the user has specified a number of months over which to sum usage quantities, define the correct timestamp
-    checkTime = null;
-    monthsInPastLimitStr = request.getParameter("monthsInPastLimit");
+    checkTime = null
+    monthsInPastLimitStr = request.getParameter("monthsInPastLimit")
     if (monthsInPastLimitStr) {
         try {
-            monthsInPastLimit = Integer.parseInt(monthsInPastLimitStr);
-            cal = UtilDateTime.toCalendar(null);
-            cal.add(Calendar.MONTH, 0 - monthsInPastLimit);
-            checkTime = UtilDateTime.toTimestamp(cal.getTime());
-            searchParameterString += "&monthsInPastLimit=" + monthsInPastLimitStr;
+            monthsInPastLimit = Integer.parseInt(monthsInPastLimitStr)
+            cal = UtilDateTime.toCalendar(null)
+            cal.add(Calendar.MONTH, 0 - monthsInPastLimit)
+            checkTime = UtilDateTime.toTimestamp(cal.getTime())
+            searchParameterString += "&monthsInPastLimit=" + monthsInPastLimitStr
         } catch (Exception e) {
             // Ignore
         }
@@ -182,76 +182,76 @@ if (action) {
     if (checkTime) {
 
         // Construct a dynamic view entity to search against for sales usage quantities
-        salesUsageViewEntity = new DynamicViewEntity();
-        salesUsageViewEntity.addMemberEntity("OI", "OrderItem");
-        salesUsageViewEntity.addMemberEntity("OH", "OrderHeader");
-        salesUsageViewEntity.addMemberEntity("ItIss", "ItemIssuance");
-        salesUsageViewEntity.addMemberEntity("InvIt", "InventoryItem");
-        salesUsageViewEntity.addViewLink("OI", "OH", false, ModelKeyMap.makeKeyMapList("orderId"));
-        salesUsageViewEntity.addViewLink("OI", "ItIss", false, ModelKeyMap.makeKeyMapList("orderId", "orderId", "orderItemSeqId", "orderItemSeqId"));
-        salesUsageViewEntity.addViewLink("ItIss", "InvIt", false, ModelKeyMap.makeKeyMapList("inventoryItemId"));
-        salesUsageViewEntity.addAlias("OI", "productId");
-        salesUsageViewEntity.addAlias("OH", "statusId");
-        salesUsageViewEntity.addAlias("OH", "orderTypeId");
-        salesUsageViewEntity.addAlias("OH", "orderDate");
-        salesUsageViewEntity.addAlias("ItIss", "inventoryItemId");
-        salesUsageViewEntity.addAlias("ItIss", "quantity");
-        salesUsageViewEntity.addAlias("InvIt", "facilityId");
+        salesUsageViewEntity = new DynamicViewEntity()
+        salesUsageViewEntity.addMemberEntity("OI", "OrderItem")
+        salesUsageViewEntity.addMemberEntity("OH", "OrderHeader")
+        salesUsageViewEntity.addMemberEntity("ItIss", "ItemIssuance")
+        salesUsageViewEntity.addMemberEntity("InvIt", "InventoryItem")
+        salesUsageViewEntity.addViewLink("OI", "OH", false, ModelKeyMap.makeKeyMapList("orderId"))
+        salesUsageViewEntity.addViewLink("OI", "ItIss", false, ModelKeyMap.makeKeyMapList("orderId", "orderId", "orderItemSeqId", "orderItemSeqId"))
+        salesUsageViewEntity.addViewLink("ItIss", "InvIt", false, ModelKeyMap.makeKeyMapList("inventoryItemId"))
+        salesUsageViewEntity.addAlias("OI", "productId")
+        salesUsageViewEntity.addAlias("OH", "statusId")
+        salesUsageViewEntity.addAlias("OH", "orderTypeId")
+        salesUsageViewEntity.addAlias("OH", "orderDate")
+        salesUsageViewEntity.addAlias("ItIss", "inventoryItemId")
+        salesUsageViewEntity.addAlias("ItIss", "quantity")
+        salesUsageViewEntity.addAlias("InvIt", "facilityId")
 
         // Construct a dynamic view entity to search against for production usage quantities
-        productionUsageViewEntity = new DynamicViewEntity();
-        productionUsageViewEntity.addMemberEntity("WEIA", "WorkEffortInventoryAssign");
-        productionUsageViewEntity.addMemberEntity("WE", "WorkEffort");
-        productionUsageViewEntity.addMemberEntity("II", "InventoryItem");
-        productionUsageViewEntity.addViewLink("WEIA", "WE", false, ModelKeyMap.makeKeyMapList("workEffortId"));
-        productionUsageViewEntity.addViewLink("WEIA", "II", false, ModelKeyMap.makeKeyMapList("inventoryItemId"));
-        productionUsageViewEntity.addAlias("WEIA", "quantity");
-        productionUsageViewEntity.addAlias("WE", "actualCompletionDate");
-        productionUsageViewEntity.addAlias("WE", "workEffortTypeId");
-        productionUsageViewEntity.addAlias("II", "facilityId");
-        productionUsageViewEntity.addAlias("II", "productId");
+        productionUsageViewEntity = new DynamicViewEntity()
+        productionUsageViewEntity.addMemberEntity("WEIA", "WorkEffortInventoryAssign")
+        productionUsageViewEntity.addMemberEntity("WE", "WorkEffort")
+        productionUsageViewEntity.addMemberEntity("II", "InventoryItem")
+        productionUsageViewEntity.addViewLink("WEIA", "WE", false, ModelKeyMap.makeKeyMapList("workEffortId"))
+        productionUsageViewEntity.addViewLink("WEIA", "II", false, ModelKeyMap.makeKeyMapList("inventoryItemId"))
+        productionUsageViewEntity.addAlias("WEIA", "quantity")
+        productionUsageViewEntity.addAlias("WE", "actualCompletionDate")
+        productionUsageViewEntity.addAlias("WE", "workEffortTypeId")
+        productionUsageViewEntity.addAlias("II", "facilityId")
+        productionUsageViewEntity.addAlias("II", "productId")
     }
 
-    whereCondition = EntityCondition.makeCondition(whereConditionsList, EntityOperator.AND);
+    whereCondition = EntityCondition.makeCondition(whereConditionsList, EntityOperator.AND)
 
-    beganTransaction = false;
-    List prods = null;
+    beganTransaction = false
+    List prods = null
     try {
-        beganTransaction = TransactionUtil.begin();
+        beganTransaction = TransactionUtil.begin()
 
         // get the indexes for the partial list
-        lowIndex = ((viewIndex.intValue() * viewSize.intValue()) + 1);
-        highIndex = (viewIndex.intValue() + 1) * viewSize.intValue();
-        prodsEli = from(prodView).where(whereCondition).orderBy(orderBy).cursorScrollInsensitive().maxRows(highIndex).distinct().queryIterator();
+        lowIndex = ((viewIndex.intValue() * viewSize.intValue()) + 1)
+        highIndex = (viewIndex.intValue() + 1) * viewSize.intValue()
+        prodsEli = from(prodView).where(whereCondition).orderBy(orderBy).cursorScrollInsensitive().maxRows(highIndex).distinct().queryIterator()
 
         // get the partial list for this page
-        prods = prodsEli.getPartialList(lowIndex, highIndex);
-        prodsIt = prods.iterator();
+        prods = prodsEli.getPartialList(lowIndex, highIndex)
+        prodsIt = prods.iterator()
         while (prodsIt) {
-            oneProd = prodsIt.next();
-            offsetQOHQtyAvailable = oneProd.getBigDecimal("offsetQOHQtyAvailable");
-            offsetATPQtyAvailable = oneProd.getBigDecimal("offsetATPQtyAvailable");
+            oneProd = prodsIt.next()
+            offsetQOHQtyAvailable = oneProd.getBigDecimal("offsetQOHQtyAvailable")
+            offsetATPQtyAvailable = oneProd.getBigDecimal("offsetATPQtyAvailable")
             if (hasOffsetATP) {
                 if (offsetATPQtyAvailable && offsetATPQtyAvailable.doubleValue() > offsetATP) {
-                    break;
+                    break
                 }
             }
             if (hasOffsetQOH) {
                 if (offsetQOHQtyAvailable && offsetQOHQtyAvailable.doubleValue() > offsetQOH) {
-                    break;
+                    break
                 }
             }
 
-            oneInventory = [:];
-            oneInventory.productId = oneProd.productId;
-            oneInventory.minimumStock = oneProd.getBigDecimal("minimumStock");
-            oneInventory.reorderQuantity = oneProd.getBigDecimal("reorderQuantity");
-            oneInventory.daysToShip = oneProd.getString("daysToShip");
-            oneInventory.totalQuantityOnHand = oneProd.totalQuantityOnHandTotal;
-            oneInventory.totalAvailableToPromise = oneProd.totalAvailableToPromiseTotal;
-            oneInventory.offsetQOHQtyAvailable = offsetQOHQtyAvailable;
-            oneInventory.offsetATPQtyAvailable = offsetATPQtyAvailable;
-            oneInventory.quantityOnOrder = InventoryWorker.getOutstandingPurchasedQuantity(oneProd.productId, delegator);
+            oneInventory = [:]
+            oneInventory.productId = oneProd.productId
+            oneInventory.minimumStock = oneProd.getBigDecimal("minimumStock")
+            oneInventory.reorderQuantity = oneProd.getBigDecimal("reorderQuantity")
+            oneInventory.daysToShip = oneProd.getString("daysToShip")
+            oneInventory.totalQuantityOnHand = oneProd.totalQuantityOnHandTotal
+            oneInventory.totalAvailableToPromise = oneProd.totalAvailableToPromiseTotal
+            oneInventory.offsetQOHQtyAvailable = offsetQOHQtyAvailable
+            oneInventory.offsetATPQtyAvailable = offsetATPQtyAvailable
+            oneInventory.quantityOnOrder = InventoryWorker.getOutstandingPurchasedQuantity(oneProd.productId, delegator)
 
 
             if (checkTime) {
@@ -263,20 +263,20 @@ if (action) {
                                         EntityCondition.makeCondition("statusId", EntityOperator.IN, ['ORDER_COMPLETED', 'ORDER_APPROVED', 'ORDER_HELD']),
                                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"),
                                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, checkTime))
-                                    .queryIterator();
+                                    .queryIterator()
 
                 // Sum the sales usage quantities found
-                salesUsageQuantity = 0;
+                salesUsageQuantity = 0
                 salesUsageIt.each { salesUsageItem ->
                     if (salesUsageItem.quantity) {
                         try {
-                            salesUsageQuantity += salesUsageItem.getDouble("quantity").doubleValue();
+                            salesUsageQuantity += salesUsageItem.getDouble("quantity").doubleValue()
                         } catch (Exception e) {
                             // Ignore
                         }
                     }
                 }
-                salesUsageIt.close();
+                salesUsageIt.close()
 
                 // Make a query against the production usage view entity
                 productionUsageIt = from(productionUsageViewEntity)
@@ -284,78 +284,78 @@ if (action) {
                                          EntityCondition.makeCondition("productId", EntityOperator.EQUALS, oneProd.productId),
                                          EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "PROD_ORDER_TASK"),
                                          EntityCondition.makeCondition("actualCompletionDate", EntityOperator.GREATER_THAN_EQUAL_TO, checkTime))
-                                    .queryIterator();
+                                    .queryIterator()
 
                 // Sum the production usage quantities found
-                productionUsageQuantity = 0;
+                productionUsageQuantity = 0
                 productionUsageIt.each { productionUsageItem ->
                     if (productionUsageItem.quantity) {
                         try {
-                            productionUsageQuantity += productionUsageItem.getDouble("quantity").doubleValue();
+                            productionUsageQuantity += productionUsageItem.getDouble("quantity").doubleValue()
                         } catch (Exception e) {
                             // Ignore
                         }
                     }
                 }
-                productionUsageIt.close();
-                oneInventory.usageQuantity = salesUsageQuantity + productionUsageQuantity;
+                productionUsageIt.close()
+                oneInventory.usageQuantity = salesUsageQuantity + productionUsageQuantity
             }
-            rows.add(oneInventory);
+            rows.add(oneInventory)
         }
         if (rows.size() < viewSize.intValue()) {
-            productListSize = lowIndex + rows.size() - 1;
+            productListSize = lowIndex + rows.size() - 1
         } else {
             // attempt to get the full size
             if (hasOffsetQOH || hasOffsetATP) {
-                rowProcessed = 0;
+                rowProcessed = 0
                 while (nextValue = prodsEli.next()) {
-                    offsetQOHQtyAvailable = nextValue.getDouble("offsetQOHQtyAvailable");
-                    offsetATPQtyAvailable = nextValue.getDouble("offsetATPQtyAvailable");
+                    offsetQOHQtyAvailable = nextValue.getDouble("offsetQOHQtyAvailable")
+                    offsetATPQtyAvailable = nextValue.getDouble("offsetATPQtyAvailable")
                     if (hasOffsetATP) {
                         if (offsetATPQtyAvailable && offsetATPQtyAvailable.doubleValue() > offsetATP) {
-                            break;
+                            break
                         }
                     }
                     if (hasOffsetQOH) {
                         if (offsetQOHQtyAvailable && offsetQOHQtyAvailable.doubleValue() > offsetQOH) {
-                            break;
+                            break
                         }
                     }
-                    rowProcessed++;
+                    rowProcessed++
                 }
-                productListSize = lowIndex + rows.size() + rowProcessed - 1;
+                productListSize = lowIndex + rows.size() + rowProcessed - 1
             } else {
-                productListSize = prodsEli.getResultsSizeAfterPartialList();
+                productListSize = prodsEli.getResultsSizeAfterPartialList()
             }
         }
-        prodsEli.close();
+        prodsEli.close()
         if (highIndex > productListSize) {
-            highIndex = productListSize;
+            highIndex = productListSize
         }
-        context.overrideListSize = productListSize;
-        context.highIndex = highIndex;
-        context.lowIndex = lowIndex;
+        context.overrideListSize = productListSize
+        context.highIndex = highIndex
+        context.lowIndex = lowIndex
 
     } catch (GenericEntityException e) {
-        errMsg = "Failure in operation, rolling back transaction";
-        Debug.logError(e, errMsg, "ViewFacilityInventoryByProduct");
+        errMsg = "Failure in operation, rolling back transaction"
+        Debug.logError(e, errMsg, "ViewFacilityInventoryByProduct")
         try {
             // only rollback the transaction if we started one...
-            TransactionUtil.rollback(beganTransaction, errMsg, e);
+            TransactionUtil.rollback(beganTransaction, errMsg, e)
         } catch (GenericEntityException e2) {
-            Debug.logError(e2, "Could not rollback transaction: " + e2.toString(), "ViewFacilityInventoryByProduct");
+            Debug.logError(e2, "Could not rollback transaction: " + e2.toString(), "ViewFacilityInventoryByProduct")
         }
         // after rolling back, rethrow the exception
-        throw e;
+        throw e
     } finally {
         if (prodsEli != null) {
             try {
-                prodsEli.close();
+                prodsEli.close()
             } catch (Exception exc) {}
         }
         // only commit the transaction if we started one... this will throw an exception if it fails
-        TransactionUtil.commit(beganTransaction);
+        TransactionUtil.commit(beganTransaction)
     }
 }
-context.inventoryByProduct = rows;
-context.searchParameterString = searchParameterString;
+context.inventoryByProduct = rows
+context.searchParameterString = searchParameterString

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditContactMech.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditContactMech.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditContactMech.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditContactMech.groovy Wed Nov  2 19:09:13 2016
@@ -17,53 +17,53 @@
  * under the License.
  */
 
-import org.apache.ofbiz.party.contact.*;
+import org.apache.ofbiz.party.contact.*
 
-facilityId = parameters.facilityId;
-context.facilityId = facilityId;
+facilityId = parameters.facilityId
+context.facilityId = facilityId
 
-facility = from("Facility").where("facilityId", facilityId).queryOne();
-context.facility = facility;
+facility = from("Facility").where("facilityId", facilityId).queryOne()
+context.facility = facility
 
-mechMap = [:];
-ContactMechWorker.getFacilityContactMechAndRelated(request, facilityId, mechMap);
-context.mechMap = mechMap;
+mechMap = [:]
+ContactMechWorker.getFacilityContactMechAndRelated(request, facilityId, mechMap)
+context.mechMap = mechMap
 
-contactMechId = mechMap.contactMechId;
+contactMechId = mechMap.contactMechId
 if (contactMechId) {
-    context.contactMechId = contactMechId;
+    context.contactMechId = contactMechId
 }
 
-preContactMechTypeId = request.getParameter("preContactMechTypeId");
+preContactMechTypeId = request.getParameter("preContactMechTypeId")
 if (preContactMechTypeId) {
-    context.preContactMechTypeId = preContactMechTypeId;
+    context.preContactMechTypeId = preContactMechTypeId
 }
 
-paymentMethodId = request.getParameter("paymentMethodId");
+paymentMethodId = request.getParameter("paymentMethodId")
 if (!paymentMethodId) {
-    paymentMethodId = request.getAttribute("paymentMethodId");
+    paymentMethodId = request.getAttribute("paymentMethodId")
 }
 if (paymentMethodId) {
-    context.paymentMethodId = paymentMethodId;
+    context.paymentMethodId = paymentMethodId
 }
 
-donePage = request.getParameter("DONE_PAGE");
+donePage = request.getParameter("DONE_PAGE")
 if (!donePage) {
-    donePage = request.getAttribute("DONE_PAGE");
+    donePage = request.getAttribute("DONE_PAGE")
 }
 if (!donePage || donePage.length() <= 0) {
-    donePage = "ViewContactMechs";
+    donePage = "ViewContactMechs"
 }
-context.donePage = donePage;
+context.donePage = donePage
 
-cmNewPurposeTypeId = request.getParameter("contactMechPurposeTypeId");
+cmNewPurposeTypeId = request.getParameter("contactMechPurposeTypeId")
 if (!cmNewPurposeTypeId) {
-    cmNewPurposeTypeId = mechMap.contactMechPurposeTypeId;
+    cmNewPurposeTypeId = mechMap.contactMechPurposeTypeId
 }
 if (cmNewPurposeTypeId) {
-    context.contactMechPurposeTypeId = cmNewPurposeTypeId;
-    contactMechPurposeType = from("ContactMechPurposeType").where("contactMechPurposeTypeId", cmNewPurposeTypeId).queryOne();
+    context.contactMechPurposeTypeId = cmNewPurposeTypeId
+    contactMechPurposeType = from("ContactMechPurposeType").where("contactMechPurposeTypeId", cmNewPurposeTypeId).queryOne()
     if (contactMechPurposeType) {
-        context.contactMechPurposeType = contactMechPurposeType;
+        context.contactMechPurposeType = contactMechPurposeType
     }
 }

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditFacility.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditFacility.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditFacility.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditFacility.groovy Wed Nov  2 19:09:13 2016
@@ -17,34 +17,34 @@
  * under the License.
  */
 
-import org.apache.ofbiz.entity.condition.*;
+import org.apache.ofbiz.entity.condition.*
 
-facilityId = parameters.facilityId;
+facilityId = parameters.facilityId
 if (!facilityId && request.getAttribute("facilityId")) {
-  facilityId = request.getAttribute("facilityId");
+  facilityId = request.getAttribute("facilityId")
 }
-facility = from("Facility").where("facilityId", facilityId).queryOne();
+facility = from("Facility").where("facilityId", facilityId).queryOne()
 if (!facility) {
-  facility = delegator.makeValue("Facility");
-  facilityType = delegator.makeValue("FacilityType");
+  facility = delegator.makeValue("Facility")
+  facilityType = delegator.makeValue("FacilityType")
 } else {
-  facilityType = facility.getRelatedOne("FacilityType", false);
+  facilityType = facility.getRelatedOne("FacilityType", false)
 }
-context.facility = facility;
-context.facilityType = facilityType;
-context.facilityId = facilityId;
+context.facility = facility
+context.facilityType = facilityType
+context.facilityId = facilityId
 
 //Facility types
-facilityTypes = from("FacilityType").queryList();
+facilityTypes = from("FacilityType").queryList()
 if (facilityTypes) {
-  context.facilityTypes = facilityTypes;
+  context.facilityTypes = facilityTypes
 }
 
 // all possible inventory item types
-context.inventoryItemTypes = from("InventoryItemType").orderBy("description").cache(true).queryList();
+context.inventoryItemTypes = from("InventoryItemType").orderBy("description").cache(true).queryList()
 
 // weight unit of measures
-context.weightUomList = from("Uom").where("uomTypeId", "WEIGHT_MEASURE").cache(true).queryList();
+context.weightUomList = from("Uom").where("uomTypeId", "WEIGHT_MEASURE").cache(true).queryList()
 
 // area unit of measures
-context.areaUomList = from("Uom").where("uomTypeId", "AREA_MEASURE").cache(true).queryList();
+context.areaUomList = from("Uom").where("uomTypeId", "AREA_MEASURE").cache(true).queryList()

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditFacilityLocation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditFacilityLocation.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditFacilityLocation.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/EditFacilityLocation.groovy Wed Nov  2 19:09:13 2016
@@ -17,39 +17,39 @@
  * under the License.
  */
 
-import org.apache.ofbiz.entity.condition.*;
+import org.apache.ofbiz.entity.condition.*
 
-facilityId = request.getParameter("facilityId");
-locationSeqId = request.getParameter("locationSeqId");
-facility = null;
-facilityLocation = null;
+facilityId = request.getParameter("facilityId")
+locationSeqId = request.getParameter("locationSeqId")
+facility = null
+facilityLocation = null
 
 if (!facilityId && request.getAttribute("facilityId")) {
-    facilityId = request.getAttribute("facilityId");
+    facilityId = request.getAttribute("facilityId")
 }
 
 if (!locationSeqId && request.getAttribute("locationSeqId")) {
-    locationSeqId = request.getAttribute("locationSeqId");
+    locationSeqId = request.getAttribute("locationSeqId")
 }
 
 if (facilityId && locationSeqId) {
-    facilityLocation = from("FacilityLocation").where("facilityId", facilityId, "locationSeqId", locationSeqId).queryOne();
+    facilityLocation = from("FacilityLocation").where("facilityId", facilityId, "locationSeqId", locationSeqId).queryOne()
 }
 if (facilityId) {
-    facility = from("Facility").where("facilityId", facilityId).queryOne();
+    facility = from("Facility").where("facilityId", facilityId).queryOne()
 }
 
-locationTypeEnums = from("Enumeration").where("enumTypeId", "FACLOC_TYPE").queryList();
+locationTypeEnums = from("Enumeration").where("enumTypeId", "FACLOC_TYPE").queryList()
 
 // ProductFacilityLocation stuff
-productFacilityLocations = null;
+productFacilityLocations = null
 if (facilityLocation) {
-    productFacilityLocations = facilityLocation.getRelated("ProductFacilityLocation", null, ['productId'], false);
+    productFacilityLocations = facilityLocation.getRelated("ProductFacilityLocation", null, ['productId'], false)
 }
 
-context.facilityId = facilityId;
-context.locationSeqId = locationSeqId;
-context.facility = facility;
-context.facilityLocation = facilityLocation;
-context.locationTypeEnums = locationTypeEnums;
-context.productFacilityLocations = productFacilityLocations;
+context.facilityId = facilityId
+context.locationSeqId = locationSeqId
+context.facility = facility
+context.facilityLocation = facilityLocation
+context.locationTypeEnums = locationTypeEnums
+context.productFacilityLocations = productFacilityLocations

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/FacilityLocationGeoLocation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/FacilityLocationGeoLocation.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/FacilityLocationGeoLocation.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/FacilityLocationGeoLocation.groovy Wed Nov  2 19:09:13 2016
@@ -17,32 +17,32 @@
  * under the License.
  */
 
- import org.apache.ofbiz.base.util.*;
- import org.apache.ofbiz.common.geo.*;
- import org.apache.ofbiz.entity.*;
+ import org.apache.ofbiz.base.util.*
+ import org.apache.ofbiz.common.geo.*
+ import org.apache.ofbiz.entity.*
 
 facilityId = parameters.facilityId
 locationSeqId = parameters.locationSeqId
 
-uiLabelMap = UtilProperties.getResourceBundleMap("ProductUiLabels", locale);
-uiLabelMap.addBottomResourceBundle("CommonUiLabels");
+uiLabelMap = UtilProperties.getResourceBundleMap("ProductUiLabels", locale)
+uiLabelMap.addBottomResourceBundle("CommonUiLabels")
 
 if (facilityId && locationSeqId) {
     latestGeoPoint = GeoWorker.findLatestGeoPoint(delegator, "FacilityLocationAndGeoPoint", "facilityId", facilityId, "locationSeqId", locationSeqId)
-    context.latestGeoPoint = latestGeoPoint;
+    context.latestGeoPoint = latestGeoPoint
 
-    List geoCenter = UtilMisc.toList(UtilMisc.toMap("lat", latestGeoPoint.latitude, "lon", latestGeoPoint.longitude, "zoom", "13"));
+    List geoCenter = UtilMisc.toList(UtilMisc.toMap("lat", latestGeoPoint.latitude, "lon", latestGeoPoint.longitude, "zoom", "13"))
 
     if (UtilValidate.isNotEmpty(latestGeoPoint) && latestGeoPoint.containsKey("latitude") && latestGeoPoint.containsKey("longitude")) {
         List geoPoints = UtilMisc.toList(UtilMisc.toMap("lat", latestGeoPoint.latitude, "lon", latestGeoPoint.longitude, "facilityId", facilityId,
                 "link", UtilMisc.toMap("url", "EditFacilityLocation?facilityId="+ facilityId + "&locationSeqId=" + locationSeqId,
-                "label", uiLabelMap.ProductFacilityLocation  + " " + uiLabelMap.CommonOf + " " + facilityId + "/" + locationSeqId)));
+                "label", uiLabelMap.ProductFacilityLocation  + " " + uiLabelMap.CommonOf + " " + facilityId + "/" + locationSeqId)))
 
-        Map geoChart = UtilMisc.toMap("width", "500px", "height", "450px", "controlUI" , "small", "dataSourceId", latestGeoPoint.dataSourceId, "points", geoPoints);
-        context.geoChart = geoChart;
+        Map geoChart = UtilMisc.toMap("width", "500px", "height", "450px", "controlUI" , "small", "dataSourceId", latestGeoPoint.dataSourceId, "points", geoPoints)
+        context.geoChart = geoChart
     }
     if (latestGeoPoint && latestGeoPoint.elevationUomId) {
-        elevationUom = from("Uom").where("uomId", latestGeoPoint.elevationUomId).queryOne();
-        context.elevationUomAbbr = elevationUom.abbreviation;
+        elevationUom = from("Uom").where("uomId", latestGeoPoint.elevationUomId).queryOne()
+        context.elevationUomAbbr = elevationUom.abbreviation
     }
 }

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacility.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacility.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacility.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacility.groovy Wed Nov  2 19:09:13 2016
@@ -18,15 +18,15 @@
  */
  import org.apache.ofbiz.base.util.*
 
-findResult = from("Facility").queryList();
-findResultSize = findResult.size();
+findResult = from("Facility").queryList()
+findResultSize = findResult.size()
 if (findResultSize == 1) {
-    context.showScreen = "one";
-    context.facility = findResult.get(0);
-    context.parameters.facilityId = context.facility.facilityId;
+    context.showScreen = "one"
+    context.facility = findResult.get(0)
+    context.parameters.facilityId = context.facility.facilityId
 }
 if ((findResultSize > 1 ) && (findResultSize <= 10)) {
-    context.showScreen = "ten";
+    context.showScreen = "ten"
 } else if ((findResultSize > 10 ) || (findResultSize <= 0)) {
-    context.showScreen = "more";
+    context.showScreen = "more"
 }

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacilityLocation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacilityLocation.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacilityLocation.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacilityLocation.groovy Wed Nov  2 19:09:13 2016
@@ -20,34 +20,34 @@
 import org.apache.ofbiz.entity.condition.*
 import org.apache.ofbiz.base.util.*
 
-facilityId = parameters.facilityId;
-context.facilityId = facilityId;
+facilityId = parameters.facilityId
+context.facilityId = facilityId
 
-lookup = request.getParameter("look_up");
-itemId = request.getParameter("inventoryItemId");
+lookup = request.getParameter("look_up")
+itemId = request.getParameter("inventoryItemId")
 if (itemId) {
-    session.setAttribute("inventoryItemId", itemId);
+    session.setAttribute("inventoryItemId", itemId)
 }
 
-itemId = session.getAttribute("inventoryItemId");
-context.itemId = itemId;
+itemId = session.getAttribute("inventoryItemId")
+context.itemId = itemId
 
-facility = from("Facility").where("facilityId", facilityId).queryOne();
-context.facility = facility;
+facility = from("Facility").where("facilityId", facilityId).queryOne()
+context.facility = facility
 
-UtilHttp.parametersToAttributes(request);
+UtilHttp.parametersToAttributes(request)
 if (lookup) {
-    reqParamMap = UtilHttp.getParameterMap(request);
-    paramMap = new HashMap(reqParamMap);
-    paramMap.remove("look_up");
+    reqParamMap = UtilHttp.getParameterMap(request)
+    paramMap = new HashMap(reqParamMap)
+    paramMap.remove("look_up")
     reqParamMap.keySet().each { key ->
-        value = paramMap.get(key);
+        value = paramMap.get(key)
         if (!value || value.length() == 0) {
-            paramMap.remove(key);
+            paramMap.remove(key)
         }
     }
-    foundLocations = from("FacilityLocation").where(paramMap).queryList();
+    foundLocations = from("FacilityLocation").where(paramMap).queryList()
     if (foundLocations) {
-        context.foundLocations = foundLocations;
+        context.foundLocations = foundLocations
     }
 }

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacilityTransfers.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacilityTransfers.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacilityTransfers.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindFacilityTransfers.groovy Wed Nov  2 19:09:13 2016
@@ -17,47 +17,47 @@
  * under the License.
  */
 
-import org.apache.ofbiz.entity.condition.*;
+import org.apache.ofbiz.entity.condition.*
 
 //default this to true, ie only show active
-activeOnly = !"false".equals(request.getParameter("activeOnly"));
-context.activeOnly = activeOnly;
+activeOnly = !"false".equals(request.getParameter("activeOnly"))
+context.activeOnly = activeOnly
 
 // if the completeRequested was set, then we'll lookup only requested status
-completeRequested = "true".equals(request.getParameter("completeRequested"));
-context.completeRequested = completeRequested;
+completeRequested = "true".equals(request.getParameter("completeRequested"))
+context.completeRequested = completeRequested
 
 // get the 'to' this facility transfers
 if (activeOnly) {
     exprsTo = [EntityCondition.makeCondition("facilityIdTo", EntityOperator.EQUALS, facilityId),
                EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "IXF_COMPLETE"),
-               EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "IXF_CANCELLED")];
+               EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "IXF_CANCELLED")]
 } else {
-    exprsTo = [EntityCondition.makeCondition("facilityIdTo", EntityOperator.EQUALS, facilityId)];
+    exprsTo = [EntityCondition.makeCondition("facilityIdTo", EntityOperator.EQUALS, facilityId)]
 }
 if (completeRequested) {
     exprsTo = [EntityCondition.makeCondition("facilityIdTo", EntityOperator.EQUALS, facilityId),
-               EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "IXF_REQUESTED")];
+               EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "IXF_REQUESTED")]
 }
-toTransfers = from("InventoryTransfer").where(exprsTo).orderBy("sendDate").queryList();
+toTransfers = from("InventoryTransfer").where(exprsTo).orderBy("sendDate").queryList()
 if (toTransfers) {
-    context.toTransfers = toTransfers;
+    context.toTransfers = toTransfers
 }
 
 // get the 'from' this facility transfers
 if (activeOnly) {
     exprsFrom = [EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId),
                  EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "IXF_COMPLETE"),
-                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "IXF_CANCELLED")];
+                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "IXF_CANCELLED")]
 } else {
-    exprsFrom = [EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId)];
+    exprsFrom = [EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId)]
 }
 if (completeRequested) {
     exprsFrom = [EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId),
-                 EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "IXF_REQUESTED")];
+                 EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "IXF_REQUESTED")]
 }
-ecl = EntityCondition.makeCondition(exprsFrom, EntityOperator.AND);
-fromTransfers = from("InventoryTransfer").where(exprsFrom).orderBy("sendDate").queryList();
+ecl = EntityCondition.makeCondition(exprsFrom, EntityOperator.AND)
+fromTransfers = from("InventoryTransfer").where(exprsFrom).orderBy("sendDate").queryList()
 if (fromTransfers) {
-    context.fromTransfers = fromTransfers;
+    context.fromTransfers = fromTransfers
 }

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindInventoryItemsByLabels.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindInventoryItemsByLabels.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindInventoryItemsByLabels.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/FindInventoryItemsByLabels.groovy Wed Nov  2 19:09:13 2016
@@ -25,76 +25,76 @@ import org.apache.ofbiz.entity.transacti
 import org.apache.ofbiz.entity.util.EntityFindOptions
 import org.apache.ofbiz.entity.util.EntityListIterator
 
-facilityId = parameters.facilityId;
+facilityId = parameters.facilityId
 
-numberOfFields = 0;
-numberOfFieldsStr = parameters.numberOfFields;
+numberOfFields = 0
+numberOfFieldsStr = parameters.numberOfFields
 try {
-    numberOfFields = Integer.parseInt(numberOfFieldsStr);
+    numberOfFields = Integer.parseInt(numberOfFieldsStr)
 } catch (Exception exc) {
-    numberOfFields = 0;
+    numberOfFields = 0
 }
 
-inventoryItemAndLabelsView = new DynamicViewEntity();
-inventoryItemAndLabelsView.addMemberEntity("II", "InventoryItem");
-inventoryItemAndLabelsView.addAliasAll("II", null, null);
+inventoryItemAndLabelsView = new DynamicViewEntity()
+inventoryItemAndLabelsView.addMemberEntity("II", "InventoryItem")
+inventoryItemAndLabelsView.addAliasAll("II", null, null)
 for (int i = 1; i <= numberOfFields; i++) {
-    inventoryItemLabelId = parameters.get("inventoryItemLabelId_" + i);
+    inventoryItemLabelId = parameters.get("inventoryItemLabelId_" + i)
     if (inventoryItemLabelId) {
-        inventoryItemAndLabelsView.addMemberEntity("IL" + i, "InventoryItemLabelAppl");
-        inventoryItemAndLabelsView.addViewLink("II", "IL" + i, new Boolean(false), ModelKeyMap.makeKeyMapList("inventoryItemId"));
+        inventoryItemAndLabelsView.addMemberEntity("IL" + i, "InventoryItemLabelAppl")
+        inventoryItemAndLabelsView.addViewLink("II", "IL" + i, new Boolean(false), ModelKeyMap.makeKeyMapList("inventoryItemId"))
     }
 }
-andCondition = [EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId)];
+andCondition = [EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId)]
 for (int i = 1; i <= numberOfFields; i++) {
-    inventoryItemLabelId = parameters.get("inventoryItemLabelId_" + i);
+    inventoryItemLabelId = parameters.get("inventoryItemLabelId_" + i)
     if (inventoryItemLabelId) {
-        inventoryItemAndLabelsView.addAlias("IL" + i, "inventoryItemLabelId" + i, "inventoryItemLabelId", null, null, null, null);
-        andCondition.add(EntityCondition.makeCondition("inventoryItemLabelId" + i, EntityOperator.EQUALS, inventoryItemLabelId));
+        inventoryItemAndLabelsView.addAlias("IL" + i, "inventoryItemLabelId" + i, "inventoryItemLabelId", null, null, null, null)
+        andCondition.add(EntityCondition.makeCondition("inventoryItemLabelId" + i, EntityOperator.EQUALS, inventoryItemLabelId))
     }
 }
-EntityListIterator inventoryItemsEli = null;
-beganTransaction = false;
-List inventoryItems = null;
+EntityListIterator inventoryItemsEli = null
+beganTransaction = false
+List inventoryItems = null
 if (andCondition.size() > 1) {
     try {
         // get the indexes for the partial list
-        lowIndex = ((viewIndex * viewSize) + 1);
-        highIndex = (viewIndex - 1) * viewSize;
+        lowIndex = ((viewIndex * viewSize) + 1)
+        highIndex = (viewIndex - 1) * viewSize
 
-        beganTransaction = TransactionUtil.begin();
-        inventoryItemsEli = from(inventoryItemAndLabelsView).where(andCondition).cursorScrollInsensitive().distinct().maxRows(highIndex).queryIterator();
+        beganTransaction = TransactionUtil.begin()
+        inventoryItemsEli = from(inventoryItemAndLabelsView).where(andCondition).cursorScrollInsensitive().distinct().maxRows(highIndex).queryIterator()
 
-        inventoryItemsSize = inventoryItemsEli.getResultsSizeAfterPartialList();
-        context.inventoryItemsSize = inventoryItemsSize;
+        inventoryItemsSize = inventoryItemsEli.getResultsSizeAfterPartialList()
+        context.inventoryItemsSize = inventoryItemsSize
         if (highIndex > inventoryItemsSize) {
-            highIndex = inventoryItemsSize;
+            highIndex = inventoryItemsSize
         }
 
         // get the partial list for this page
-        inventoryItemsEli.beforeFirst();
+        inventoryItemsEli.beforeFirst()
         if (inventoryItemsSize > 0) {
-            inventoryItems = inventoryItemsEli.getPartialList(lowIndex, viewSize);
+            inventoryItems = inventoryItemsEli.getPartialList(lowIndex, viewSize)
         } else {
-            inventoryItems = [] as ArrayList;
+            inventoryItems = [] as ArrayList
         }
 
         // close the list iterator
-        inventoryItemsEli.close();
+        inventoryItemsEli.close()
     } catch (GenericEntityException e) {
-        errMsg = "Failure in operation, rolling back transaction";
-        Debug.logError(e, errMsg, "findInventoryItemsByLabels");
+        errMsg = "Failure in operation, rolling back transaction"
+        Debug.logError(e, errMsg, "findInventoryItemsByLabels")
         try {
             // only rollback the transaction if we started one...
-            TransactionUtil.rollback(beganTransaction, errMsg, e);
+            TransactionUtil.rollback(beganTransaction, errMsg, e)
         } catch (GenericEntityException e2) {
-            Debug.logError(e2, "Could not rollback transaction: " + e2.toString(), "findInventoryItemsByLabels");
+            Debug.logError(e2, "Could not rollback transaction: " + e2.toString(), "findInventoryItemsByLabels")
         }
         // after rolling back, rethrow the exception
-        throw e;
+        throw e
     } finally {
         // only commit the transaction if we started one... this will throw an exception if it fails
-        TransactionUtil.commit(beganTransaction);
+        TransactionUtil.commit(beganTransaction)
     }
 }
-context.inventoryItems = inventoryItems;
+context.inventoryItems = inventoryItems

Modified: ofbiz/trunk/applications/product/groovyScripts/facility/facility/ViewContactMechs.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/facility/ViewContactMechs.groovy?rev=1767764&r1=1767763&r2=1767764&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/facility/ViewContactMechs.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/facility/ViewContactMechs.groovy Wed Nov  2 19:09:13 2016
@@ -20,22 +20,22 @@
 import org.apache.ofbiz.base.util.*
 import org.apache.ofbiz.party.contact.*
 
-context.nowStr = UtilDateTime.nowTimestamp();
+context.nowStr = UtilDateTime.nowTimestamp()
 
-facilityId = parameters.facilityId;
-facility = from("Facility").where("facilityId", facilityId).queryOne();
-facilityType = null;
+facilityId = parameters.facilityId
+facility = from("Facility").where("facilityId", facilityId).queryOne()
+facilityType = null
 if (!facility) {
-  context.facility = delegator.makeValue("Facility", null);
-  context.facilityType = delegator.makeValue("FacilityType", null);
+  context.facility = delegator.makeValue("Facility", null)
+  context.facilityType = delegator.makeValue("FacilityType", null)
 } else {
-  facilityType = facility.getRelatedOne("FacilityType", false);
+  facilityType = facility.getRelatedOne("FacilityType", false)
 }
-context.facility = facility;
-context.facilityType = facilityType;
-context.facilityId = facilityId;
+context.facility = facility
+context.facilityType = facilityType
+context.facilityId = facilityId
 
-showOld = "true".equals(request.getParameter("SHOW_OLD"));
-context.showOld = new Boolean(showOld);
+showOld = "true".equals(request.getParameter("SHOW_OLD"))
+context.showOld = new Boolean(showOld)
 
-context.contactMeches = ContactMechWorker.getFacilityContactMechValueMaps(delegator, facilityId, showOld, null);
+context.contactMeches = ContactMechWorker.getFacilityContactMechValueMaps(delegator, facilityId, showOld, null)