applications/product/webapp/facility/shipment/PackingSlip.fo.ftl
<#--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->
<#escape x as x?xml>
<#if hasPermission>
<#assign shipGroup = shipment.getRelatedOne("PrimaryOrderItemShipGroup", false)!>
<#assign carrier = (shipGroup.carrierPartyId)!(uiLabelMap.CommonNA)>
<#if packages?has_content>
<#list packages as package>
<fo:block><fo:leader/></fo:block>
<fo:block font-size="14pt">${uiLabelMap.ProductShipmentId} #${shipmentId} / ${uiLabelMap.ProductPackage} ${package_index + 1}<#if (packages?size > 1)> of ${packages?size}</#if></fo:block>
<fo:block font-size="12pt">${uiLabelMap.ProductOrderId} #${shipment.primaryOrderId!(uiLabelMap.CommonNA)} / ${shipment.primaryShipGroupSeqId!(uiLabelMap.CommonNA)}</fo:block>
<fo:block><fo:leader/></fo:block>
<fo:block space-after.optimum="10pt" font-size="10pt">
<fo:table>
<fo:table-column column-width="150pt"/>
<fo:table-column column-width="150pt"/>
<fo:table-column column-width="150pt"/>
<fo:table-header>
<fo:table-row font-weight="bold">
<fo:table-cell padding="2pt" background-color="#D4D0C8">
<fo:block>${uiLabelMap.ProductShippingAddress}</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" background-color="#D4D0C8">
<fo:block text-align="center">${uiLabelMap.ProductShipmentMethod}</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" background-color="#D4D0C8">
<fo:block text-align="right">${uiLabelMap.ProductHandlingInstructions}</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell padding="2pt">
<fo:block>
<#if destinationPostalAddress?has_content>
<fo:block>${uiLabelMap.CommonTo}: ${destinationPostalAddress.toName!}</fo:block>
<#if destinationPostalAddress.attnName?has_content>
<fo:block>${uiLabelMap.CommonAttn}: ${destinationPostalAddress.attnName!}</fo:block>
</#if>
<fo:block>${destinationPostalAddress.address1!}</fo:block>
<fo:block>${destinationPostalAddress.address2!}</fo:block>
<fo:block>
${destinationPostalAddress.city!}<#if destinationPostalAddress.stateProvinceGeoId?has_content>, ${destinationPostalAddress.stateProvinceGeoId}</#if>
${destinationPostalAddress.postalCode!} ${destinationPostalAddress.countryGeoId!}
</fo:block>
</#if>
</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt">
<fo:block text-align="center">
<#if carrier != "_NA_">
${carrier}
</#if>
<#if (shipGroup.shipmentMethodTypeId)??>
${(shipGroup.getRelatedOne("ShipmentMethodType", false).get("description", locale))?default(shipGroup.shipmentMethodTypeId)}
</#if>
</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt">
<fo:block text-align="right">${shipment.handlingInstructions!}</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
<fo:block space-after.optimum="10pt" font-size="10pt">
<fo:table>
<fo:table-column column-width="250pt"/>
<#if (packages?size > 1)>
<fo:table-column column-width="58pt"/>
<fo:table-column column-width="45pt"/>
<fo:table-column column-width="50pt"/>
<fo:table-column column-width="47pt"/>
<#else>
<fo:table-column column-width="67pt"/>
<fo:table-column column-width="67pt"/>
<fo:table-column column-width="67pt"/>
</#if>
<fo:table-header>
<fo:table-row font-weight="bold">
<fo:table-cell padding="2pt" background-color="#D4D0C8"><fo:block>${uiLabelMap.ProductProduct}</fo:block></fo:table-cell>
<fo:table-cell padding="2pt" background-color="#D4D0C8"><fo:block>${uiLabelMap.ProductQuantityRequested}</fo:block></fo:table-cell>
<fo:table-cell padding="2pt" background-color="#D4D0C8"><fo:block>${uiLabelMap.ProductQuantityOfPackage}</fo:block></fo:table-cell>
<#if (packages?size > 1)><fo:table-cell padding="2pt" background-color="#D4D0C8"><fo:block>${uiLabelMap.ProductQuantityShippedOfPackage}</fo:block></fo:table-cell></#if>
<fo:table-cell padding="2pt" background-color="#D4D0C8"><fo:block>${uiLabelMap.ProductQuantityShipped}</fo:block></fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<#list package as line>
<#if ((line_index % 2) == 0)>
<#assign rowColor = "white">
<#else>
<#assign rowColor = "#CCCCCC">
</#if>
<fo:table-row>
<fo:table-cell padding="2pt" background-color="${rowColor}">
<#if line.product?has_content>
<fo:block>${line.product.internalName?default("Internal Name Not Set!")} [${line.product.productId}]</fo:block>
<#else>
<fo:block>${line.getClass().getName()} </fo:block>
</#if>
</fo:table-cell>
<fo:table-cell padding="2pt" background-color="${rowColor}">
<fo:block>${line.quantityRequested!0}</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" background-color="${rowColor}">
<fo:block>${line.quantityInPackage!0}</fo:block>
</fo:table-cell>
<#if (packages?size > 1)>
<fo:table-cell padding="2pt" background-color="${rowColor}">
<fo:block>${line.quantityInShipment!0}</fo:block>
</fo:table-cell>
</#if>
<fo:table-cell padding="2pt" background-color="${rowColor}">
<fo:block>${line.quantityShipped!0}</fo:block>
</fo:table-cell>
</fo:table-row>
</#list>
</fo:table-body>
</fo:table>
</fo:block>
<#if shipGroup.giftMessage?has_content>
<fo:block space-after.optimum="10pt" font-size="10pt">
<fo:table>
<fo:table-column column-width="450pt"/>
<fo:table-body>
<#if shipGroup.giftMessage?? >
<fo:table-row font-weight="bold">
<fo:table-cell>
<fo:block>${uiLabelMap.OrderGiftMessage}</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row >
<fo:table-cell>
<fo:block>${shipGroup.giftMessage}</fo:block>
</fo:table-cell>
</fo:table-row>
</#if>
</fo:table-body>
</fo:table>
</fo:block>
</#if>
<#if package_has_next><fo:block break-before="page"/></#if>
</#list> <#-- packages -->
<#else>
<fo:block font-size="14pt">
${uiLabelMap.ProductErrorNoPackagesFoundForShipment}
</fo:block>
</#if>
<#else>
<fo:block font-size="14pt">
${uiLabelMap.ProductFacilityViewPermissionError}
</fo:block>
</#if>
</#escape>