Author: jacopoc
Date: Thu Aug  3 23:57:55 2006
New Revision: 428650

URL: http://svn.apache.org/viewvc?rev=428650&view=rev
Log:
New production run pdf report developed by Mario Cappellato.

Added:
    
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl
   (with props)
Modified:
    
incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties
    
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh
    
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
    
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
    
incubator/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml

Modified: 
incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties?rev=428650&r1=428649&r2=428650&view=diff
==============================================================================
--- 
incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties
 (original)
+++ 
incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties
 Thu Aug  3 23:57:55 2006
@@ -217,6 +217,7 @@
 ManufacturingProduceQuantity=Stock in
 ManufacturingQuantityProduced=Produced
 ManufacturingQuantityRejected=Rejected
+ManufacturingQuantityRemaining=Remaining
 ManufacturingInventoryItemsProduced=Inventory Items
 ManufacturingEstimatedStartDate=Estimated Start Date
 ManufacturingActualStartDate=Start Date

Modified: 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh?rev=428650&r1=428649&r2=428650&view=diff
==============================================================================
--- 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh
 (original)
+++ 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh
 Thu Aug  3 23:57:55 2006
@@ -181,7 +181,7 @@
             GenericValue component;
             for (Iterator iter=productionRunComponents.iterator(); 
iter.hasNext();){
                 component = (GenericValue) iter.next();
-                String componentName = 
component.getRelatedOne("Product").getString("productName");
+                String componentName = 
component.getRelatedOne("Product").getString("internalName");
                 String workEffortName = 
component.getRelatedOne("WorkEffort").getString("workEffortName");
                 Map componentData = component.getAllFields();
                 componentData.put("internalName", componentName);

Modified: 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh?rev=428650&r1=428649&r2=428650&view=diff
==============================================================================
--- 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
 (original)
+++ 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
 Thu Aug  3 23:57:55 2006
@@ -223,7 +223,7 @@
             for (Iterator iter=productionRunComponents.iterator(); 
iter.hasNext();){
                 component = (GenericValue) iter.next();
                 GenericValue product = component.getRelatedOne("Product");
-                String componentName = product.getString("productName");
+                String componentName = product.getString("internalName");
                 GenericValue productionRunTask = 
component.getRelatedOne("WorkEffort");
                 String workEffortName = 
productionRunTask.getString("workEffortName");
                 Map componentData = component.getAllFields();

Modified: 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml?rev=428650&r1=428649&r2=428650&view=diff
==============================================================================
--- 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
 (original)
+++ 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
 Thu Aug  3 23:57:55 2006
@@ -477,6 +477,10 @@
         <response name="docs_printed" type="view" 
value="ProductionRunDeclaration"/>
         <response name="error" type="view" value="FindProductionRun"/>
     </request-map>
+    <request-map uri="PrintProductionRun">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="PrintProductionRun"/>
+    </request-map>
     <request-map uri="ManufacturingReports">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="ManufacturingReports"/>
@@ -718,6 +722,7 @@
     <view-map name="CreateProductionRun" 
page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#CreateProductionRun"
 type="screen"/>
     <view-map name="FindProductionRun" 
page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#FindProductionRun"
 type="screen"/>
     <view-map name="EditProductionRun" 
page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#EditProductionRun"
 type="screen"/>
+    <view-map name="PrintProductionRun" type="screenfop" 
page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunPdf"
 content-type="application/pdf" encoding="none"/>
     <view-map name="ProductionRunDeclaration" 
page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunDeclaration"
 type="screen"/>
     <view-map name="ProductionRunCosts" 
page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunCosts"
 type="screen"/>
     <view-map name="ProductionRunAssocs" 
page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunAssocs"
 type="screen"/>

Added: 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl?rev=428650&view=auto
==============================================================================
--- 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl
 (added)
+++ 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl
 Thu Aug  3 23:57:55 2006
@@ -0,0 +1,217 @@
+<#--
+
+Copyright 2001-2006 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations
+under the License.
+-->
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; 
xmlns:fox="http://xml.apache.org/fop/extensions";>
+    <fo:layout-master-set>
+        <fo:simple-page-master master-name="main" 
+             margin-top="1.0cm" margin-bottom="1in" margin-left="0.5cm" 
margin-right="0.5cm">
+          <fo:region-body margin-top="1.0cm" margin-bottom="1.0cm"/>  <#-- 
main body -->
+            <fo:region-after extent="1.0cm"/>  <#-- a footer -->
+            <fo:region-before extent="1.0cm"/>  <#-- a header -->
+        </fo:simple-page-master>
+    </fo:layout-master-set>
+
+<#if productionRunId?has_content>
+        <fo:page-sequence master-reference="main" language="en" 
hyphenate="true">
+        <fo:flow flow-name="xsl-region-body" font-family="Helvetica" 
font-size="8pt">
+            
<fo:block>${uiLabelMap.ManufacturingProductionRunId}:${productionRunData.workEffortId?if_exists}</fo:block>
+            <fo:block space-after.optimum="0.3cm"></fo:block>
+            
<fo:block>${uiLabelMap.ProductProductId}:${productionRunData.productId?if_exists}/${productionRunData.productName?if_exists}</fo:block>
+            <fo:block space-after.optimum="1.0cm"></fo:block>
+<#--<!--
+            <fo:table>
+                <fo:table-column column-width="4.0cm"/>
+                <fo:table-column column-width="5.5cm"/>
+                <fo:table-column column-width="4.0cm"/>
+                <fo:table-body>
+                    <fo:table-row>
+                        <fo:table-cell padding="2pt">
+                        <fo:block 
font-size="10pt">${uiLabelMap.ManufacturingProductionRunId}:</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                        <fo:block 
font-size="12pt">${productionRunData.workEffortId?if_exists}</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                        </fo:table-cell>
+                    </fo:table-row>
+                    <fo:table-row>
+                        <fo:table-cell padding="2pt">
+                        <fo:block 
font-size="10pt">${uiLabelMap.ProductProductId}:</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                        <fo:block 
font-size="12pt">${productionRunData.productId?if_exists}</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                        <fo:block 
font-size="12pt">${productionRunData.productName?if_exists}</fo:block>
+                        </fo:table-cell>
+                        <fo:block space-after.optimum="0.5cm" 
font-size="10pt"></fo:block>
+                    </fo:table-row>
+               </fo:table-body>
+            </fo:table>
+-->
+            <#assign dimColor = "#D4D0C8">
+            <fo:table>
+                <fo:table-column column-width="4.0cm"/>
+                <fo:table-column column-width="5.5cm"/>
+                <fo:table-column column-width="4.0cm"/>
+                <fo:table-column column-width="5.0cm"/>
+                <fo:table-body>
+                    <fo:table-row>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${uiLabelMap.FormFieldTitle_estimatedStartDate}:</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            <fo:block><#if 
productionRunData.estimatedStartDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.estimatedStartDate,
 "dd/MM/yyyy")}</#if></fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${uiLabelMap.FormFieldTitle_actualStartDate}:</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            <fo:block><#if 
