<#-- 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. --> <#if orderHeader?has_content>

<#if !orderItemList?has_content> <#else> <#assign itemClass = "2"> <#list orderItemList as orderItem> <#assign orderItemContentWrapper = Static["org.apache.ofbiz.order.order.OrderContentWrapper"].makeOrderContentWrapper(orderItem, request)> <#assign orderItemShipGrpInvResList = orderReadHelper.getOrderItemShipGrpInvResList(orderItem)> <#if orderHeader.orderTypeId == "SALES_ORDER"><#assign pickedQty = orderReadHelper.getItemPickedQuantityBd(orderItem)> class="alternate-row"> <#assign orderItemType = orderItem.getRelatedOne("OrderItemType", false)!> <#assign productId = orderItem.productId!> <#if productId?? && productId == "shoppingcart.CommentLine"> <#else> class="alternate-row"> <#if productId?? && productId == "shoppingcart.CommentLine"> <#else> <#-- now show status details per line item --> <#assign currentItemStatus = orderItem.getRelatedOne("StatusItem", false)> <#-- QUANTITY --> <#-- show info from workeffort --> <#assign workOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment", null, null, false)!> <#if workOrderItemFulfillments?has_content> <#list workOrderItemFulfillments as workOrderItemFulfillment> <#assign workEffort = workOrderItemFulfillment.getRelatedOne("WorkEffort", true)> class="alternate-row"> <#-- show linked order lines --> <#assign linkedOrderItemsTo = delegator.findByAnd("OrderItemAssoc", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("orderId", orderItem.getString("orderId"), "orderItemSeqId", orderItem.getString("orderItemSeqId")), null, false)> <#assign linkedOrderItemsFrom = delegator.findByAnd("OrderItemAssoc", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("toOrderId", orderItem.getString("orderId"), "toOrderItemSeqId", orderItem.getString("orderItemSeqId")), null, false)> <#if linkedOrderItemsTo?has_content> <#list linkedOrderItemsTo as linkedOrderItem> <#assign linkedOrderId = linkedOrderItem.toOrderId> <#assign linkedOrderItemSeqId = linkedOrderItem.toOrderItemSeqId> <#assign linkedOrderItemValue = linkedOrderItem.getRelatedOne("ToOrderItem", false)> <#assign linkedOrderItemValueStatus = linkedOrderItemValue.getRelatedOne("StatusItem", false)> <#assign description = linkedOrderItem.getRelatedOne("OrderItemAssocType", false).getString("description")/> class="alternate-row"> <#if linkedOrderItemsFrom?has_content> <#list linkedOrderItemsFrom as linkedOrderItem> <#assign linkedOrderId = linkedOrderItem.orderId> <#assign linkedOrderItemSeqId = linkedOrderItem.orderItemSeqId> <#assign linkedOrderItemValue = linkedOrderItem.getRelatedOne("FromOrderItem", false)> <#assign linkedOrderItemValueStatus = linkedOrderItemValue.getRelatedOne("StatusItem", false)> <#assign description = linkedOrderItem.getRelatedOne("OrderItemAssocType", false).getString("description")/> class="alternate-row"> <#-- show linked requirements --> <#assign linkedRequirements = orderItem.getRelated("OrderRequirementCommitment", null, null, false)!> <#if linkedRequirements?has_content> <#list linkedRequirements as linkedRequirement> class="alternate-row"> <#-- show linked quote --> <#assign linkedQuote = orderItem.getRelatedOne("QuoteItem", true)!> <#if linkedQuote?has_content> class="alternate-row"> <#-- now show adjustment details per line item --> <#assign orderItemAdjustments = Static["org.apache.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentList(orderItem, orderAdjustments)> <#if orderItemAdjustments?? && orderItemAdjustments?has_content> <#list orderItemAdjustments as orderItemAdjustment> <#assign adjustmentType = orderItemAdjustment.getRelatedOne("OrderAdjustmentType", true)> class="alternate-row"> <#-- now show price info per line item --> <#assign orderItemPriceInfos = orderReadHelper.getOrderItemPriceInfos(orderItem)> <#if orderItemPriceInfos?? && orderItemPriceInfos?has_content> class="alternate-row"> <#list orderItemPriceInfos as orderItemPriceInfo> class="alternate-row"> <#-- now show survey information per line item --> <#assign orderItemSurveyResponses = Static["org.apache.ofbiz.order.order.OrderReadHelper"].getOrderItemSurveyResponse(orderItem)> <#if orderItemSurveyResponses?? && orderItemSurveyResponses?has_content> <#list orderItemSurveyResponses as survey> class="alternate-row"> <#-- display the ship estimated/before/after dates --> <#if orderItem.estimatedShipDate??> class="alternate-row"> <#if orderItem.estimatedDeliveryDate??> class="alternate-row"> <#if orderItem.shipAfterDate??> class="alternate-row"> <#if orderItem.shipBeforeDate??> class="alternate-row"> <#-- now show ship group info per line item --> <#assign orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc", null, null, false)!> <#if orderItemShipGroupAssocs?has_content> <#list orderItemShipGroupAssocs as shipGroupAssoc> <#assign shipGroup = shipGroupAssoc.getRelatedOne("OrderItemShipGroup", false)> <#assign shipGroupAddress = shipGroup.getRelatedOne("PostalAddress", false)!> class="alternate-row"> <#-- now show inventory reservation info per line item --> <#if orderItemShipGrpInvResList?? && orderItemShipGrpInvResList?has_content> <#list orderItemShipGrpInvResList as orderItemShipGrpInvRes> class="alternate-row"> <#-- now show planned shipment info per line item --> <#assign orderShipments = orderItem.getRelated("OrderShipment", null, null, false)!> <#if orderShipments?has_content> <#list orderShipments as orderShipment> class="alternate-row"> <#-- now show item issuances (shipment) per line item --> <#assign itemIssuances = itemIssuancesPerItem.get(orderItem.get("orderItemSeqId"))!> <#if itemIssuances?has_content> <#list itemIssuances as itemIssuance> class="alternate-row"> <#-- now show item issuances (inventory item) per line item --> <#if itemIssuances?has_content> <#list itemIssuances as itemIssuance> class="alternate-row"> <#-- now show shipment receipts per line item --> <#assign shipmentReceipts = orderItem.getRelated("ShipmentReceipt", null, null, false)!> <#if shipmentReceipts?has_content> <#list shipmentReceipts as shipmentReceipt> class="alternate-row"> <#if orderItem.comments?has_content> class="alternate-row"> <#if itemClass == "2"> <#assign itemClass = "1"> <#else> <#assign itemClass = "2"> <#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> <#-- subtotal --> <#-- other adjustments --> <#-- shipping adjustments --> <#-- tax adjustments --> <#-- grand total -->
${uiLabelMap.ProductProduct} ${uiLabelMap.CommonStatus} ${uiLabelMap.OrderQuantity} ${uiLabelMap.OrderUnitList} ${uiLabelMap.OrderAdjustments} ${uiLabelMap.OrderSubTotal}  
${uiLabelMap.checkhelper_sales_order_lines_lookup_failed}
>> ${orderItem.itemDescription}
<#if orderItem.supplierProductId?has_content> ${orderItem.supplierProductId} - ${orderItem.itemDescription!} <#elseif productId??> ${orderItem.productId?default("N/A")} - ${orderItem.itemDescription!} <#if (product.salesDiscontinuationDate)?? && Static["org.apache.ofbiz.base.util.UtilDateTime"].nowTimestamp().after(product.salesDiscontinuationDate)>
${uiLabelMap.OrderItemDiscontinued}: ${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDateTime(product.salesDiscontinuationDate, "", locale, timeZone)!} <#elseif orderItemType??> ${orderItemType.description} - ${orderItem.itemDescription!} <#else> ${orderItem.itemDescription!} <#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute", null, null, false)/> <#if orderItemAttributes?has_content>
    <#list orderItemAttributes as orderItemAttribute>
  • ${orderItemAttribute.attrName} : ${orderItemAttribute.attrValue}
