Author: jacopoc
Date: Wed Mar 28 03:52:54 2007
New Revision: 523275

URL: http://svn.apache.org/viewvc?view=rev&rev=523275
Log:
Misc enhancements for the production run decalration screen.

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

Modified: 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh?view=diff&rev=523275&r1=523274&r2=523275
==============================================================================
--- 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
 (original)
+++ 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
 Wed Mar 28 03:52:54 2007
@@ -87,7 +87,6 @@
         }
         double maxQuantity = quantityDeclared.doubleValue() - 
quantityProduced.doubleValue();
 
-
         HashMap productionRunData= new HashMap();
         productionRunData.put("workEffortId",productionRunId);
         productionRunData.put("productId", 
productionRun.getProductProduced().getString("productId"));
@@ -180,13 +179,10 @@
                 startTaskId = task.getString("workEffortId");
             }
         }
-        HtmlFormWrapper ListProductionRunRoutingTasksWrapper = new 
HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml",
 "ListProductionRunDeclRoutingTasks", request, response);
-        
ListProductionRunRoutingTasksWrapper.putInContext("productionRunRoutingTasks", 
productionRunRoutingTasks);
-        ListProductionRunRoutingTasksWrapper.putInContext("startTaskId", 
(startTaskId != null? startTaskId: "null"));
-        ListProductionRunRoutingTasksWrapper.putInContext("issueTaskId", 
(issueTaskId != null? issueTaskId: "null"));
-        ListProductionRunRoutingTasksWrapper.putInContext("completeTaskId", 
(completeTaskId != null? completeTaskId: "null"));
-        
context.put("ListProductionRunRoutingTasksWrapper",ListProductionRunRoutingTasksWrapper);
         context.put("productionRunRoutingTasks", productionRunRoutingTasks);
+        context.put("startTaskId", (startTaskId != null? startTaskId: "null"));
+        context.put("issueTaskId", (issueTaskId != null? issueTaskId: "null"));
+        context.put("completeTaskId", (completeTaskId != null? completeTaskId: 
"null"));
 
         //  Product components list
         List productionRunComponents = 
productionRun.getProductionRunComponents();
@@ -234,12 +230,8 @@
                 productionRunComponentsData.add(componentData);
             }
         }
-        HtmlFormWrapper ListProductionRunComponentsWrapper = new 
HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml",
 "ListProductionRunDeclComponents", request, response);
-        ListProductionRunComponentsWrapper.putInContext("productionRunId", 
productionRunId);
-        
ListProductionRunComponentsWrapper.putInContext("productionRunComponentsData", 
productionRunComponentsData);
-        
context.put("ListProductionRunComponentsWrapper",ListProductionRunComponentsWrapper);
         context.put("productionRunComponentsData", 
productionRunComponentsData);
-        
+
         // Fixed assets list
         List productionRunFixedAssetsData = new LinkedList();
         for (Iterator tasksIt = productionRunRoutingTasks.iterator(); 
tasksIt.hasNext();) {
@@ -247,10 +239,7 @@
             List taskFixedAssets = 
prodRunTask.getRelated("WorkEffortFixedAssetAssign");
             productionRunFixedAssetsData.addAll(taskFixedAssets);
         }
-        HtmlFormWrapper ListProductionRunFixedAssetsWrapper = new 
HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml",
 "ListProductionRunTaskFixedAssets", request, response);
-        ListProductionRunFixedAssetsWrapper.putInContext("productionRunId", 
productionRunId);
-        
ListProductionRunFixedAssetsWrapper.putInContext("productionRunFixedAssetsData",
 productionRunFixedAssetsData);
-        ListProductionRunFixedAssetsWrapper.putInContext("declarationScreen", 
"Y");
-        context.put("ListProductionRunFixedAssetsWrapper", 
ListProductionRunFixedAssetsWrapper);
+        context.put("productionRunFixedAssetsData", 
productionRunFixedAssetsData);
+
     }
 }

