svn commit: r908567 - in /ofbiz/trunk/applications/manufacturing: config/ script/org/ofbiz/manufacturing/test/ webapp/manufacturing/WEB-INF/actions/reports/ webapp/manufacturing/reports/ widget/manufacturing/

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

svn commit: r908567 - in /ofbiz/trunk/applications/manufacturing: config/ script/org/ofbiz/manufacturing/test/ webapp/manufacturing/WEB-INF/actions/reports/ webapp/manufacturing/reports/ widget/manufacturing/

jacopoc
Author: jacopoc
Date: Wed Feb 10 16:21:42 2010
New Revision: 908567

URL: http://svn.apache.org/viewvc?rev=908567&view=rev
Log:
Misc fixes for the manufacturing report:
* small improvements to labels
* added a few comments to code
* fixed a few bugs in one of the old shipment plan reports; still a lot to fix here, but at least it renders without errors now


Modified:
    ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml
    ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/reports/ShipmentPlanStockReport.fo.ftl
    ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml

Modified: ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml?rev=908567&r1=908566&r2=908567&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml (original)
+++ ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml Wed Feb 10 16:21:42 2010
@@ -1487,6 +1487,10 @@
         <value xml:lang="th">จากวันที่</value>
         <value xml:lang="zh">开始日期</value>
     </property>
+    <property key="ManufacturingGenerateProductionRuns">
+        <value xml:lang="en">Generate Production Runs</value>
+        <value xml:lang="it">Genera ordini di produzione</value>
+    </property>
     <property key="ManufacturingImplosion">
         <value xml:lang="de">Zusammenfalten</value>
         <value xml:lang="en">Implosion</value>

Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml?rev=908567&r1=908566&r2=908567&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml (original)
+++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml Wed Feb 10 16:21:42 2010
@@ -20,7 +20,10 @@
 
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
+    <!-- Prerequisite data (available in demo data):
+           * PROD_MANUF and related manufacturing setup
+           * inventory for MAT_A_COST and MAT_B_COST
+    -->
     <simple-method method-name="testProductionRunCreation" short-description="Test the creation of a production run" login-required="false">
         <set field="productId" value="PROD_MANUF"/>
         <set field="facilityId" value="WebStoreWarehouse"/>

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy?rev=908567&r1=908566&r2=908567&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy Wed Feb 10 16:21:42 2010
@@ -27,7 +27,7 @@
 context.shipmentIdPar = shipment.shipmentId;
 context.estimatedReadyDatePar = shipment.estimatedReadyDate;
 context.estimatedShipDatePar = shipment.estimatedShipDate;