<#assign downloadContents = delegator.findByAnd("OrderItemAndProductContentInfo", { "orderId" : orderItem.orderId, "orderItemSeqId" : orderItem.orderItemSeqId, "productContentTypeId" : "DIGITAL_DOWNLOAD", "statusId" : "ITEM_COMPLETED"}, null, false)/> <#if downloadContents?has_content> <#list downloadContents as downloadContent> ${uiLabelMap.ContentDownload}  ${uiLabelMap.ProductCatalog} ${uiLabelMap.OrderEcommerce} <#if orderItemContentWrapper.get("IMAGE_URL", "url")?has_content> ${uiLabelMap.OrderViewImage}
>> ${orderItem.itemDescription} <#if productId?has_content> <#assign product = orderItem.getRelatedOne("Product", true)> <#if productId??> <#-- INVENTORY --> <#if (orderHeader.statusId != "ORDER_COMPLETED") && availableToPromiseMap?? && quantityOnHandMap?? && availableToPromiseMap.get(productId)?? && quantityOnHandMap.get(productId)??> <#assign quantityToProduce = 0> <#assign atpQuantity = availableToPromiseMap.get(productId)?default(0)> <#assign qohQuantity = quantityOnHandMap.get(productId)?default(0)> <#assign mktgPkgATP = mktgPkgATPMap.get(productId)?default(0)> <#assign mktgPkgQOH = mktgPkgQOHMap.get(productId)?default(0)> <#assign requiredQuantity = requiredProductQuantityMap.get(productId)?default(0)> <#assign onOrderQuantity = onOrderProductQuantityMap.get(productId)?default(0)> <#assign inProductionQuantity = productionProductQuantityMap.get(productId)?default(0)> <#assign unplannedQuantity = requiredQuantity - qohQuantity - inProductionQuantity - onOrderQuantity - mktgPkgQOH> <#if unplannedQuantity < 0><#assign unplannedQuantity = 0>
<#if availableToPromiseByFacilityMap?? && quantityOnHandByFacilityMap?? && quantityOnHandByFacilityMap.get(productId)?? && availableToPromiseByFacilityMap.get(productId)??> <#assign atpQuantityByFacility = availableToPromiseByFacilityMap.get(productId)?default(0)> <#assign qohQuantityByFacility = quantityOnHandByFacilityMap.get(productId)?default(0)> <#if (product?has_content) && (product.productTypeId?has_content) && Static["org.apache.ofbiz.entity.util.EntityTypeUtil"].hasParentType(delegator, "ProductType", "productTypeId", product.productTypeId, "parentTypeId", "MARKETING_PKG")>
${uiLabelMap.ProductInventory}  
${uiLabelMap.OrderRequiredForSO} ${requiredQuantity}
${uiLabelMap.ProductInInventory} [${facility.facilityName!}] ${uiLabelMap.ProductQoh} ${qohQuantityByFacility} (${uiLabelMap.ProductAtp}: ${atpQuantityByFacility})
${uiLabelMap.ProductInInventory} [${uiLabelMap.CommonAll} ${uiLabelMap.ProductFacilities}] ${uiLabelMap.ProductQoh} ${qohQuantity} (${uiLabelMap.ProductAtp}: ${atpQuantity})
${uiLabelMap.ProductMarketingPackageQOH} ${mktgPkgQOH} (${uiLabelMap.ProductAtp}: ${mktgPkgATP})
${uiLabelMap.OrderOnOrder} ${onOrderQuantity}
${uiLabelMap.OrderInProduction} ${inProductionQuantity}
${uiLabelMap.OrderUnplanned} ${unplannedQuantity}
${uiLabelMap.CommonCurrent} ${currentItemStatus.get("description",locale)?default(currentItemStatus.statusId)}
<#if ("ITEM_CREATED" == (currentItemStatus.statusId) && "ORDER_APPROVED" == (orderHeader.statusId)) && security.hasEntityPermission("ORDERMGR", "_UPDATE", session)> <#assign orderItemStatuses = orderReadHelper.getOrderItemStatuses(orderItem)> <#list orderItemStatuses as orderItemStatus> <#assign loopStatusItem = orderItemStatus.getRelatedOne("StatusItem", false)> <#if orderItemStatus.statusDatetime?has_content>${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDateTime(orderItemStatus.statusDatetime, "", locale, timeZone)!}  ${loopStatusItem.get("description",locale)?default(orderItemStatus.statusId)}
<#assign returns = orderItem.getRelated("ReturnItem", null, null, false)!> <#if returns?has_content> <#list returns as returnItem> <#assign returnHeader = returnItem.getRelatedOne("ReturnHeader", false)> <#if returnHeader.statusId != "RETURN_CANCELLED"> ${uiLabelMap.OrderReturned} ${uiLabelMap.CommonNbr}${returnItem.returnId}
<#assign shippedQuantity = orderReadHelper.getItemShippedQuantity(orderItem)> <#assign shipmentReceipts = delegator.findByAnd("ShipmentReceipt", {"orderId" : orderHeader.getString("orderId"), "orderItemSeqId" : orderItem.orderItemSeqId}, null, false)/> <#assign totalReceived = 0.0> <#if shipmentReceipts?? && shipmentReceipts?has_content> <#list shipmentReceipts as shipmentReceipt> <#if shipmentReceipt.quantityAccepted?? && shipmentReceipt.quantityAccepted?has_content> <#assign quantityAccepted = shipmentReceipt.quantityAccepted> <#assign totalReceived = quantityAccepted + totalReceived> <#if shipmentReceipt.quantityRejected?? && shipmentReceipt.quantityRejected?has_content> <#assign quantityRejected = shipmentReceipt.quantityRejected> <#assign totalReceived = quantityRejected + totalReceived> <#if product?has_content && product.productTypeId?has_content && "SERVICE" == product.productTypeId && "ITEM_COMPLETED" == currentItemStatus.statusId> <#assign shippedQuantity = orderItem.quantity?default(0)/> <#assign totalReceived = orderItem.quantity?default(0)> <#if orderHeader.orderTypeId == "PURCHASE_ORDER"> <#assign remainingQuantity = ((orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - totalReceived?double)> <#else> <#assign remainingQuantity = ((orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - shippedQuantity?double)> <#-- to compute shortfall amount, sum up the orderItemShipGrpInvRes.quantityNotAvailable --> <#assign shortfalledQuantity = 0/> <#list orderItemShipGrpInvResList as orderItemShipGrpInvRes> <#if (orderItemShipGrpInvRes.quantityNotAvailable?has_content && orderItemShipGrpInvRes.quantityNotAvailable > 0)> <#assign shortfalledQuantity = shortfalledQuantity + orderItemShipGrpInvRes.quantityNotAvailable/> <#if orderHeader.orderTypeId == "SALES_ORDER"> <#if pickedQty gt 0 && orderHeader.statusId == "ORDER_APPROVED"> <#else> <#else> <#if orderHeader.orderTypeId == "PURCHASE_ORDER"> <#else>
${uiLabelMap.OrderOrdered} ${orderItem.quantity?default(0)?string.number} ${uiLabelMap.OrderShipRequest} ${orderReadHelper.getItemReservedQuantity(orderItem)}
${uiLabelMap.OrderCancelled} ${orderItem.cancelQuantity?default(0)?string.number}${uiLabelMap.OrderQtyPicked} ${pickedQty?default(0)?string.number}${uiLabelMap.OrderQtyPicked} ${pickedQty?default(0)?string.number}    
${uiLabelMap.OrderRemaining} ${remainingQuantity}${uiLabelMap.OrderPlannedInReceive} ${totalReceived}${uiLabelMap.OrderQtyShipped} ${shippedQuantity}
${uiLabelMap.OrderShortfalled} ${shortfalledQuantity} ${uiLabelMap.OrderOutstanding} <#-- Make sure digital goods without shipments don't always remainn "outstanding": if item is completed, it must have no outstanding quantity. --> <#if (orderItem.statusId?has_content) && (orderItem.statusId == "ITEM_COMPLETED")> 0 <#elseif orderHeader.orderTypeId == "PURCHASE_ORDER"> ${(orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - totalReceived?double} <#elseif orderHeader.orderTypeId == "SALES_ORDER"> ${(orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - shippedQuantity?double}
${uiLabelMap.OrderInvoiced} ${orderReadHelper.getOrderItemInvoicedQuantity(orderItem)} ${uiLabelMap.OrderReturned} ${returnQuantityMap.get(orderItem.orderItemSeqId)?default(0)}
<@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/> / <@ofbizCurrency amount=orderItem.unitListPrice isoCode=currencyUomId/> <@ofbizCurrency amount=Static["org.apache.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentsTotal(orderItem, orderAdjustments, true, false, false) 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 orderItem.orderItemTypeId != "RENTAL_ORDER_ITEM"> ${uiLabelMap.ManufacturingProductionRun} ${workEffort.workEffortId} ${uiLabelMap.OrderCurrentStatus} ${(delegator.findOne("StatusItem", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId")), true).get("description",locale))!} <#else> ${uiLabelMap.CommonFrom} : <#if workEffort.estimatedStartDate?has_content>${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDate(workEffort.estimatedStartDate, "", locale, timeZone)!} ${uiLabelMap.CommonTo} : <#if workEffort.estimatedCompletionDate?has_content>${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDate(workEffort.estimatedCompletionDate, "", locale, timeZone)!} ${uiLabelMap.OrderNumberOfPersons} : ${workEffort.reservPersons?default("")}
  ${uiLabelMap.OrderLinkedToOrderItem} (${description!}) ${linkedOrderId}/${linkedOrderItemSeqId} ${linkedOrderItemValueStatus.description!}
  ${uiLabelMap.OrderLinkedFromOrderItem} (${description!}) ${linkedOrderId}/${linkedOrderItemSeqId} ${linkedOrderItemValueStatus.description!}
  ${uiLabelMap.OrderLinkedToRequirement}  ${linkedRequirement.requirementId} 
  ${uiLabelMap.OrderLinkedToQuote}  ${linkedQuote.quoteId}-${linkedQuote.quoteItemSeqId} 