productionRunData.actualStartDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.actualStartDate,
 "dd/MM/yyyy")}</#if></fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                    <fo:table-row>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${uiLabelMap.FormFieldTitle_estimatedCompletionDate}:</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            <fo:block><#if 
productionRunData.estimatedCompletionDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.estimatedCompletionDate,
 "dd/MM/yyyy")}</#if></fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${uiLabelMap.FormFieldTitle_actualCompletionDate}:</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            <fo:block><#if 
productionRunData.actualCompletionDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.actualCompletionDate,
 "dd/MM/yyyy")}</#if></fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                    <fo:table-row>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${uiLabelMap.ManufacturingQuantityToProduce}:</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${productionRunData.quantityToProduce?if_exists}</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${uiLabelMap.ManufacturingQuantityProduced}:</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${productionRunData.quantityProduced?if_exists}</fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                    <fo:table-row>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${uiLabelMap.ManufacturingQuantityRemaining}:</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${productionRunData.quantityRemaining}</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            
<fo:block>${uiLabelMap.ManufacturingQuantityRejected}:</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="2pt">
+                            <fo:block>${quantityRejected?if_exists}</fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                </fo:table-body>
+            </fo:table>
+            <#-- Components   -->
+            <fo:block space-after.optimum="0.3cm"></fo:block>
+            <fo:table>
+              <fo:table-column column-width="3.4cm"/>
+              <fo:table-column column-width="6.0cm"/>
+              <fo:table-column column-width="2.5cm"/>
+              <fo:table-column column-width="2.5cm"/>
+              <fo:table-column column-width="3.5cm"/>
+                <fo:table-header>
+                    <fo:table-row background-color="${dimColor}">
+                        
<fo:table-cell><fo:block>${uiLabelMap.ProductProductId}</fo:block></fo:table-cell>
+                        
<fo:table-cell><fo:block>${uiLabelMap.CommonDescription}</fo:block></fo:table-cell>
+                        
<fo:table-cell><fo:block>${uiLabelMap.ManufacturingQuantity}</fo:block></fo:table-cell>
+                        
<fo:table-cell><fo:block>${uiLabelMap.ManufacturingIssuedQuantity}</fo:block></fo:table-cell>
+                        
<fo:table-cell><fo:block>${uiLabelMap.ManufacturingQuantityRemaining}</fo:block></fo:table-cell>
+                    </fo:table-row>
+                </fo:table-header>
+                <fo:table-body>
+                    <#assign dimColor = "#D4D0C8">
+                    <#assign rowColor = "white">
+                    <#list productionRunComponentsData as 
productionRunComponentData>
+              
+                    <#assign resQuantityComp = 
productionRunComponentData.estimatedQuantity - 
productionRunComponentData.issuedQuantity>
+ 
+                       <fo:table-row>
+                            <fo:table-cell padding="2pt">
+                                
<fo:block>${productionRunComponentData.productId?if_exists}</fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt">
+                                
<fo:block>${productionRunComponentData.internalName?if_exists}</fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt">
+                                
<fo:block>${productionRunComponentData.estimatedQuantity?if_exists}</fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt">
+                                
<fo:block>${productionRunComponentData.issuedQuantity?if_exists}</fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt">
+                                
<fo:block>${resQuantityComp?if_exists}</fo:block>
+                             </fo:table-cell>
+                        </fo:table-row>
+                    </#list>          
+                </fo:table-body>
+            </fo:table>
+            <#-- Tasks   -->
+            <fo:block space-after.optimum="0.3cm"></fo:block>
+            <fo:table>
+              <fo:table-column column-width="3.5cm"/>
+              <fo:table-column column-width="3.5cm"/>
+              <fo:table-column column-width="5.0cm"/>
+              <fo:table-column column-width="3.0cm"/>
+              <fo:table-column column-width="3.0cm"/>
+                <fo:table-header>
+                    <fo:table-row background-color="${dimColor}">
+                        
<fo:table-cell><fo:block>${uiLabelMap.FormFieldTitle_fixedAssetId}</fo:block></fo:table-cell>
+                        
<fo:table-cell><fo:block>${uiLabelMap.ManufacturingRoutingTask}</fo:block></fo:table-cell>
+                        
<fo:table-cell><fo:block>${uiLabelMap.CommonDescription}</fo:block></fo:table-cell>
+                        
<fo:table-cell><fo:block>${uiLabelMap.ManufacturingTaskEstimatedSetupMillis}</fo:block></fo:table-cell>
+                        
<fo:table-cell><fo:block>${uiLabelMap.ManufacturingTaskEstimatedMilliSeconds}</fo:block></fo:table-cell>
+                    </fo:table-row>
+                </fo:table-header>
+                <fo:table-body>
+                    <#assign rowColor = "white">
+                    <#list productionRunRoutingTasks as 
productionRunRoutingTask>
+                        <fo:table-row>
+                            <fo:table-cell padding="2pt">
+                                
<fo:block>${productionRunRoutingTask.fixedAssetId?if_exists}</fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt">
+                                
<fo:block>${productionRunRoutingTask.workEffortName?if_exists}</fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt">
+                                
<fo:block>${productionRunRoutingTask.description?if_exists}</fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt">
+                                
<fo:block>${productionRunRoutingTask.estimatedSetupMillis?if_exists}</fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt">
+                                
<fo:block>${productionRunRoutingTask.estimatedMilliSeconds?if_exists}</fo:block>
+                            </fo:table-cell>
+                        </fo:table-row>
+                    </#list>          
+                </fo:table-body>
+            </fo:table>
+        </fo:flow>
+        </fo:page-sequence>
+</#if>
+</fo:root>

