<#-- 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. --> <#escape x as x?xml> <#list orderHeaderList as order> <#include "component://order/webapp/ordermgr/order/companyHeader.fo.ftl"/> <#assign orderId = order.orderId> <#assign orderDate = order.orderDate> <#list orderInfoList as orderInfo> <#if orderInfo.get("${orderId}")?exists> <#assign orderDetail = orderInfo.get("${orderId}")> <#assign orderDate = orderDetail.orderDate> <#if orderDetail.billingAddress?exists> <#assign billAddress = orderDetail.billingAddress> <#assign shipAddress = orderDetail.shippingAddress> <#assign shipmentMethodType = orderDetail.shipmentMethodType> <#assign carrierPartyId = orderDetail.carrierPartyId> <#assign shipGroupSeqId = orderDetail.shipGroupSeqId> 8mm ${uiLabelMap.OrderOrderId}: ${orderId} (${shipGroupSeqId}) ${uiLabelMap.OrderOrderDate}: ${orderDate} ${uiLabelMap.OrderShipToParty}: ${shipAddress.toName?if_exists} ${shipAddress.address1?if_exists} ${shipAddress.city?if_exists} ${shipAddress.countryGeoId?if_exists} ${shipAddress.postalCode?if_exists} ${shipAddress.stateProvinceGeoId?if_exists} <#if billAddress?has_content> ${uiLabelMap.OrderOrderBillToParty}: ${billAddress.toName?if_exists} ${billAddress.address1?if_exists} ${billAddress.city?if_exists} ${billAddress.countryGeoId?if_exists} ${billAddress.postalCode?if_exists} ${billAddress.stateProvinceGeoId?if_exists} ${uiLabelMap.ProductShipmentMethod}: ${carrierPartyId?if_exists}-${shipmentMethodType?if_exists} ${uiLabelMap.ProductLocation} ${uiLabelMap.ProductItemId} ${uiLabelMap.ProductProductName} ${uiLabelMap.FormFieldTitle_supplierProductId} ${uiLabelMap.OrderQty} ${uiLabelMap.OrderUnitPrice} <#assign totalQty = 0> <#assign rowColor = "#D4D0C8"/> <#list itemInfoList as itemInfo> <#if itemInfo.get("${orderId}")?exists > <#assign infoItems = itemInfo.get("${orderId}")> <#list infoItems as infoItem> <#assign orderItemShipGrpInvRes = infoItem.orderItemShipGrpInvRes> <#assign quantityToPick = Static["java.lang.Integer"].parseInt("${orderItemShipGrpInvRes.quantity}") > <#if orderItemShipGrpInvRes.quantityNotAvailable?exists > <#assign quantityToPick = quantityToPick - Static["java.lang.Integer"].parseInt("${orderItemShipGrpInvRes.quantityNotAvailable}")> <#assign orderItem = orderItemShipGrpInvRes.getRelatedOne("OrderItem")> <#assign product = orderItem.getRelatedOne("Product")> <#assign supplierProduct = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(product.getRelated("SupplierProduct"))?if_exists> <#assign inventoryItem = infoItem.inventoryItem> <#if (quantityToPick > 0)> <#if infoItem.facilityLocation?has_content> <#assign facilityLocation = infoItem.facilityLocation> ${facilityLocation.locationSeqId?default("_NA_")} <#else> _NA_ ${product.productId} ${product.internalName?if_exists} <#if supplierProduct?has_content > ${supplierProduct.supplierProductId?if_exists} <#else> <#assign totalQty = totalQty + quantityToPick> ${quantityToPick?if_exists} <@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/> <#if product.productTypeId == "MARKETING_PKG_AUTO"> ${uiLabelMap.OrderMarketingPackageComposedBy} <#assign workOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment")> <#if workOrderItemFulfillments?has_content> <#assign workOrderItemFulfillment = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(workOrderItemFulfillments)/> <#if workOrderItemFulfillment?has_content> <#assign workEffort = workOrderItemFulfillment.getRelatedOne("WorkEffort")/> <#if workEffort?has_content> <#assign workEffortTask = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(delegator.findByAnd("WorkEffort", {"workEffortParentId" : workEffort.workEffortId}))/> <#if workEffortTask?has_content> <#assign workEffortInventoryAssigns = workEffortTask.getRelated("WorkEffortInventoryAssign")/> <#if workEffortInventoryAssigns?has_content> <#list workEffortInventoryAssigns as workEffortInventoryAssign> <#assign inventoryItem = workEffortInventoryAssign.getRelatedOne("InventoryItem")/> <#assign product = inventoryItem.getRelatedOne("Product")/> <#-- bin location --> <#if inventoryItem?exists>${inventoryItem.locationSeqId?default("_NA_")} <#-- product ID --> <#if product?has_content> ${product.productId} <#else> [N/A] <#-- product name --> <#if product?has_content> ${product.productName?default(product.internalName?default("[Not Internal Name Set!]"))?xml} <#else> [N/A] <#-- supplier --> <#if vendor?has_content > ${vendor.supplierProductId?if_exists} <#else> <#-- quantity --> ${workEffortInventoryAssign.quantity?if_exists} <#-- unit price --> <#if rowColor == "#D4D0C8"> <#assign rowColor = "white"/> <#else> <#assign rowColor = "#D4D0C8"/> <#list orderHeaderAdjustments as orderHeaderAdjustment> <#assign adjustmentType = orderHeaderAdjustment.getRelatedOne("OrderAdjustmentType")> <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(orderHeaderAdjustment, orderSubTotal)> <#if adjustmentAmount != 0> ${adjustmentType.get("description",locale)}: <@ofbizCurrency amount=adjustmentAmount isoCode=currencyUomId/> <#list orderChargeList as orderCharge> <#if orderCharge.get("${orderId}")?exists > <#assign charges = orderCharge.get("${orderId}")> ${uiLabelMap.OrderSubTotal}: <@ofbizCurrency amount=charges.orderSubTotal isoCode=currencyUomId/> ${uiLabelMap.OrderTotalSalesTax}: <@ofbizCurrency amount=charges.taxAmount isoCode=currencyUomId/> ${uiLabelMap.OrderTotalShippingAndHandling}: <@ofbizCurrency amount=charges.shippingAmount isoCode=currencyUomId/> ${uiLabelMap.OrderTotalOtherOrderAdjustments}: <@ofbizCurrency amount=charges.otherAdjAmount isoCode=currencyUomId/> ${uiLabelMap.OrderGrandTotal}: <@ofbizCurrency amount=charges.grandTotal isoCode=currencyUomId/> ${uiLabelMap.OrderPickedBy}: ______________ ${uiLabelMap.OrderTotalNoOfItems}: ${totalQty}