${uiLabelMap.OrderAdjustment} ${adjustmentType.get("description",locale)} ${StringUtil.wrapString(orderItemAdjustment.get("description",locale)!)} <#if orderItemAdjustment.comments?has_content> (${orderItemAdjustment.comments?default("")}) <#if orderItemAdjustment.productPromoId?has_content> ${orderItemAdjustment.getRelatedOne("ProductPromo", false).getString("promoName")} <#if orderItemAdjustment.orderAdjustmentTypeId == "SALES_TAX"> <#if orderItemAdjustment.primaryGeoId?has_content> <#assign primaryGeo = orderItemAdjustment.getRelatedOne("PrimaryGeo", true)/> <#if primaryGeo.geoName?has_content> ${uiLabelMap.OrderJurisdiction} ${primaryGeo.geoName} [${primaryGeo.abbreviation!}] <#if orderItemAdjustment.secondaryGeoId?has_content> <#assign secondaryGeo = orderItemAdjustment.getRelatedOne("SecondaryGeo", true)/> ${uiLabelMap.CommonIn} ${secondaryGeo.geoName} [${secondaryGeo.abbreviation!}]) <#if orderItemAdjustment.sourcePercentage??> ${uiLabelMap.OrderRate} ${orderItemAdjustment.sourcePercentage?string("0.######")} <#if orderItemAdjustment.customerReferenceId?has_content> ${uiLabelMap.OrderCustomerTaxId} ${orderItemAdjustment.customerReferenceId} <#if orderItemAdjustment.exemptAmount??> ${uiLabelMap.OrderExemptAmount} ${orderItemAdjustment.exemptAmount}     <#if orderItemAdjustment.amountAlreadyIncluded?has_content> <@ofbizCurrency amount=orderItemAdjustment.amountAlreadyIncluded isoCode=currencyUomId/> <#else> <@ofbizCurrency amount=Static["org.apache.ofbiz.order.order.OrderReadHelper"].calcItemAdjustment(orderItemAdjustment, orderItem) isoCode=currencyUomId/>  
 