Modified: 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl?view=diff&rev=523275&r1=523274&r2=523275
==============================================================================
--- 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl
 (original)
+++ 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl
 Wed Mar 28 03:52:54 2007
@@ -17,90 +17,21 @@
 under the License.
 -->
 
-<table border="0" width="100%" cellspacing="0" cellpadding="0">
-    <tr valign="top">
-        <#-- RoutingTask sub-screen  Update or Add  -->
-        <#if routingTaskId?has_content || actionForm=="AddRoutingTask">
-        <td> &nbsp; </td>
-        <td>
-            <table border="0" width="100%" cellspacing="0" cellpadding="0" 
class="boxoutside">
-                <tr>
-                    <td>
-                        <table width="100%" border="0" cellspacing="0" 
cellpadding="0" class="boxtop">
-                            <tr>
-                                <#-- RoutingTask Update  -->
-                                <#if routingTaskId?has_content>
-                                <td>
-                                    <div 
class="boxhead">${uiLabelMap.CommonEdit}&nbsp;${uiLabelMap.ManufacturingRoutingTaskId}:
 ${routingTaskId}</div>
-                                </td>
-                                <#else>
-                                <#-- RoutingTask Add -->
-                                <td>
-                                    <div 
class="boxhead">${uiLabelMap.ManufacturingAddRoutingTask}</div>
-                                </td>
-                                </#if>
-                            </tr>
-                        </table>
-                        ${editPrRoutingTaskWrapper.renderFormString(context)}
-                        <br/>
-                        
${createRoutingTaskDelivProductForm.renderFormString(context)}
-                        <#if prunInventoryProduced?has_content>
-                            <br/>
-                            
${prunInventoryProducedForm.renderFormString(context)}
-                        </#if>
-                    </td>
-                </tr>
-            </table>
-            </td>
-        </#if>
-        </tr>
-    </table>
-    <br/>
-    
-              <#-- List Of ProductionRun RoutingTasks  sub-screen -->
-    <table border="0" width="100%" cellspacing="0" cellpadding="0" 
class="boxoutside">
-        <tr>
-            <td>
-                <table width="100%" border="0" cellspacing="0" cellpadding="0" 
class="boxtop">
-                    <tr>
-                        <td><div 
class="boxhead">${uiLabelMap.ManufacturingListOfProductionRunRoutingTasks}</div></td>
-                        <td align="right">
-                            <div class="boxhead-right" align="right">
-                                <a 
href="<@ofbizUrl>quickRunAllProductionRunTasks?productionRunId=${productionRunId}</@ofbizUrl>"
 class="submenutext">${uiLabelMap.ManufacturingQuickRunAllTasks}</a>
-                            </div>
-                        </td>
-                    </tr>
-                </table>
-            </td>
-        </tr>
-        <tr>
-            <td>
-                
${ListProductionRunRoutingTasksWrapper.renderFormString(context)}
-            </td>
-        </tr>
-    </table>
-
-        <#-- List Of ProductionRun Components  sub-screen -->
-    <table border="0" width="100%" cellspacing="0" cellpadding="0" 
class="boxoutside">
-      <tr><td>
-        <table width="100%" border="0" cellspacing="0" cellpadding="0" 
class="boxtop">
+    <#if routingTaskId?has_content || actionForm=="AddRoutingTask">
+        <table border="0" cellspacing="0" cellpadding="0" class="boxoutside">
             <tr>
-                <td><div 
class="boxhead">${uiLabelMap.ManufacturingListOfProductionRunComponents}</div></td>
-                <td align="right"></td>
+                <td>
+                    ${editPrRoutingTaskWrapper.renderFormString(context)}
+                </td>
+                <td>
+                    
${createRoutingTaskDelivProductForm.renderFormString(context)}
+                    <#if prunInventoryProduced?has_content>
+                        ${prunInventoryProducedForm.renderFormString(context)}
+                    </#if>
+                </td>
             </tr>
         </table>
