svn commit: r516580 - in /ofbiz/trunk: applications/accounting/entitydef/ specialpurpose/assetmaint/config/ specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/ specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/ specialpurpose/asse...

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

svn commit: r516580 - in /ofbiz/trunk: applications/accounting/entitydef/ specialpurpose/assetmaint/config/ specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/ specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/ specialpurpose/asse...

jonesde
Author: jonesde
Date: Fri Mar  9 14:05:46 2007
New Revision: 516580

URL: http://svn.apache.org/viewvc?view=rev&rev=516580
Log:
Applied patch from Anil Patel for printing a fixed asset maint; Jira #OFBIZ-748

Added:
    ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/
    ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/printFixedAssetMaint.bsh   (with props)
    ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/assetmaint/
    ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/assetmaint/printFixedAssetMaint.fo.ftl   (with props)
Modified:
    ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
    ofbiz/trunk/specialpurpose/assetmaint/config/AssetMaintUiLabels.properties
    ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/assetmaint/widget/AssetmaintScreens.xml
    ofbiz/trunk/specialpurpose/assetmaint/widget/forms/FixedAssetForms.xml

Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml?view=diff&rev=516580&r1=516579&r2=516580
==============================================================================
--- ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml Fri Mar  9 14:05:46 2007
@@ -479,6 +479,10 @@
         <relation type="one" fk-name="FXDASTMNT_PURORD" title="Purchase" rel-entity-name="OrderHeader">
             <key-map field-name="purchaseOrderId" rel-field-name="orderId"/>
         </relation>
+        <relation type="one" fk-name="FXDASTMNT_SI" rel-entity-name="StatusItem">
+            <key-map field-name="statusId"/>
+        </relation>
+        
     </entity>
     <entity entity-name="FixedAssetMaintMeter"
         package-name="org.ofbiz.accounting.fixedasset"

