svn commit: r663635 - in /ofbiz/trunk/applications/manufacturing/webapp/manufacturing: WEB-INF/actions/bom/ WEB-INF/actions/jobshopmgt/ bom/

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

svn commit: r663635 - in /ofbiz/trunk/applications/manufacturing/webapp/manufacturing: WEB-INF/actions/bom/ WEB-INF/actions/jobshopmgt/ bom/

jacopoc
Author: jacopoc
Date: Thu Jun  5 07:52:41 2008
New Revision: 663635

URL: http://svn.apache.org/viewvc?rev=663635&view=rev
Log:
Misc fixes required after migration to Groovy.

Modified:
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/EditProductBom.ftl

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy?rev=663635&r1=663634&r2=663635&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy Thu Jun  5 07:52:41 2008
@@ -69,6 +69,6 @@
     if (assocFromProducts) context.assocFromProducts = assocFromProducts;
 
     assocToProducts = product.getRelatedByAnd("AssocProductAssoc", (productAssocTypeId ? [productAssocTypeId : productAssocTypeId]: [:]));
-    if (assocTOProducts) context.assocToProducts = assocToProducts;
+    if (assocToProducts) context.assocToProducts = assocToProducts;
 }
 

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy?rev=663635&r1=663634&r2=663635&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy Thu Jun  5 07:52:41 2008
@@ -17,6 +17,7 @@
  * under the License.
  */
 
+import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.widget.html.HtmlFormWrapper;
 
 productionRunId = parameters.productionRunId ?: parameters.workEffortId;

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy?rev=663635&r1=663634&r2=663635&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy Thu Jun  5 07:52:41 2008
@@ -20,6 +20,7 @@
 // The only required parameter is "productionRunId".
 // The "actionForm" parameter triggers actions (see "ProductionRunSimpleEvents.xml").
 
+import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.widget.html.HtmlFormWrapper;
 import org.ofbiz.manufacturing.jobshopmgt.ProductionRun;
@@ -63,11 +64,11 @@
         }
 
         // Find if the production run can produce inventory.
-        Double quantityProduced = productionRun.getGenericValue().getDouble("quantityProduced") ?: new Double(0);
+        Double quantityProduced = productionRun.getGenericValue().getDouble("quantityProduced")?: new Double(0);
         Double quantityRejected = productionRun.getGenericValue().getDouble("quantityRejected")?: new Double(0);
         
         lastTask = productionRun.getLastProductionRunRoutingTask();
-        Double quantityDeclared = (lastTask ? lastTask.getDouble("quantityProduced"): new Double(0));
+        Double quantityDeclared = (lastTask ? (lastTask.getDouble("quantityProduced")?: new Double(0)): new Double(0));
         
         if (lastTask && ("PRUN_RUNNING".equals(lastTask.currentStatusId) || "PRUN_COMPLETED".equals(lastTask.currentStatusId))) {
             context.canDeclareAndProduce = "Y";

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy?rev=663635&r1=663634&r2=663635&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy Thu Jun  5 07:52:41 2008
@@ -20,6 +20,7 @@
 // The only required parameter is "productionRunId".
 // The "actionForm" parameter triggers actions (see "ProductionRunSimpleEvents.xml").
 
+import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.manufacturing.jobshopmgt.ProductionRun;
 
 productionRunId = parameters.productionRunId;
@@ -43,7 +44,7 @@
         context.productionRunData = productionRunData;
 
         // Find all the order items to which this production run is linked.
-        orderItems = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId , productionRunId]);
+        orderItems = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : productionRunId]);
         if (orderItems) {
             context.orderItems = orderItems;
         }

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/EditProductBom.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/EditProductBom.ftl?rev=663635&r1=663634&r2=663635&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/EditProductBom.ftl (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/EditProductBom.ftl Thu Jun  5 07:52:41 2008
@@ -252,7 +252,7 @@
         <td>&nbsp;</td>
       </tr>
     <#assign alt_row = false>
-    <#list assocFromProducts as assocFromProduct>
+    <#list assocFromProducts?if_exists as assocFromProduct>
     <#assign listToProduct = assocFromProduct.getRelatedOneCache("AssocProduct")>
     <#assign curProductAssocType = assocFromProduct.getRelatedOneCache("ProductAssocType")>
       <tr valign="middle"<#if alt_row> class="alternate-row"</#if>>
@@ -300,7 +300,7 @@
             <td>&nbsp;</td>
         </tr>
         <#assign alt_row = false>
-        <#list assocToProducts as assocToProduct>
+        <#list assocToProducts?if_exists as assocToProduct>
         <#assign listToProduct = assocToProduct.getRelatedOneCache("MainProduct")>
         <#assign curProductAssocType = assocToProduct.getRelatedOneCache("ProductAssocType")>
         <tr valign="middle"<#if alt_row> class="alternate-row"</#if>>