-        ${ListProductionRunComponentsWrapper.renderFormString(context)}
-      </td></tr>
-    </table>
+    </#if>
+<br/>
 
-    <#-- List of ProductionRun Fixed Assets sub-screen -->
-    <table border="0" width="100%" cellspacing="0" cellpadding="0" 
class="boxoutside">
-      <tr><td>
-        <table width="100%" border="0" cellspacing="0" cellpadding="0" 
class="boxtop">
-            <tr>
-                <td><div 
class="boxhead">${uiLabelMap.ManufacturingListOfProductionRunFixedAssets}</div></td>
-            </tr>
-        </table>
-        ${ListProductionRunFixedAssetsWrapper.renderFormString(context)}
-      </td></tr>
-    </table>
+    
\ No newline at end of file

Modified: 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl?view=diff&rev=523275&r1=523274&r2=523275
==============================================================================
--- 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl
 (original)
+++ 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl
 Wed Mar 28 03:52:54 2007
@@ -24,12 +24,12 @@
     <#if productionRun?has_content>
         <#if productionRun.getString("currentStatusId") == "PRUN_CREATED" || 
productionRun.getString("currentStatusId") == "PRUN_SCHEDULED">
         <a 
href="<@ofbizUrl>EditProductionRun?productionRunId=${productionRunId}</@ofbizUrl>"
 
class="${selectedClassMap.edit?default(unselectedClassName)}">${uiLabelMap.ManufacturingEditProductionRun}</a>
-        <#else>
-        <a 
href="<@ofbizUrl>ProductionRunDeclaration?productionRunId=${productionRunId}</@ofbizUrl>"
 
class="${selectedClassMap.declaration?default(unselectedClassName)}">${uiLabelMap.ManufacturingProductionRunDeclaration}</a>
-        </#if>
         <a 
href="<@ofbizUrl>ProductionRunTasks?productionRunId=${productionRunId}</@ofbizUrl>"
 
class="${selectedClassMap.tasks?default(unselectedClassName)}">${uiLabelMap.ManufacturingListOfProductionRunRoutingTasks}</a>
         <a 
href="<@ofbizUrl>ProductionRunComponents?productionRunId=${productionRunId}</@ofbizUrl>"
 
class="${selectedClassMap.components?default(unselectedClassName)}">${uiLabelMap.ManufacturingMaterials}</a>
         <a 
href="<@ofbizUrl>ProductionRunFixedAssets?productionRunId=${productionRunId}</@ofbizUrl>"
 
class="${selectedClassMap.fixedAssets?default(unselectedClassName)}">${uiLabelMap.AccountingFixedAssets}</a>
+        <#else>
+        <a 
href="<@ofbizUrl>ProductionRunDeclaration?productionRunId=${productionRunId}</@ofbizUrl>"
 
class="${selectedClassMap.declaration?default(unselectedClassName)}">${uiLabelMap.ManufacturingProductionRunDeclaration}</a>
+        </#if>
         <a 
href="<@ofbizUrl>ProductionRunAssocs?productionRunId=${productionRunId}</@ofbizUrl>"
 
class="${selectedClassMap.assocs?default(unselectedClassName)}">${uiLabelMap.ManufacturingProductionRunAssocs}</a>
         <a 
href="<@ofbizUrl>ProductionRunCosts?productionRunId=${productionRunId}</@ofbizUrl>"
 
class="${selectedClassMap.costs?default(unselectedClassName)}">${uiLabelMap.ManufacturingActualCosts}</a>
     </#if>

Modified: 
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?view=diff&rev=523275&r1=523274&r2=523275
==============================================================================
--- 
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml 
(original)
+++ 
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml 
Wed Mar 28 03:52:54 2007
@@ -89,6 +89,7 @@
                 <decorator-screen name="CommonJobshopDecorator">
                     <decorator-section name="body">
                         <container>
+                            <link 
target="PrintProductionRun?productionRunId=${productionRunId}" 
text="${uiLabelMap.CommonPrint}" style="buttontext"/>
                             <link 