${uiLabelMap.ProductPriceRuleNameId} [${orderItemPriceInfo.productPriceRuleId!}:${orderItemPriceInfo.productPriceActionSeqId!}] ${orderItemPriceInfo.description!}   <@ofbizCurrency amount=orderItemPriceInfo.modifyAmount isoCode=currencyUomId/>  
${uiLabelMap.CommonSurveys}  ${survey.surveyId}  
${uiLabelMap.OrderEstimatedShipDate} ${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDate(orderItem.estimatedShipDate, "", locale, timeZone)!}  
${uiLabelMap.OrderOrderQuoteEstimatedDeliveryDate} ${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDate(orderItem.estimatedDeliveryDate, "", locale, timeZone)!}  
${uiLabelMap.OrderShipAfterDate} ${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDate(orderItem.shipAfterDate, "", locale, timeZone)!}  
${uiLabelMap.OrderShipBeforeDate} ${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDate(orderItem.shipBeforeDate, "", locale, timeZone)!}  
${uiLabelMap.OrderShipGroup} [${shipGroup.shipGroupSeqId}] ${shipGroupAddress.address1?default("${uiLabelMap.OrderNotShipped}")} ${shipGroupAssoc.quantity?string.number}   
${uiLabelMap.CommonInventory}  ${orderItemShipGrpInvRes.inventoryItemId} ${uiLabelMap.OrderShipGroup} ${orderItemShipGrpInvRes.shipGroupSeqId} ${orderItemShipGrpInvRes.quantity?string.number}  <#if (orderItemShipGrpInvRes.quantityNotAvailable?has_content && orderItemShipGrpInvRes.quantityNotAvailable > 0)> [${orderItemShipGrpInvRes.quantityNotAvailable?string.number} ${uiLabelMap.OrderBackOrdered}] <#--Raise Priority -->    
${uiLabelMap.OrderPlannedInShipment} ${orderShipment.shipmentId}: ${orderShipment.shipmentItemSeqId} ${orderShipment.quantity?string.number}   
<#if itemIssuance.shipmentId?has_content> ${uiLabelMap.OrderIssuedToShipmentItem}  ${itemIssuance.shipmentId}: ${itemIssuance.shipmentItemSeqId!} <#else> ${uiLabelMap.OrderIssuedWithoutShipment} ${itemIssuance.quantity?default(0) - itemIssuance.cancelQuantity?default(0)}   
<#if itemIssuance.inventoryItemId?has_content> <#assign inventoryItem = itemIssuance.getRelatedOne("InventoryItem", false)/> ${uiLabelMap.CommonInventory} ${itemIssuance.inventoryItemId} ${uiLabelMap.OrderShipGroup} ${itemIssuance.shipGroupSeqId!} <#if (inventoryItem.serialNumber?has_content)>
${uiLabelMap.ProductSerialNumber} ${inventoryItem.serialNumber} 
${itemIssuance.quantity?default(0) - itemIssuance.cancelQuantity?default(0)}  
<#if shipmentReceipt.shipmentId?has_content> ${uiLabelMap.OrderShipmentReceived}  ${shipmentReceipt.shipmentId}:${shipmentReceipt.shipmentItemSeqId!}  <#if shipmentReceipt.datetimeReceived?has_content>${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDateTime(shipmentReceipt.datetimeReceived, "", locale, timeZone)!}  ${uiLabelMap.CommonInventory}  ${shipmentReceipt.inventoryItemId} ${shipmentReceipt.quantityAccepted?string.number} / ${shipmentReceipt.quantityRejected?default(0)?string.number}  
 
