<#-- 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. --> <#-- information about orders and amount refunded/credited on past returns --> <#if orh??> <#if returnableItems?has_content> <#assign rowCount = 0> <#assign alt_row = false> <#list returnableItems.keySet() as orderItem> <#if orderItem.getEntityName() == "OrderAdjustment"> <#-- this is an order item adjustment --> <#assign returnAdjustmentType = returnItemTypeMap.get(orderItem.get("orderAdjustmentTypeId"))/> <#assign adjustmentType = orderItem.getRelatedOne("OrderAdjustmentType", false)/> <#assign description = orderItem.description?default(adjustmentType.get("description",locale))/> class="alternate-row"> <#else> <#-- this is an order item --> <#assign returnItemType = (returnItemTypeMap.get(returnableItems.get(orderItem).get("itemTypeKey")))!/> <#-- need some order item information --> <#assign orderHeader = orderItem.getRelatedOne("OrderHeader", false)> <#assign itemCount = orderItem.quantity> <#assign itemPrice = orderItem.unitPrice> <#-- end of order item information --> class="alternate-row"> <#assign rowCount = rowCount + 1> <#-- toggle the row color --> <#assign alt_row = !alt_row> <#if orderHeaderAdjustments?has_content> <#list orderHeaderAdjustments as adj> <#assign returnAdjustmentType = returnItemTypeMap.get(adj.get("orderAdjustmentTypeId"))/> <#assign adjustmentType = adj.getRelatedOne("OrderAdjustmentType", false)/> <#assign description = adj.description?default(adjustmentType.get("description",locale))/> <#assign rowCount = rowCount + 1> <#else> <#assign manualAdjRowNum = rowCount/> <#assign rowCount = rowCount + 1> <#else>

${uiLabelMap.OrderReturnFromOrder} ${uiLabelMap.CommonNbr}${orderId}

${uiLabelMap.OrderOrderTotal} <@ofbizCurrency amount=orh.getOrderGrandTotal() isoCode=orh.getCurrency()/>
${uiLabelMap.OrderAmountAlreadyCredited} <@ofbizCurrency amount=orh.getOrderReturnedCreditTotalBd() isoCode=orh.getCurrency()/>
${uiLabelMap.OrderAmountAlreadyRefunded} <@ofbizCurrency amount=orh.getOrderReturnedRefundTotalBd() isoCode=orh.getCurrency()/>
${uiLabelMap.CommonDescription} ${uiLabelMap.OrderOrderQty} ${uiLabelMap.OrderReturnQty} ${uiLabelMap.OrderUnitPrice} ${uiLabelMap.OrderReturnPrice}* ${uiLabelMap.OrderReturnReason} ${uiLabelMap.OrderReturnType} ${uiLabelMap.OrderItemStatus} ${uiLabelMap.OrderOrderInclude}?
${StringUtil.wrapString(description)?default("N/A")} ${orderItem.amount?string("##0.00")} <#--value="${orderItem.amount?string("##0.00")}"/>-->
<#if orderItem.productId??> ${orderItem.productId}  ${orderItem.itemDescription!}
${orderItem.quantity?string.number}
<@ofbizCurrency amount=orderItem.unitPrice isoCode=orderHeader.currencyUom/>
<#if orderItem.productId??> <#assign product = orderItem.getRelatedOne("Product", false)/> <#if product.productTypeId == "ASSET_USAGE_OUT_IN"> <#else>

${uiLabelMap.OrderReturnAdjustments} ${uiLabelMap.CommonNbr}${orderId}


${uiLabelMap.CommonDescription} ${uiLabelMap.CommonAmount} ${uiLabelMap.OrderReturnType} ${uiLabelMap.OrderOrderInclude}?
${description?default("N/A")}
value="${adj.amount?string("##0.00")}"/>
${uiLabelMap.OrderNoOrderAdjustments}

${uiLabelMap.OrderReturnManualAdjustment} ${uiLabelMap.CommonNbr}${orderId}

${uiLabelMap.OrderReturnSelectedItems}
${uiLabelMap.OrderReturnNoReturnableItems} #${orderId}
*${uiLabelMap.OrderReturnPriceNotIncludeTax}