<#-- 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. --> <#macro pagination>
<#if state.hasPrevious()> ${uiLabelMap.CommonPrevious} <#if state.hasNext()> ${uiLabelMap.CommonNext}
<#-- order list -->

${uiLabelMap.CommonStatus}   
${uiLabelMap.CommonType}   
${uiLabelMap.CommonFilter}   
${uiLabelMap.CommonFilter} (${uiLabelMap.OrderFilterPOs})   

${uiLabelMap.CommonFind}
<#if hasPermission>

<#if state.hasFilter('filterInventoryProblems') || state.hasFilter('filterAuthProblems') || state.hasFilter('filterPOsOpenPastTheirETA') || state.hasFilter('filterPOsWithRejectedItems') || state.hasFilter('filterPartiallyReceivedPOs')> <#else> <#list orderHeaderList as orderHeader> <#assign status = orderHeader.getRelatedOne("StatusItem", true)> <#assign orh = Static["org.apache.ofbiz.order.order.OrderReadHelper"].getHelper(orderHeader)> <#assign billToParty = orh.getBillToParty()!> <#assign billFromParty = orh.getBillFromParty()!> <#if billToParty?has_content> <#assign billToPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("partyId", billToParty.partyId, "compareDate", orderHeader.orderDate, "userLogin", userLogin))/> <#assign billTo = billToPartyNameResult.fullName?default("[${uiLabelMap.OrderPartyNameNotFound}]")/> <#else> <#assign billTo = ''/> <#if billFromParty?has_content> <#assign billFrom = Static["org.apache.ofbiz.party.party.PartyHelper"].getPartyName(billFromParty, true)!> <#else> <#assign billFrom = ''/> <#assign productStore = orderHeader.getRelatedOne("ProductStore", true)! /> <#if state.hasFilter('filterInventoryProblems') || state.hasFilter('filterAuthProblems') || state.hasFilter('filterPOsOpenPastTheirETA') || state.hasFilter('filterPOsWithRejectedItems') || state.hasFilter('filterPartiallyReceivedPOs')> <#else> <#if !orderHeaderList?has_content>
${uiLabelMap.CommonDate} ${uiLabelMap.OrderOrder} ${uiLabelMap.CommonNbr} ${uiLabelMap.OrderOrderName} ${uiLabelMap.OrderOrderType} ${uiLabelMap.OrderOrderBillFromParty} ${uiLabelMap.OrderOrderBillToParty} ${uiLabelMap.OrderProductStore} ${uiLabelMap.CommonAmount} ${uiLabelMap.OrderTrackingCode}${uiLabelMap.CommonStatus} ${uiLabelMap.CommonFilter}${uiLabelMap.CommonStatus}
<#if orderHeader.orderDate?has_content>${Static["org.apache.ofbiz.base.util.UtilFormatOut"].formatDateTime(orderHeader.orderDate, "", locale, timeZone)!} ${orderHeader.orderId} ${orderHeader.orderName!} ${orderHeader.getRelatedOne("OrderType", true).get("description",locale)} ${billFrom!} ${billTo!} <#if productStore?has_content>${productStore.storeName?default(productStore.productStoreId)} <@ofbizCurrency amount=orderHeader.grandTotal isoCode=orderHeader.currencyUom/> <#assign trackingCodes = orderHeader.getRelated("TrackingCodeOrder", null, null, false)> <#list trackingCodes as trackingCode> <#if trackingCode?has_content> ${trackingCode.trackingCodeId}
${orderHeader.getRelatedOne("StatusItem", true).get("description",locale)} <#if filterInventoryProblems.contains(orderHeader.orderId)> Inv  <#if filterAuthProblems.contains(orderHeader.orderId)> Aut  <#if filterPOsOpenPastTheirETA.contains(orderHeader.orderId)> ETA  <#if filterPOsWithRejectedItems.contains(orderHeader.orderId)> Rej  <#if filterPartiallyReceivedPOs.contains(orderHeader.orderId)> Part   

${uiLabelMap.OrderNoOrderFound}

<@pagination/>
<#else>

${uiLabelMap.OrderViewPermissionError}