Propchange: 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: 
incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: 
incubator/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?rev=428650&r1=428649&r2=428650&view=diff
==============================================================================
--- 
incubator/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
 (original)
+++ 
incubator/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
 Thu Aug  3 23:57:55 2006
@@ -107,11 +107,31 @@
             <widgets>
                 <decorator-screen name="CommonJobshopDecorator">
                     <decorator-section name="body">
+                        <container>
+                            <link 
target="PrintProductionRun?productionRunId=${productionRunId}" 
text="${uiLabelMap.ManufacturingPrintProductionRun}" style="buttontext"/>
+                        </container>
                         <platform-specific>
                             <html><html-template 
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl"/></html>
                         </platform-specific>
                     </decorator-section>
                 </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="ProductionRunPdf">
+        <section>
+            <actions>
+                <property-map resource="ManufacturingReportsUiLabels" 
map-name="uiLabelMap" global="true"/>
+                <property-map resource="ManufacturingUiLabels" 
map-name="uiLabelMap" global="true"/>
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap" 
global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" 
global="true"/>
+                <set field="titleProperty" value="ProductionRunReport"/>
+                <script 
location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh"/>
+            </actions>
+            <widgets>
+                <platform-specific>
+                    <html><html-template 
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl"/></html>
+                </platform-specific>
             </widgets>
         </section>
     </screen>


Reply via email to