${uiLabelMap.CommonComments} ${uiLabelMap.CommonCurrent}: ${orderItem.comments} <#assign orderItemSeqId = orderItem.orderItemSeqId!> <#if comments?has_content>
<#list comments as comm> <#if comm.orderItemSeqId?has_content && orderItemSeqId?has_content && comm.orderItemSeqId == orderItemSeqId> <#if comm.changeComments?has_content>
${(comm.changeComments)!}   <#if comm.changeDatetime?has_content>${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDateTime(comm.changeDatetime, "", locale, timeZone)?default("0000-00-00 00:00:00")}   ${uiLabelMap.CommonBy} - [${(comm.changeUserLogin)!}]

<#if orderHeaderAdjustment.comments?has_content>${orderHeaderAdjustment.comments} - <#if orderHeaderAdjustment.description?has_content>${orderHeaderAdjustment.description} - ${adjustmentType.get("description", locale)} <@ofbizCurrency amount=adjustmentAmount isoCode=currencyUomId/>  

${uiLabelMap.OrderItemsSubTotal} <@ofbizCurrency amount=orderSubTotal isoCode=currencyUomId/>  
${uiLabelMap.OrderTotalOtherOrderAdjustments} <@ofbizCurrency amount=otherAdjAmount isoCode=currencyUomId/>  
${uiLabelMap.OrderTotalShippingAndHandling} <@ofbizCurrency amount=shippingAmount isoCode=currencyUomId/>  
${uiLabelMap.OrderTotalSalesTax} <@ofbizCurrency amount=taxAmount isoCode=currencyUomId/>  
${uiLabelMap.OrderTotalDue} <@ofbizCurrency amount=grandTotal isoCode=currencyUomId/>