Author: jacopoc
Date: Fri Apr 11 02:09:32 2008 New Revision: 647084 URL: http://svn.apache.org/viewvc?rev=647084&view=rev Log: Modified the Shipment Manifest report to use the common decorator for FOP reports. This also fixes some of the issues that were affecting the report: for example the validation error happening with shipments with no items/packages. Modified: ofbiz/trunk/applications/product/webapp/facility/shipment/ShipmentManifest.fo.ftl ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml Modified: ofbiz/trunk/applications/product/webapp/facility/shipment/ShipmentManifest.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/shipment/ShipmentManifest.fo.ftl?rev=647084&r1=647083&r2=647084&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/shipment/ShipmentManifest.fo.ftl (original) +++ ofbiz/trunk/applications/product/webapp/facility/shipment/ShipmentManifest.fo.ftl Fri Apr 11 02:09:32 2008 @@ -17,40 +17,11 @@ under the License. --> <#escape x as x?xml> -<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> - <fo:layout-master-set> - <fo:simple-page-master master-name="main" page-height="11in" page-width="8.5in" - margin-top="0.5in" margin-bottom="1in" margin-left="1in" margin-right="1in"> - <fo:region-body margin-top="1in"/> - <fo:region-before extent="1in"/> - <fo:region-after extent="1in"/> - </fo:simple-page-master> - </fo:layout-master-set> <#if hasPermission> <#list shipmentPackageDatas as shipmentPackageData> <#assign shipmentRouteSegment = shipmentPackageData.get("shipmentRouteSegment")> <#assign shipmentPackage = shipmentPackageData.get("shipmentPackage")> - <#assign shipmentItemsDatas = shipmentPackageData.get("shipmentItemsDatas")> - <fo:page-sequence master-reference="main"> - <fo:static-content flow-name="xsl-region-after"> - <fo:block text-align="right" line-height="12pt" font-size="10pt" space-before.optimum="1.5pt" space-after.optimum="1.5pt" keep-together="always"> - ${uiLabelMap.CommonPage} <fo:page-number/> - </fo:block> - </fo:static-content> - <fo:flow flow-name="xsl-region-body" font-family="Helvetica"> - <fo:block> - ${screens.render("component://order/widget/ordermgr/OrderPrintScreens.xml#CompanyLogo")} - </fo:block> - <fo:block text-align="right"> - <fo:instream-foreign-object> - <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns" - message="${shipment.shipmentId}"> - <barcode:code39> - <barcode:height>8mm</barcode:height> - </barcode:code39> - </barcode:barcode> - </fo:instream-foreign-object> - </fo:block> + <#assign shipmentItemsDatas = shipmentPackageData.get("shipmentItemsDatas")> <fo:block><fo:leader/></fo:block> <fo:block font-size="14pt">${uiLabelMap.ProductShipmentManifest} #${shipmentId}</fo:block> <fo:block><fo:leader/></fo:block> @@ -110,7 +81,7 @@ </fo:table-cell> </fo:table-row> </fo:table-body> - </fo:table> + </fo:table> </fo:block> <fo:block space-after.optimum="10pt" font-size="10pt"> <fo:table> @@ -118,18 +89,18 @@ <fo:table-column column-width="225pt"/> <fo:table-body> <fo:table-row font-weight="bold"> - <fo:table-cell padding="2pt" background-color="#D4D0C8"> + <fo:table-cell padding="2pt" background-color="#D4D0C8"> <fo:block>${uiLabelMap.FormFieldTitle_shipmentPackageSeqId}: ${shipmentPackage.shipmentPackageSeqId}</fo:block> </fo:table-cell> <fo:table-cell padding="2pt" background-color="#D4D0C8"> <#if shipmentPackage.weight?has_content && shipmentPackage.weightUomId?has_content> <#assign weightUom = shipmentPackage.getRelatedOne("WeightUom")> - <fo:block text-align="center">${uiLabelMap.ProductWeight}: ${shipmentPackage.weight} ${weightUom.get("description",locale)}</fo:block> + <fo:block text-align="center">${uiLabelMap.ProductWeight}: ${shipmentPackage.weight} ${weightUom.get("description",locale)}</fo:block> </#if> </fo:table-cell> </fo:table-row> </fo:table-body> - </fo:table> + </fo:table> </fo:block> <fo:table> <fo:table-column column-width="180pt"/> @@ -158,9 +129,9 @@ </fo:table-header> <fo:table-body> <#list shipmentItemsDatas as shipmentItemsData> - <#assign shipmentItem = shipmentItemsData.get("shipmentItem")> - <#assign shippedQuantity = shipmentItemsData.get("shippedQuantity")> - <#assign packageQuantity = shipmentItemsData.get("packageQuantity")> + <#assign shipmentItem = shipmentItemsData.get("shipmentItem")> + <#assign shippedQuantity = shipmentItemsData.get("shippedQuantity")> + <#assign packageQuantity = shipmentItemsData.get("packageQuantity")> <#assign product = shipmentItem.getRelatedOne("Product")> <#assign itemIssuances = shipmentItem.getRelated("ItemIssuance")> <fo:table-row> @@ -196,13 +167,10 @@ </#list> </fo:table-body> </fo:table> - </fo:flow> - </fo:page-sequence> </#list> <#else> <fo:block font-size="14pt"> ${uiLabelMap.ProductFacilityViewPermissionError} </fo:block> </#if> -</fo:root> </#escape> Modified: ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml?rev=647084&r1=647083&r2=647084&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml Fri Apr 11 02:09:32 2008 @@ -351,9 +351,35 @@ <script location="component://product/webapp/facility/WEB-INF/actions/shipment/ShipmentManifest.bsh"/> </actions> <widgets> - <platform-specific> - <html><html-template location="component://product/webapp/facility/shipment/ShipmentManifest.fo.ftl"/></html> - </platform-specific> + <decorator-screen name="FoReportDecorator" location="component://common/widget/CommonScreens.xml"> + <!-- at the top left of every page we put the logo and company information --> + <decorator-section name="topLeft"> + <section> + <widgets> + <include-screen name="CompanyLogo" location="component://order/widget/ordermgr/OrderPrintScreens.xml"/> + </widgets> + </section> + </decorator-section> + <!-- at the top right of every page we put the order information --> + <decorator-section name="topRight"> + <section> + <widgets> + <platform-specific> + <html><html-template location="component://product/webapp/facility/shipment/PackingSlipShipmentBarCode.fo.ftl"/></html> + </platform-specific> + </widgets> + </section> + </decorator-section> + <decorator-section name="body"> + <section> + <widgets> + <platform-specific> + <html><html-template location="component://product/webapp/facility/shipment/ShipmentManifest.fo.ftl"/></html> + </platform-specific> + </widgets> + </section> + </decorator-section> + </decorator-screen> </widgets> </section> </screen> |
Free forum by Nabble | Edit this page |