-
+records = [];
 if (shipment) {
     shipmentPlans = delegator.findByAnd("OrderShipment", [shipmentId : shipmentId]);
     shipmentPlans.each { shipmentPlan ->
@@ -50,11 +50,10 @@
 
         result = [:];
         result = dispatcher.runSync("getNotAssembledComponents",inputPar);
-        if (result)
+        if (result) {
             components = (List)result.get("notAssembledComponents");
-        componentsIt = components.iterator();
-        while (componentsIt) {
-            oneComponent = (org.ofbiz.manufacturing.bom.BOMNode)componentsIt.next();
+        }
+        components.each { oneComponent ->
             record = new HashMap(recordGroup);
             record.componentId = oneComponent.getProduct().productId;
             record.componentName = oneComponent.getProduct().internalName;
@@ -66,11 +65,11 @@
                     serviceInput = [productId : oneComponent.getProduct().productId , facilityId : facilityId];
                     serviceOutput = dispatcher.runSync("getInventoryAvailableByFacility",serviceInput);
                     qha = serviceOutput.quantityOnHandTotal ?: 0.0;
-                    inventoryStock.oneComponent.getProduct().productId = qha;
+                    inventoryStock.put(oneComponent.getProduct().productId, qha);
                 }
                 qty = inventoryStock[oneComponent.getProduct().productId];
                 qty = qty - oneComponent.getQuantity();
-                inventoryStock.oneComponent.getProduct().productId = qty;
+                inventoryStock.put(oneComponent.getProduct().productId, qty);
             }
             record.componentOnHand = qty;
             // Now we get the products qty already reserved by production runs

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/reports/ShipmentPlanStockReport.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/reports/ShipmentPlanStockReport.fo.ftl?rev=908567&r1=908566&r2=908567&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/reports/ShipmentPlanStockReport.fo.ftl (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/reports/ShipmentPlanStockReport.fo.ftl Wed Feb 10 16:21:42 2010
@@ -40,25 +40,11 @@
                     <fo:block font-size="14pt">${uiLabelMap.ManufacturingComponentsOfShipmentPlan}</fo:block>
                     <fo:block><fo:leader/></fo:block>
                     <fo:block space-after.optimum="10pt" font-size="10pt"/>
-                    <fo:table>
-                        <fo:table-column column-width="200pt"/>
-                        <fo:table-column column-width="200pt"/>
-                        <fo:table-column column-width="200pt"/>
-                        <fo:table-header>
-                            <fo:table-row font-weight="bold">
-                                <fo:table-cell padding="2pt">
-                                    <fo:block>${uiLabelMap.ManufacturingShipmentId}: ${shipmentIdPar}</fo:block>
-                                </fo:table-cell>
-                                <fo:table-cell padding="2pt">
-                                    <fo:block>${uiLabelMap.ManufacturingEstimatedCompletionDate}: <#if estimatedReadyDatePar?has_content>${estimatedReadyDatePar}</#if></fo:block>
-                                </fo:table-cell>
-                                <fo:table-cell padding="2pt">
-                                    <fo:block>${uiLabelMap.ManufacturingEstimatedShipDate}: <#if estimatedShipDatePar?has_content>${estimatedShipDatePar}</#if></fo:block>
-                                </fo:table-cell>
-                            </fo:table-row>
-                        </fo:table-header>
-                        <fo:table-body/>
-                    </fo:table>
+
+                    <fo:block>${uiLabelMap.ManufacturingShipmentId}: ${shipmentIdPar}</fo:block>
+                    <fo:block>${uiLabelMap.ManufacturingEstimatedCompletionDate}: <#if estimatedReadyDatePar?has_content>${estimatedReadyDatePar}</#if></fo:block>
+                    <fo:block>${uiLabelMap.ManufacturingEstimatedShipDate}: <#if estimatedShipDatePar?has_content>${estimatedShipDatePar}</#if></fo:block>
+
                     <fo:block space-after.optimum="10pt" font-size="10pt"/>
                     <fo:table>
                         <fo:table-column column-width="120pt"/>
@@ -81,21 +67,12 @@
                                     <fo:block>${uiLabelMap.ManufacturingNeedQuantity}</fo:block>
                                 </fo:table-cell>
                                 <fo:table-cell padding="2pt" background-color="#D4D0C8">
-                                    <fo:block>${uiLabelMap.ManufacturingOnHandQuantity}</fo:block>
+                                    <fo:block>${uiLabelMap.ProductQoh}</fo:block>
                                 </fo:table-cell>
                             </fo:table-row>
                         </fo:table-header>
-                        <fo:table-body/>
-                    </fo:table>
-                    <#list records as record>
-                        <fo:table>
-                            <fo:table-column column-width="120pt"/>
-                            <fo:table-column column-width="120pt"/>
-                            <fo:table-column column-width="120pt"/>
-                            <fo:table-column column-width="120pt"/>
-                            <fo:table-column column-width="120pt"/>
-                            <fo:table-header/>
-                            <fo:table-body>
+                        <fo:table-body>
+                            <#list records as record>
                                 <fo:table-row>
                                     <fo:table-cell padding="2pt">
                                         <fo:block>
@@ -146,9 +123,9 @@
                                         </fo:block>
                                     </fo:table-cell>
                                 </fo:table-row>
-                            </fo:table-body>
-                        </fo:table>
-                    </#list>
+                            </#list>
+                        </fo:table-body>
+                    </fo:table>
                 </fo:flow>
             </fo:page-sequence>
         <#else>

Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?rev=908567&r1=908566&r2=908567&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml Wed Feb 10 16:21:42 2010
@@ -577,7 +577,7 @@
                                         </link>
                                     </widgets>
                                     <fail-widgets>
-                                        <link text="${uiLabelMap.ManufacturingCreateProductionRun}" style="buttontext" target="createProductionRunsForShipment">
+                                        <link text="${uiLabelMap.ManufacturingGenerateProductionRuns}" style="buttontext" target="createProductionRunsForShipment">
                                             <parameter param-name="shipmentId" from-field="shipment.shipmentId"/>
                                         </link>
                                         <link text="${uiLabelMap.ManufacturingShipmentPlanStockReport}" style="buttontext" target="ShipmentPlanStockReport.pdf">