<#-- 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> <#if orderHeader?has_content> ${uiLabelMap.OrderProduct} ${uiLabelMap.OrderQuantity} ${uiLabelMap.OrderUnitList} ${uiLabelMap.OrderSubTotal} <#list orderItemList as orderItem> <#assign orderItemType = orderItem.getRelatedOne("OrderItemType", false)!> <#assign productId = orderItem.productId!> <#assign remainingQuantity = (orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0))> <#assign itemAdjustment = Static["org.apache.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentsTotal(orderItem, orderAdjustments, true, false, false)> <#assign internalImageUrl = Static["org.apache.ofbiz.product.imagemanagement.ImageManagementHelper"].getInternalImageUrl(request, productId!)!> <#if orderItem.supplierProductId?has_content> ${orderItem.supplierProductId} - ${orderItem.itemDescription!} <#elseif productId??> ${orderItem.productId?default("N/A")} - ${orderItem.itemDescription!} <#elseif orderItemType??> ${orderItemType.get("description",locale)} - ${orderItem.itemDescription!} <#else> ${orderItem.itemDescription!} <#if orderHeader.orderTypeId == "PURCHASE_ORDER"> <#if internalImageUrl?has_content> ${remainingQuantity} <@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/> <#if orderItem.statusId != "ITEM_CANCELLED"> <@ofbizCurrency amount=Static["org.apache.ofbiz.order.order.OrderReadHelper"].getOrderItemSubTotal(orderItem, orderAdjustments) isoCode=currencyUomId/> <#else> <@ofbizCurrency amount=0.00 isoCode=currencyUomId/> <#if itemAdjustment != 0> ${uiLabelMap.OrderAdjustments} : <@ofbizCurrency amount=itemAdjustment isoCode=currencyUomId/> <#list orderHeaderAdjustments as orderHeaderAdjustment> <#assign adjustmentType = orderHeaderAdjustment.getRelatedOne("OrderAdjustmentType", false)> <#assign adjustmentAmount = Static["org.apache.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(orderHeaderAdjustment, orderSubTotal)> <#if adjustmentAmount != 0> ${adjustmentType.get("description",locale)} : <#if orderHeaderAdjustment.get("description")?has_content> (${orderHeaderAdjustment.get("description")!}) <@ofbizCurrency amount=adjustmentAmount isoCode=currencyUomId/> <#-- summary of order amounts --> ${uiLabelMap.OrderItemsSubTotal} <@ofbizCurrency amount=orderSubTotal isoCode=currencyUomId/> <#if otherAdjAmount != 0> ${uiLabelMap.OrderTotalOtherOrderAdjustments} <@ofbizCurrency amount=otherAdjAmount isoCode=currencyUomId/> <#if shippingAmount != 0> ${uiLabelMap.OrderTotalShippingAndHandling} <@ofbizCurrency amount=shippingAmount isoCode=currencyUomId/> <#if taxAmount != 0> ${uiLabelMap.OrderTotalSalesTax} <@ofbizCurrency amount=taxAmount isoCode=currencyUomId/> <#if grandTotal != 0> ${uiLabelMap.OrderTotalDue} <@ofbizCurrency amount=grandTotal isoCode=currencyUomId/> <#-- notes --> <#if orderNotes?has_content> <#if showNoteHeadingOnPDF> ${uiLabelMap.OrderNotes} <#list orderNotes as note> <#if (note.internalNote?has_content) && (note.internalNote != "Y")> ${note.noteInfo!} <#if note.noteParty?has_content> <#assign notePartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("partyId", note.noteParty, "compareDate", note.noteDateTime, "lastNameFirst", "Y", "userLogin", userLogin))/> ${uiLabelMap.CommonBy}: ${notePartyNameResult.fullName?default("${uiLabelMap.OrderPartyNameNotFound}")} ${uiLabelMap.CommonAt}: ${note.noteDateTime?string!}