svn commit: r1674491 - in /ofbiz/trunk/applications/manufacturing: webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy webapp/manufacturing/reports/ShipmentWorkEffortTasks.fo.ftl widget/manufacturing/ReportScreens.xml

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

svn commit: r1674491 - in /ofbiz/trunk/applications/manufacturing: webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy webapp/manufacturing/reports/ShipmentWorkEffortTasks.fo.ftl widget/manufacturing/ReportScreens.xml

Deepak Dixit-5
Author: deepak
Date: Sat Apr 18 12:34:33 2015
New Revision: 1674491

URL: http://svn.apache.org/r1674491
Log:
Applied patch from jira issue OFBIZ-6188 - Task Report error for Manufacturing Shipment Plan
Thanks Christian Carlow for reporting the issue and thanks   Amardeep Jhajj for verifying it the patch.

Modified:
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/reports/ShipmentWorkEffortTasks.fo.ftl
    ofbiz/trunk/applications/manufacturing/widget/manufacturing/ReportScreens.xml

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy?rev=1674491&r1=1674490&r2=1674491&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy Sat Apr 18 12:34:33 2015
@@ -25,7 +25,7 @@ shipment = from("Shipment").where("shipm
 context.shipmentIdPar = shipment.shipmentId;
 context.date = new Date();
 Double fixedAssetTime = new Double(0);
-
+records = [];
 if (shipment) {
     shipmentPlans = from("OrderShipment").where("shipmentId", shipmentId).queryList();
     shipmentPlans.each { shipmentPlan ->
@@ -51,7 +51,9 @@ if (shipment) {
                     record.taskEstimatedTime = task.getDouble("estimatedMilliSeconds");
                     record.taskEstimatedSetup = task.getDouble("estimatedSetupMillis");
                     records.add(record);
-                    fixedAssetTime = fixedAssetTime + task.getDouble("estimatedMilliSeconds");
+                    if(task.getDouble("estimatedMilliSeconds") != null){
+                        fixedAssetTime = fixedAssetTime + task.getDouble("estimatedMilliSeconds");
+                    }
                 }
             }
         }

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/reports/ShipmentWorkEffortTasks.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/reports/ShipmentWorkEffortTasks.fo.ftl?rev=1674491&r1=1674490&r2=1674491&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/reports/ShipmentWorkEffortTasks.fo.ftl (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/reports/ShipmentWorkEffortTasks.fo.ftl Sat Apr 18 12:34:33 2015
@@ -65,60 +65,48 @@ under the License.
                                 <fo:table-cell padding="2pt">
                                     <fo:block>${uiLabelMap.ManufacturingOperationCodeAndDescription}</fo:block>
                                 </fo:table-cell>
-                                <fo:table-cell padding="2pt">
+                                <fo:table-cell padding="2pt" text-align="right">
                                     <fo:block>${uiLabelMap.ManufacturingTaskRunTime}</fo:block>
                                 </fo:table-cell>
-                                <fo:table-cell padding="2pt">
+                                <fo:table-cell padding="2pt" text-align="right">
                                     <fo:block>${uiLabelMap.ManufacturingTaskSetupTime}</fo:block>
                                 </fo:table-cell>
                             </fo:table-row>
                         </fo:table-header>
-                        <fo:table-body/>
-                    </fo:table>
-                    <#list records as record>
-                        <fo:table font-size="8pt">
-                            <fo:table-column column-width="45pt"/>
-                               <fo:table-column column-width="45pt"/>
-                            <fo:table-column column-width="60pt"/>
-                            <fo:table-column column-width="90pt"/>
-                            <fo:table-column column-width="90pt"/>
-                            <fo:table-column column-width="60pt"/>
-                            <fo:table-column column-width="60pt"/>
-                            <fo:table-header/>
-                            <fo:table-body>
+                        <fo:table-body>
+                            <#list records as record>
                                 <fo:table-row>
                                     <fo:table-cell padding="2pt">
-                                        <fo:block>${record.get("workEffortId")}</fo:block>
+                                        <fo:block>${record.get("workEffortId")?if_exists}</fo:block>
                                     </fo:table-cell>
                                     <fo:table-cell padding="2pt">
-                                        <fo:block><#if estimatedReadyDatePar?has_content>${record.get("fixedAssetId")}</#if></fo:block>
+                                        <fo:block><#if estimatedReadyDatePar?has_content>${record.get("fixedAssetId")?if_exists}</#if></fo:block>
                                     </fo:table-cell>
                                     <fo:table-cell padding="2pt">
-                                        <fo:block>${record.get("productId")}</fo:block>
+                                        <fo:block>${record.get("productId")?if_exists}</fo:block>
                                     </fo:table-cell>
                                     <fo:table-cell padding="2pt">
-                                        <fo:block>${record.get("productName")}</fo:block>
+                                        <fo:block>${record.get("productName")?if_exists}</fo:block>
                                     </fo:table-cell>
                                     <fo:table-cell padding="2pt">
-                                        <fo:block>${record.get("taskName")} ${record.get("taskDescription")}</fo:block>
+                                        <fo:block>${record.get("taskName")} ${record.get("taskDescription")?if_exists}</fo:block>
                                     </fo:table-cell>
                                     <fo:table-cell padding="2pt" text-align="right">
-                                        <fo:block>${record.get("taskEstimatedTime")}</fo:block>
+                                        <fo:block>${record.get("taskEstimatedTime")?if_exists}</fo:block>
                                     </fo:table-cell>
                                     <fo:table-cell padding="2pt" text-align="right">
-                                        <fo:block>${record.get("taskEstimatedSetup")}</fo:block>
+                                        <fo:block>${record.get("taskEstimatedSetup")?if_exists}</fo:block>
                                     </fo:table-cell>
                                 </fo:table-row>
-                            </fo:table-body>
-                        </fo:table>
-                       </#list>
-                       <fo:table font-size="8pt">
+                            </#list>
+                        </fo:table-body>
+                    </fo:table>
+                    <fo:table font-size="8pt">
                         <fo:table-column column-width="450pt"/>
-                        <fo:table-header/>
                         <fo:table-body>
                             <fo:table-row>
                                 <fo:table-cell padding="2pt" text-align="right">
-                                    <fo:block>${fixedAssetTime}</fo:block>
+                                    <fo:block>${fixedAssetTime?if_exists}</fo:block>
                                 </fo:table-cell>
                             </fo:table-row>
                         </fo:table-body>

Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/ReportScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/ReportScreens.xml?rev=1674491&r1=1674490&r2=1674491&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/ReportScreens.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/ReportScreens.xml Sat Apr 18 12:34:33 2015
@@ -315,6 +315,7 @@ under the License.
                 <set field="shipmentId" from-field="parameters.shipmentId"/>
                 <property-map resource="ManufacturingReportsUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
 
                 <script location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy"/>