<#-- 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. --> <#assign externalKeyParam = "&externalLoginKey=" + requestAttributes.externalLoginKey?if_exists>
<#if product?exists>

${uiLabelMap.ProductInventoryItems} ${uiLabelMap.CommonFor} <#if product?exists>${(product.internalName)?if_exists} [${uiLabelMap.CommonId}:${productId?if_exists}]

<#if productId?has_content> ${uiLabelMap.ProductCreateNewInventoryItemProduct} <#if showEmpty> ${uiLabelMap.ProductHideEmptyItems} <#else> ${uiLabelMap.ProductShowEmptyItems}
<#if productId?exists> <#assign rowClass = "2"> <#list productInventoryItems as inventoryItem> <#-- NOTE: Delivered for serialized inventory means shipped to customer so they should not be displayed here any more --> <#if showEmpty || (inventoryItem.inventoryItemTypeId?if_exists == "SERIALIZED_INV_ITEM" && inventoryItem.statusId?if_exists != "INV_DELIVERED") || (inventoryItem.inventoryItemTypeId?if_exists == "NON_SERIAL_INV_ITEM" && ((inventoryItem.availableToPromiseTotal?exists && inventoryItem.availableToPromiseTotal != 0) || (inventoryItem.quantityOnHandTotal?exists && inventoryItem.quantityOnHandTotal != 0)))> <#assign curInventoryItemType = inventoryItem.getRelatedOne("InventoryItemType", false)> <#assign curStatusItem = inventoryItem.getRelatedOne("StatusItem", true)?if_exists> <#assign facilityLocation = inventoryItem.getRelatedOne("FacilityLocation", false)?if_exists> <#assign facilityLocationTypeEnum = (facilityLocation.getRelatedOne("TypeEnumeration", true))?if_exists> <#assign inventoryItemDetailFirst = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(inventoryItem.getRelated("InventoryItemDetail", null, Static["org.ofbiz.base.util.UtilMisc"].toList("effectiveDate"), false))?if_exists> <#if curInventoryItemType?exists> class="alternate-row"> <#if inventoryItem.facilityId?exists && inventoryItem.containerId?exists> <#elseif inventoryItem.facilityId?exists> <#elseif (inventoryItem.containerId)?exists> <#else> <#if inventoryItem.inventoryItemTypeId?if_exists == "NON_SERIAL_INV_ITEM"> <#elseif inventoryItem.inventoryItemTypeId?if_exists == "SERIALIZED_INV_ITEM"> <#else> <#-- toggle the row color --> <#if rowClass == "2"> <#assign rowClass = "1"> <#else> <#assign rowClass = "2">
${uiLabelMap.ProductItemId} ${uiLabelMap.ProductItemType} ${uiLabelMap.CommonStatus} ${uiLabelMap.CommonReceived} ${uiLabelMap.CommonExpire} ${uiLabelMap.ProductFacilityContainerId} ${uiLabelMap.ProductLocation} ${uiLabelMap.ProductLotId} ${uiLabelMap.ProductBinNum} ${uiLabelMap.ProductPerUnitPrice}   ${uiLabelMap.ProductInventoryItemInitialQuantity} ${uiLabelMap.ProductAtpQohSerial}
${(inventoryItem.inventoryItemId)?if_exists}  ${(curInventoryItemType.get("description",locale))?if_exists}
<#if curStatusItem?has_content> ${(curStatusItem.get("description",locale))?if_exists} <#elseif inventoryItem.statusId?has_content> [${inventoryItem.statusId}] <#else> ${uiLabelMap.CommonNotSet} 
 ${(inventoryItem.datetimeReceived)?if_exists}  ${(inventoryItem.expireDate)?if_exists}${uiLabelMap.ProductErrorFacility} (${inventoryItem.facilityId}) ${uiLabelMap.ProductAndContainer} (${inventoryItem.containerId}) ${uiLabelMap.CommonSpecified}${uiLabelMap.ProductFacilityLetter}: ${inventoryItem.facilityId}${uiLabelMap.ProductContainerLetter}: ${inventoryItem.containerId}  <#if facilityLocation?exists>${facilityLocation.areaId?if_exists}:${facilityLocation.aisleId?if_exists}:${facilityLocation.sectionId?if_exists}:${facilityLocation.levelId?if_exists}:${facilityLocation.positionId?if_exists}<#if facilityLocationTypeEnum?has_content> (${facilityLocationTypeEnum.get("description",locale)}) [${(inventoryItem.locationSeqId)?if_exists}]  ${(inventoryItem.lotId)?if_exists}  ${(inventoryItem.binNumber)?if_exists} <@ofbizCurrency amount=inventoryItem.unitCost isoCode=inventoryItem.currencyUomId/> <#if inventoryItemDetailFirst?exists && inventoryItemDetailFirst.workEffortId?exists> ${uiLabelMap.ProductionRunId} ${inventoryItemDetailFirst.workEffortId} <#elseif inventoryItemDetailFirst?exists && inventoryItemDetailFirst.orderId?exists> ${uiLabelMap.OrderId} ${inventoryItemDetailFirst.orderId} ${inventoryItemDetailFirst?if_exists.quantityOnHandDiff?if_exists}
${(inventoryItem.availableToPromiseTotal)?default("NA")} / ${(inventoryItem.quantityOnHandTotal)?default("NA")}
 ${(inventoryItem.serialNumber)?if_exists}${uiLabelMap.ProductErrorType} ${(inventoryItem.inventoryItemTypeId)?if_exists} ${uiLabelMap.ProductUnknownSerialNumber} (${(inventoryItem.serialNumber)?if_exists}) ${uiLabelMap.ProductAndQuantityOnHand} (${(inventoryItem.quantityOnHandTotal)?if_exists} ${uiLabelMap.CommonSpecified}
<#else>

${uiLabelMap.ProductProductNotFound} ${productId?if_exists}!