Modified: ofbiz/trunk/specialpurpose/assetmaint/config/AssetMaintUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/config/AssetMaintUiLabels.properties?view=diff&rev=516580&r1=516579&r2=516580
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/config/AssetMaintUiLabels.properties (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/config/AssetMaintUiLabels.properties Fri Mar  9 14:05:46 2007
@@ -75,6 +75,7 @@
 WorkEffortActualStartDate=Start Date
 WorkEffortActualCompletionDate=Completion Date
 WorkEffortAllTasks=Tasks
+WorkEffortSummary=Schedule Summary
 WorkEffortWorkEffortAssocTypeId=Association Type
 WorkEffortWorkEffortPurposeTypeId=Purpose
 

Added: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/printFixedAssetMaint.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/printFixedAssetMaint.bsh?view=auto&rev=516580
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/printFixedAssetMaint.bsh (added)
+++ ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/printFixedAssetMaint.bsh Fri Mar  9 14:05:46 2007
@@ -0,0 +1,73 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+**/
+
+import org.ofbiz.base.util.UtilMisc;
+
+
+facility = fixedAsset.getRelatedOne("LocatedAtFacility");
+context.put("locatedAtFacility", facility);
+
+List fixedAssetIdents = delegator.findByAnd("FixedAssetIdent", UtilMisc.toMap("fixedAssetId",fixedAssetId));
+fixedAssetIdentValue = "";
+if (fixedAssetIdents !=null) {
+ iter = fixedAssetIdents.iterator();
+ while (iter.hasNext()) {
+ ident = iter.next();
+ fixedAssetIdentValue = fixedAssetIdentValue + " " + ident.get("idValue");
+ }
+}
+context.put("fixedAssetIdentValue",fixedAssetIdentValue);
+
+status = fixedAssetMaint.getRelatedOne("StatusItem");
+if (status !=null) {
+    context.put("statusItemDesc",status.getString("description"));
+}
+//context.put("fixedAssetMaint",fixedAssetMaint);
+
+intervalUom = fixedAssetMaint.getRelatedOne("IntervalUom");
+if (intervalUom!=null) {
+    context.put("intervalUomDesc",intervalUom.getString("description"));
+}
+
+instanceOfProductId = fixedAsset.get("instanceOfProductId");
+productMaintSeqId = fixedAssetMaint.get("productMaintSeqId");
+if (productMaintSeqId != null && !productMaintSeqId.equals("")) {
+    productMaint = delegator.findByPrimaryKey("ProductMaint", UtilMisc.toMap("productId", instanceOfProductId,"productMaintSeqId",productMaintSeqId));
+    context.put("productMaintName",productMaint.get("maintName"));
+}
+
+productMaintTypeId = fixedAssetMaint.get("productMaintTypeId");
+if (productMaintTypeId!= null && !productMaintTypeId.equals("")) {
+    productMaintType = delegator.findByPrimaryKey("ProductMaintType", UtilMisc.toMap("productMaintTypeId", productMaintTypeId));
+    if (productMaintType != null) {
+        productMaintTypeDesc = productMaintType.get("description");
+        context.put("productMaintTypeDesc",productMaintTypeDesc);
+    }
+}
+
+intervalMeterTypeId = fixedAssetMaint.get("intervalMeterTypeId");
+productMeterTypeDesc = "";
+if (intervalMeterTypeId!= null && !intervalMeterTypeId.equals("")) {
+    productMeterType = delegator.findByPrimaryKey("ProductMeterType", UtilMisc.toMap("productMeterTypeId", intervalMeterTypeId));
+    productMeterTypeDesc  = productMeterType.get("description");
+}
+context.put("productMeterTypeDesc",productMeterTypeDesc);
+
+scheduleWorkEffort = fixedAssetMaint.getRelatedOne("ScheduleWorkEffort");
+context.put("scheduleWorkEffort",scheduleWorkEffort);

Propchange: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/printFixedAssetMaint.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/printFixedAssetMaint.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/printFixedAssetMaint.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/controller.xml?view=diff&rev=516580&r1=516579&r2=516580
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/controller.xml Fri Mar  9 14:05:46 2007
@@ -27,6 +27,8 @@
     <description>Asset Maintenance Component Site Configuration File</description>
     <errorpage>/error/error.jsp</errorpage>
 
+    <handler name="screenfop" type="view" class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/>
+
     <request-map uri="main">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="main"/>
@@ -45,6 +47,11 @@
         <response name="success" type="view" value="ListFixedAssetMaints"/>
         <response name="error" type="view" value="ListFixedAssetMaints"/>
     </request-map>
+    <request-map uri="printFixedAssetMaint.pdf">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="PrintFixedAssetMaint"/>
+        <response name="error" type="view" value="EditFixedAssetMaint"/>
+    </request-map>
     <request-map uri="EditFixedAssetMaint">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditFixedAssetMaint"/>
@@ -192,6 +199,7 @@
     <view-map name="EditWorkEffortTimeEntries" type="screen" page="component://assetmaint/widget/AssetmaintScreens.xml#EditWorkEffortTimeEntries"/>
     <view-map name="EditWorkEffortNotes" type="screen" page="component://assetmaint/widget/AssetmaintScreens.xml#EditWorkEffortNotes"/>
     <view-map name="EditItemIssuances" type="screen" page="component://assetmaint/widget/AssetmaintScreens.xml#EditItemIssuances"/>
+    <view-map name="PrintFixedAssetMaint" type="screenfop" page="component://assetmaint/widget/AssetmaintScreens.xml#PrintFixedAssetMaint"/>
 
 
     <!-- Lookup request mappings -->

Added: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/assetmaint/printFixedAssetMaint.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/assetmaint/printFixedAssetMaint.fo.ftl?view=auto&rev=516580
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/assetmaint/printFixedAssetMaint.fo.ftl (added)
+++ ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/assetmaint/printFixedAssetMaint.fo.ftl Fri Mar  9 14:05:46 2007
@@ -0,0 +1,226 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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">
+  <fo:layout-master-set>
+    <fo:simple-page-master master-name="simple-portrait"
+      page-width="8.5in" page-height="11in"
+      margin-top="0.3in" margin-bottom="0.3in"
+      margin-left="0.4in" margin-right="0.3in">
+    <fo:region-body margin-top="1in" margin-bottom="0.5in"/>
+    <fo:region-before extent="1in"/>
+    <fo:region-after extent="0.5in" />
+    </fo:simple-page-master>
+  </fo:layout-master-set>
+
+  <fo:page-sequence master-reference="simple-portrait" font-size="12pt">
+  <fo:flow flow-name="xsl-region-body">
+  
+  <#-- Print FixedAsset Information -->
+  <fo:table table-layout="fixed" border-style="solid" border-width="1pt">
+    <fo:table-column column-width="1.5in"/>
+    <fo:table-column column-width="6.5in"/>
+    <fo:table-body>
+      <fo:table-row>
+        <fo:table-cell><fo:block number-columns-spanned="2"  font-weight="bold">${uiLabelMap.AccountingFixedAsset}</fo:block></fo:table-cell>
+      </fo:table-row>
+      <#if fixedAsset?has_content>
+        <fo:table-row>
+          <fo:table-cell><fo:block>${uiLabelMap.AccountingFixedAssetId}</fo:block></fo:table-cell>
+          <fo:table-cell><fo:block>${fixedAssetId}</fo:block></fo:table-cell>
+        </fo:table-row>
+        <#if fixedAsset.createdStamp?has_content>
+        <fo:table-row>
+           <fo:table-cell><fo:block>${uiLabelMap.CommonDate}</fo:block></fo:table-cell>
+           <fo:table-cell><fo:block>${fixedAsset.createdStamp?string.short}</fo:block></fo:table-cell>
+        </fo:table-row>
+        </#if>
+        <#if fixedAsset.fixedAssetName?has_content>
+        <fo:table-row>
+           <fo:table-cell><fo:block>${uiLabelMap.AccountingFixedAssetName}</fo:block></fo:table-cell>
+           <fo:table-cell><fo:block>${fixedAsset.fixedAssetName?if_exists}</fo:block></fo:table-cell>
+        </fo:table-row>
+        </#if>
+        <#if fixedAsset.serialNumber?has_content>
+        <fo:table-row>
+            <fo:table-cell><fo:block>${uiLabelMap.FormFieldTitle_serialNumber}</fo:block></fo:table-cell>
+            <fo:table-cell><fo:block font-weight="bold">${fixedAsset.serialNumber?if_exists}</fo:block></fo:table-cell>
+        </fo:table-row>
+        </#if>
+        <#if fixedAsset.locatedAtFacilityId?has_content>
+        <fo:table-row>  
+            <fo:table-cell><fo:block>${uiLabelMap.FormFieldTitle_locatedAtFacilityId}</fo:block></fo:table-cell>
+            <fo:table-cell><fo:block>${maintenance.facilityName?if_exists}</fo:block></fo:table-cell>
+        </fo:table-row>
+        </#if>
+        <#if fixedAssetIdentValue?has_content>
+        <fo:table-row>
+            <fo:table-cell><fo:block>${uiLabelMap.AccountingFixedAssetIdents}</fo:block></fo:table-cell>
+            <fo:table-cell><fo:block>${fixedAssetIdentValue?if_exists}</fo:block></fo:table-cell>
+        </fo:table-row>
+        </#if>
+      </#if>
+    </fo:table-body>
+  </fo:table>
+  <#-- End Print FixedAsset Information -->
+  
+  <#-- Start Print FixedAsset Maintenance Information -->
+  <fo:table table-layout="fixed"  border-style="solid" border-width="1pt">
+    <fo:table-column column-width="1.5in"/>
+    <fo:table-column column-width="6.5in"/>
+    <fo:table-body>
+      <fo:table-row>
+        <fo:table-cell><fo:block number-columns-spanned="2" font-weight="bold">${uiLabelMap.AccountingFixedAssetMaint}</fo:block></fo:table-cell>
+      </fo:table-row>
+      <#if fixedAssetMaint?has_content>
+        <fo:table-row>
+          <fo:table-cell><fo:block>${uiLabelMap.AccountingFixedAssetMaintSeqId}</fo:block></fo:table-cell>
+          <fo:table-cell><fo:block>${fixedAssetMaint.maintHistSeqId}</fo:block></fo:table-cell>
+        </fo:table-row>
+        <fo:table-row>
+          <fo:table-cell><fo:block>${uiLabelMap.CommonStatus}</fo:block></fo:table-cell>
+          <fo:table-cell><fo:block>${statusItemDesc}</fo:block></fo:table-cell>
+        </fo:table-row>
+        <#if productMaintName?has_content>
+        <fo:table-row>
+          <fo:table-cell><fo:block>${uiLabelMap.CommonName}</fo:block></fo:table-cell>
+          <fo:table-cell><fo:block>${productMaintName?if_exists}</fo:block></fo:table-cell>
+        </fo:table-row>
+        </#if>
+        <#if productMaintTypeDesc?has_content>
+        <fo:table-row>
+          <fo:table-cell><fo:block>${uiLabelMap.AccountingFixedAssetMaintType}</fo:block></fo:table-cell>
+          <fo:table-cell><fo:block font-weight="bold">${productMaintTypeDesc?if_exists}</fo:block></fo:table-cell>
+        </fo:table-row>
+        </#if>
+        <fo:table-row>
+          <fo:table-cell><fo:block>${uiLabelMap.AccountingFixedAssetMaintIntervalQuantity}</fo:block></fo:table-cell>
+          <fo:table-cell><fo:block font-weight="bold">${fixedAssetMaint.intervalQuantity?if_exists} ${intervalUomDesc?if_exists}</fo:block></fo:table-cell>
+        </fo:table-row>
+        <#if productMeterTypeDesc?has_content>
+        <fo:table-row>
+          <fo:table-cell><fo:block>Meter type</fo:block></fo:table-cell>
+          <fo:table-cell><fo:block font-weight="bold">${productMeterTypeDesc?if_exists}</fo:block></fo:table-cell>
+        </fo:table-row>
+        </#if>
+      </#if>
+    </fo:table-body>
+  </fo:table>
+<#-- End Print FixedAsset Maintenance Information -->
+  
+<#-- Start Print Maintenance Schedule Information -->
+  <fo:table table-layout="fixed"  border-style="solid" border-width="1pt">
+    <fo:table-column column-width="2in"/>
+    <fo:table-column column-width="2in"/>
+    <fo:table-column column-width="2in"/>
+    <fo:table-column column-width="2in"/>
+    <fo:table-body>
+      <fo:table-row>
+        <fo:table-cell number-columns-spanned="4" ><fo:block number-columns-spanned="4" font-weight="bold">${uiLabelMap.WorkEffortSummary}</fo:block></fo:table-cell>
+      </fo:table-row>
+      <#if scheduleWorkEffort?has_content>
+        <fo:table-row>
+          <fo:table-cell><fo:block>${uiLabelMap.WorkEffortActualStartDate}</fo:block></fo:table-cell>
+            <#if scheduleWorkEffort.actualStartDate?has_content>
+              <#assign actualStartDate = scheduleWorkEffort.get("actualStartDate")>
+                <fo:table-cell><fo:block>${actualStartDate?string.short}</fo:block></fo:table-cell>
+            </#if>
+          <fo:table-cell><fo:block>${uiLabelMap.WorkEffortActualCompletionDate}</fo:block></fo:table-cell>
+            <#if scheduleWorkEffort.actualCompletionDate?has_content>
+              <#assign actualCompletionDate = scheduleWorkEffort.get("actualCompletionDate")>
+              <fo:table-cell><fo:block>${actualCompletionDate?string.short}</fo:block></fo:table-cell>
+            </#if>
+        </fo:table-row>
+        <#assign workEffortPurposeType = scheduleWorkEffort.getRelatedOne("WorkEffortPurposeType")?if_exists>
+        <#if workEffortPurposeType?has_content>
+        <fo:table-row>
+          <fo:table-cell><fo:block>${uiLabelMap.WorkEffortWorkEffortPurposeTypeId}</fo:block></fo:table-cell>
+          <fo:table-cell number-columns-spanned="3"><fo:block>${workEffortPurposeType.workEffortPurposeTypeId}--${workEffortPurposeType.description}</fo:block></fo:table-cell>
+        </fo:table-row>
+        </#if>
+        <fo:table-row>
+          <fo:table-cell><fo:block>${uiLabelMap.CommonName}</fo:block></fo:table-cell>
+          <fo:table-cell number-columns-spanned="3"><fo:block font-weight="bold">${scheduleWorkEffort.workEffortName?if_exists}</fo:block></fo:table-cell>
+        </fo:table-row>
+        <fo:table-row>
+          <fo:table-cell><fo:block>${uiLabelMap.CommonDescription}</fo:block></fo:table-cell>
+          <fo:table-cell number-columns-spanned="3"><fo:block font-weight="bold">${scheduleWorkEffort.description?if_exists}</fo:block></fo:table-cell>
+        </fo:table-row>
+      </#if>
+    </fo:table-body>
+  </fo:table>
+<#-- End Print Maintenance Schedule Information -->
+
+  <fo:table table-layout="fixed"  border-spacing="3pt" border-style="solid" border-width="1pt">
+    <fo:table-column column-width="6.5in"/>
+    <fo:table-column column-width="1.5in"/>
+    <fo:table-header>
+      <fo:table-row>
+        <fo:table-cell><fo:block font-weight="bold">${uiLabelMap.FixedAssetMaintItemIssuance}</fo:block></fo:table-cell>
+        <fo:table-cell text-align="center"><fo:block font-weight="bold">${uiLabelMap.OrderQuantity}</fo:block></fo:table-cell>
+      </fo:table-row>        
+    </fo:table-header>
+    <fo:table-body>
+      <#if itemIssuanceList?has_content>
+        <#list itemIssuanceList as itemIssuance>
+          <#assign productId = itemIssuance.productId?if_exists>
+          <#assign quantity = itemIssuance.quantity?default(0)>
+            <fo:table-row>
+              <fo:table-cell>
+                <fo:block>
+                  <#if productId?exists>
+                    ${itemIssuance.productId?default("N/A")} - ${itemIssuance.internalName?if_exists} - ${itemIssuance.description?if_exists} - ${itemIssuance.comments?if_exists}
+                  </#if>
+                </fo:block>
+              </fo:table-cell>
+              <fo:table-cell text-align="center"><fo:block>${quantity}</fo:block></fo:table-cell>            
+            </fo:table-row>
+        </#list>
+      </#if>
+    </fo:table-body>
+  </fo:table>
+
+  <fo:table table-layout="fixed"   border-spacing="3pt" border-style="solid" border-width="1pt">
+    <fo:table-column column-width="8in"/>
+    <fo:table-header>
+      <fo:table-row>
+        <fo:table-cell><fo:block font-weight="bold">${uiLabelMap.WorkEffortNotes}</fo:block></fo:table-cell>
+      </fo:table-row>        
+    </fo:table-header>
+    <fo:table-body>
+      <#if notes?has_content>
+        <#list notes as note>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>Auther : ${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator, note.noteParty, true)}</fo:block>
+              <fo:block>Date : ${note.noteDateTime?string.short}</fo:block>
+              <#escape x as x?html>
+                <fo:block>${note.noteInfo?if_exists}</fo:block>
+              </#escape>
+            </fo:table-cell>
+          </fo:table-row>
+        </#list>
+      </#if>
+    </fo:table-body>
+  </fo:table>
+
+  </fo:flow>
+  </fo:page-sequence>
+</fo:root>
+

Propchange: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/assetmaint/printFixedAssetMaint.fo.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/assetmaint/printFixedAssetMaint.fo.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/assetmaint/printFixedAssetMaint.fo.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/AssetmaintScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/AssetmaintScreens.xml?view=diff&rev=516580&r1=516579&r2=516580
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/AssetmaintScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/AssetmaintScreens.xml Fri Mar  9 14:05:46 2007
@@ -69,7 +69,7 @@
                 <decorator-screen name="CommonFixedAssetMaintDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <container><link target="EditFixedAssetMaint?fixedAssetId=${fixedAssetId}" text="${uiLabelMap.AccountingNewFixedAssetMaint}" style="buttontext"/></container>
-                        <container><link target="printFixedAssetMaints.pdf?fixedAssetId=${fixedAssetId}&amp;maintHistSeqId=${maintHistSeqId}" text="${uiLabelMap.CommonPrint}" style="buttontext"/></container>
+                        <container><link target="printFixedAssetMaint.pdf?fixedAssetId=${fixedAssetId}&amp;maintHistSeqId=${maintHistSeqId}" text="${uiLabelMap.CommonPrint}" style="buttontext"/></container>
                         <container style="boxoutside">
                             <container style="screenlet-header">
                                 <label style="boxhead">${uiLabelMap.AccountingNewFixedAssetMaint}</label>
@@ -200,6 +200,7 @@
                 <set field="fixedAssetId" from-field="parameters.fixedAssetId"/>
                 <set field="maintHistSeqId" from-field="parameters.maintHistSeqId"/>
                 <entity-one entity-name="FixedAsset" value-name="fixedAsset"/>
+                <entity-one entity-name="FixedAssetMaint" value-name="fixedAssetMaint"/>
                 <entity-condition list-name="itemIssuanceList" entity-name="ProductInventoryItemAndItemIssuance">
                     <condition-expr field-name="quantity" operator="greater" value="0"/>
                 </entity-condition>
@@ -216,4 +217,37 @@
             </widgets>
         </section>
     </screen>
+
+    <screen name="PrintFixedAssetMaint">
+        <section>
+            <actions>
+                <set field="title" value="Order"/>
+                <property-map resource="AssetMaintUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="AccountingUiLabels" 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="fixedAssetId" from-field="parameters.fixedAssetId"/>
+                <set field="maintHistSeqId" from-field="parameters.maintHistSeqId"/>
+                <entity-one entity-name="FixedAsset" value-name="fixedAsset"/>
+                <entity-one entity-name="FixedAssetMaint" value-name="fixedAssetMaint"/>
+                <entity-condition list-name="itemIssuanceList" entity-name="ProductInventoryItemAndItemIssuance">
+                    <condition-expr field-name="quantity" operator="greater" value="0"/>
+                </entity-condition>
+                <set field="workEffortId" from-field="fixedAssetMaint.scheduleWorkEffortId"/>
+                <entity-condition list-name="notes" entity-name="WorkEffortNoteAndData">
+                    <condition-expr field-name="workEffortId" env-name="workEffortId"/>
+                    <order-by field-name="noteId"/>
+                </entity-condition>
+                <script location="component://assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/printFixedAssetMaint.bsh"/>
+            </actions>
+            <widgets>
+                <platform-specific>
+                    <html><html-template  location="component://assetmaint/webapp/assetmaint/assetmaint/printFixedAssetMaint.fo.ftl"/></html>
+                </platform-specific>
+            </widgets>
+        </section>
+    </screen>
+    
 </screens>

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/forms/FixedAssetForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/forms/FixedAssetForms.xml?view=diff&rev=516580&r1=516579&r2=516580
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/forms/FixedAssetForms.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/forms/FixedAssetForms.xml Fri Mar  9 14:05:46 2007
@@ -208,7 +208,7 @@
         <field name="quickAssignPartyId" title="${uiLabelMap.PartyPartyId}" use-when="fixedAssetMaint == null" field-name="partyId">
             <lookup target-form-name="LookupPerson"/>
         </field>
-        <field name="purchaseOrderId"  position="2" ><text/></field>
+        <field name="purchaseOrderId"><text/></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>