svn commit: r1746830 - in /ofbiz/trunk/applications/manufacturing: webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy widget/manufacturing/JobshopScreens.xml

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

svn commit: r1746830 - in /ofbiz/trunk/applications/manufacturing: webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy widget/manufacturing/JobshopScreens.xml

diveshdutta
Author: diveshdutta
Date: Sat Jun  4 14:02:27 2016
New Revision: 1746830

URL: http://svn.apache.org/viewvc?rev=1746830&view=rev
Log:
[OFBIZ-7087] Now material/components required will also be shown when production run is confirmed, before this commit materials required  were not shown when production run is confirmed. Thanks Ratnesh Upadhyay for the patch and Swapnil Shah for suggesgting the improvement.

Modified:
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
    ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml

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=1746830&r1=1746829&r2=1746830&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 Sat Jun  4 14:02:27 2016
@@ -56,7 +56,9 @@ if (productionRunId) {
 
         lastTask = productionRun.getLastProductionRunRoutingTask();
         quantityDeclared = lastTask ? (lastTask.quantityProduced ?: 0.0) : 0.0 ;
-
+        
+        context.canDeclareAndProduce = "N";
+        
         if (lastTask && ("PRUN_RUNNING".equals(lastTask.currentStatusId) || "PRUN_COMPLETED".equals(lastTask.currentStatusId))) {
             context.canDeclareAndProduce = "Y";
         }
@@ -209,6 +211,7 @@ if (productionRunId) {
         // Content
         productionRunContents = from("WorkEffortContentAndInfo").where("workEffortId", productionRunId).orderBy("-fromDate").filterByDate().queryList();
         context.productionRunContents = productionRunContents;
+        context.productionRunComponents = productionRunComponents;
         context.productionRunComponentsData = productionRunComponentsData;
         context.productionRunComponentsDataReadyForIssuance = productionRunComponentsDataReadyForIssuance;
         context.productionRunComponentsAlreadyIssued = productionRunComponentsAlreadyIssued;

Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?rev=1746830&r1=1746829&r2=1746830&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml Sat Jun  4 14:02:27 2016
@@ -245,6 +245,16 @@ under the License.
                         <screenlet title="${uiLabelMap.ManufacturingListOfProductionRunRoutingTasks}">
                             <include-form name="ListProductionRunDeclRoutingTasks" location="component://manufacturing/widget/manufacturing/ProductionRunForms.xml"/>
                         </screenlet>
+                        <section>
+                            <condition>
+                                <if-compare field="canDeclareAndProduce" operator="equals" value="N"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.ManufacturingMaterials}">
+                                    <include-form name="ListProductionRunComponents" location="component://manufacturing/widget/manufacturing/ProductionRunForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                        </section>
                         <screenlet title="${uiLabelMap.ManufacturingProductionRunDeclaration}">
                           <section>
                             <condition>
@@ -266,6 +276,7 @@ under the License.
                             </widgets>
                           </section>
                         </screenlet>
+                        
                         <screenlet title="${uiLabelMap.ManufacturingMaterialsRequiredByRunningTask}">
                             <include-form name="ListIssueProductionRunDeclComponents" location="component://manufacturing/widget/manufacturing/ProductionRunForms.xml"/>
                         </screenlet>