<#-- general request fields -->
<#-- special service fields -->
<#if purchaseOrder?has_content>
<#assign unitCost = firstOrderItem.unitPrice?default(standardCosts.get(firstOrderItem.productId)?default(0))/>
${uiLabelMap.ProductPurchaseOrder}
${purchaseOrder.orderId} / ${firstOrderItem.orderItemSeqId}
<#if 1 < purchaseOrderItems.size()>
(${uiLabelMap.ProductMultipleOrderItemsProduct} - ${purchaseOrderItems.size()}:1 ${uiLabelMap.ProductItemProduct})
<#else>
(${uiLabelMap.ProductSingleOrderItemProduct} - 1:1 ${uiLabelMap.ProductItemProduct})
#if>
#if>
${uiLabelMap.ProductProductId}
${requestParameters.productId!}
${uiLabelMap.ProductProductName}
${product.internalName!}
${uiLabelMap.ProductProductDescription}
${product.description!}
${uiLabelMap.ProductItemDescription}
${uiLabelMap.ProductInventoryItemType}
<#if product.inventoryItemTypeId?has_content>
<#assign inventoryItemType = product.getRelatedOne("InventoryItemType", true)! />
${inventoryItemType.description!}
<#else>
<#list inventoryItemTypes as nextInventoryItemType>
selected="selected"
#if>
>${nextInventoryItemType.get("description",locale)?default(nextInventoryItemType.inventoryItemTypeId)}
#list>
#if>
<#assign isSerialized = Static["org.apache.ofbiz.product.product.ProductWorker"].isSerialized(delegator, product.productId)!/>
<#if isSerialized?has_content>
${uiLabelMap.ProductSerialNumber}
#if>
${uiLabelMap.ProductFacilityOwner}
<@htmlTemplate.lookupField formName="selectAllForm" name="ownerPartyId" id="ownerPartyId" fieldFormName="LookupPartyName"/>
${uiLabelMap.ProductSupplier}
<#if supplierPartyIds?has_content>
<#list supplierPartyIds as supplierPartyId>
selected="selected"#if>>
[${supplierPartyId}] ${Static["org.apache.ofbiz.party.party.PartyHelper"].getPartyName(delegator, supplierPartyId, true)}
#list>
#if>
${uiLabelMap.ProductDateReceived}
${uiLabelMap.lotId}
<#-- facility location(s) -->
<#assign facilityLocations = (product.getRelated("ProductFacilityLocation", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("facilityId", facilityId), null, false))!/>
${uiLabelMap.ProductFacilityLocation}
<#if facilityLocations?has_content>
<#list facilityLocations as productFacilityLocation>
<#assign facility = productFacilityLocation.getRelatedOne("Facility", true)/>
<#assign facilityLocation = productFacilityLocation.getRelatedOne("FacilityLocation", false)!/>
<#assign facilityLocationTypeEnum = (facilityLocation.getRelatedOne("TypeEnumeration", true))!/>
<#if facilityLocation??>${facilityLocation.areaId!}:${facilityLocation.aisleId!}:${facilityLocation.sectionId!}:${facilityLocation.levelId!}:${facilityLocation.positionId!}#if><#if facilityLocationTypeEnum??>(${facilityLocationTypeEnum.get("description",locale)})#if>[${productFacilityLocation.locationSeqId}]
#list>
${uiLabelMap.ProductNoLocation}
<#else>
<#if parameters.facilityId??>
<#assign LookupFacilityLocationView="LookupFacilityLocation?facilityId=${facilityId}">
<#else>
<#assign LookupFacilityLocationView="LookupFacilityLocation">
#if>
<@htmlTemplate.lookupField formName="selectAllForm" name="locationSeqId" id="locationSeqId" fieldFormName="${LookupFacilityLocationView}"/>
#if>
${uiLabelMap.ProductRejectedReason}
<#list rejectReasons as nextRejection>
${nextRejection.get("description",locale)?default(nextRejection.rejectionId)}
#list>
${uiLabelMap.ProductQuantityRejected}
${uiLabelMap.ProductQuantityAccepted}
${uiLabelMap.ProductPerUnitPrice}
<#-- get the default unit cost -->
<#if (!unitCost?? || unitCost == 0.0)><#assign unitCost = standardCosts.get(product.productId)?default(0)/>#if>