svn commit: r1679740 - /ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/CuttingListReport.groovy

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

svn commit: r1679740 - /ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/CuttingListReport.groovy

Deepak Dixit-5
Author: deepak
Date: Sat May 16 12:35:56 2015
New Revision: 1679740

URL: http://svn.apache.org/r1679740
Log:
Applied patch from jira issue OFBIZ-5916 : Cutting List Report from Manufacturing Shipment Plans throws error due to due to missing EntityCondition import.

Thanks Christian Carlow for reporting issue and providing the fix.

Modified:
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/CuttingListReport.groovy

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/CuttingListReport.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/CuttingListReport.groovy?rev=1679740&r1=1679739&r2=1679740&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/CuttingListReport.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/CuttingListReport.groovy Sat May 16 12:35:56 2015
@@ -51,13 +51,13 @@ productIdToQuantity = [:]; // key=produc
 productIdToProduct = [:]; // key=productId, value=product
 dimensionToProducts = [:]; // key=Dimension, value=list of products
 dimensionToQuantity = [:]; // key=Dimension, value=tot qty (of products)
-
-shipmentPlans = delegator.findList("OrderShipment", EntityCondition.makeCondition([shipmentId : shipmentId]), null, null, null, false);
+    
+shipmentPlans = from("OrderShipment").where("shipmentId", shipmentId).queryList()
 
 if (shipmentPlans) {
     shipmentPlans.each { shipmentPlan ->
         // Select the production run, if available
-        weIds = delegator.findList("WorkOrderItemFulfillment", EntityCondition.makeCondition([orderId : shipmentPlan.orderId, orderItemSeqId : shipmentPlan.orderItemSeqId]), null, ['workEffortId'], null, false); // TODO: add shipmentId
+        weIds = from("WorkOrderItemFulfillment").where("orderId", shipmentPlan.orderId, "orderItemSeqId", shipmentPlan.orderItemSeqId).orderBy("workEffortId").queryList(); // TODO: add shipmentId
         weId = EntityUtil.getFirst(weIds);
         productionRunTree = [] as ArrayList;
         // TODO