target="quickChangeProductionRunStatus?productionRunId=${productionRunId}&amp;statusId=PRUN_SCHEDULED"
 text="${uiLabelMap.ManufacturingSchedule}" style="buttontext"/>
                             <link 
target="changeProductionRunStatusToPrinted?productionRunId=${productionRunId}" 
text="${uiLabelMap.ManufacturingConfirmProductionRun}" style="buttontext"/>
                             <link 
target="quickChangeProductionRunStatus?productionRunId=${productionRunId}&amp;statusId=PRUN_COMPLETED"
 text="${uiLabelMap.ManufacturingQuickComplete}" style="buttontext"/>
@@ -134,14 +135,13 @@
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" 
type="Integer"/>
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" 
type="Integer" default-value="500"/>
 
-                <!--<script 
location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.bsh"/>-->
                 <script 
location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonJobshopDecorator">
                     <decorator-section name="body">
                         <container>
-                            <link 
target="PrintProductionRun?productionRunId=${productionRunId}" 
text="${uiLabelMap.ManufacturingPrintProductionRun}" style="buttontext"/>
+                            <link 
target="PrintProductionRun?productionRunId=${productionRunId}" 
text="${uiLabelMap.CommonPrint}" style="buttontext"/>
                             <section>
                                 <condition>
                                     <if-compare 
field-name="productionRun.currentStatusId" operator="equals" 
value="PRUN_COMPLETED"/>
@@ -159,6 +159,7 @@
                                     </and>
                                 </condition>
                                 <widgets>
+                                    <link 
target="quickRunAllProductionRunTasks?productionRunId=${productionRunId}" 
text="${uiLabelMap.ManufacturingQuickRunAllTasks}" style="buttontext"/>
                                     <link 
target="quickChangeProductionRunStatus?productionRunId=${productionRunId}&amp;statusId=PRUN_COMPLETED"
 text="${uiLabelMap.ManufacturingQuickComplete}" style="buttontext"/>
                                     <link 
target="quickChangeProductionRunStatus?productionRunId=${productionRunId}&amp;statusId=PRUN_CLOSED"
 text="${uiLabelMap.ManufacturingQuickClose}" style="buttontext"/>
                                     <link 
target="cancelProductionRun?productionRunId=${productionRunId}" 
text="${uiLabelMap.ManufacturingCancel}" style="buttontext"/>
@@ -177,6 +178,9 @@
                                 <include-form name="ProductionRunProduce" 
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
                             </widgets>
                         </section>
+                        <platform-specific>
+                            <html><html-template 
location="component://manufacturing/webapp/manufacturing/jobshopmgt/associatedProductionRuns.ftl"/></html>
+                        </platform-specific>
                         <container>
                             <label 
style="head2">${uiLabelMap.ManufacturingInventoryItemsProduced}</label>
                         </container>
@@ -185,12 +189,21 @@
                             <label 
style="head2">${uiLabelMap.ManufacturingOrderItems}</label>
                         </container>
                         <include-form name="ListProductionRunOrderItems" 
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
+                        <container>
+                            <label 
style="head2">${uiLabelMap.ManufacturingListOfProductionRunRoutingTasks}</label>
+                        </container>
+                        <include-form name="ListProductionRunDeclRoutingTasks" 
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
                         <platform-specific>
                             <html><html-template 
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl"/></html>
                         </platform-specific>
-                        <platform-specific>
-                            <html><html-template 
location="component://manufacturing/webapp/manufacturing/jobshopmgt/associatedProductionRuns.ftl"/></html>
-                        </platform-specific>
+                        <container>
+                            <label 
style="head2">${uiLabelMap.ManufacturingMaterials}</label>
+                        </container>
+                        <include-form name="ListProductionRunDeclComponents" 
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
+                        <container>
+                            <label 
style="head2">${uiLabelMap.ManufacturingListOfProductionRunFixedAssets}</label>
+                        </container>
+                        <include-form name="ListProductionRunTaskFixedAssets" 
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>


Reply via email to