<#-- 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 security.hasEntityPermission("FACILITY", "_VIEW", session)> <#assign showInput = "Y">

<#if (shipmentId?has_content) || (isOrderStatusApproved == false)> <#assign showInput = "N"> <#if shipmentId?has_content>
${uiLabelMap.ProductShipmentId}${shipmentId}
<#if invoiceIds?exists && invoiceIds?has_content>
${uiLabelMap.AccountingInvoices}:

${uiLabelMap.ProductOrderId}   <#if shipmentId?has_content> <#else> /  
 

${uiLabelMap.FormFieldTitle_picklistBinId}    
 
<#if showInput != "N" && orderHeader?exists && orderHeader?has_content>

<#if orderItemShipGroup?has_content> <#assign postalAddress = orderItemShipGroup.getRelatedOne("PostalAddress")> <#assign carrier = orderItemShipGroup.carrierPartyId?default("N/A")>
${uiLabelMap.ProductShipToAddress}
${uiLabelMap.CommonTo}: ${postalAddress.toName?default("")}
<#if postalAddress.attnName?has_content> ${uiLabelMap.CommonAttn}: ${postalAddress.attnName}
${postalAddress.address1}
<#if postalAddress.address2?has_content> ${postalAddress.address2}
${postalAddress.city?if_exists}, ${postalAddress.stateProvinceGeoId?if_exists} ${postalAddress.postalCode?if_exists}
${postalAddress.countryGeoId}
  ${uiLabelMap.ProductCarrierShipmentMethod}
<#if carrier == "USPS"> <#assign color = "red"> <#elseif carrier == "UPS"> <#assign color = "green"> <#else> <#assign color = "black"> <#if carrier != "_NA_"> ${carrier}   ${orderItemShipGroup.shipmentMethodTypeId?default("??")}
  ${uiLabelMap.OrderInstructions}
${orderItemShipGroup.shippingInstructions?default("(${uiLabelMap.CommonNone})")}

${uiLabelMap.ProductProductNumber} @

<#assign orderItems = orderItems?if_exists>
<#if orderItems?has_content> <#assign rowKey = 1> <#assign counter = 1> <#assign isShowVerifyItemButton = "false"> <#list orderItems as orderItem> <#assign orderItemSeqId = orderItem.orderItemSeqId?if_exists> <#assign readyToVerify = verifyPickSession.getReadyToVerifyQuantity(orderId,orderItemSeqId)> <#assign orderItemQuantity = orderItem.getBigDecimal("quantity")> <#assign verifiedQuantity = 0.000000> <#assign shipments = delegator.findByAnd("Shipment", Static["org.ofbiz.base.util.UtilMisc"].toMap("primaryOrderId", orderItem.getString("orderId"), "statusId", "SHIPMENT_PICKED"))/> <#if (shipments?has_content)> <#list shipments as shipment> <#assign itemIssuances = delegator.findByAnd("ItemIssuance", Static["org.ofbiz.base.util.UtilMisc"].toMap("shipmentId", shipment.getString("shipmentId"), "orderItemSeqId", orderItemSeqId))/> <#if itemIssuances?has_content> <#list itemIssuances as itemIssuance> <#assign verifiedQuantity = verifiedQuantity + itemIssuance.getBigDecimal("quantity")> <#if verifiedQuantity == orderItemQuantity> <#assign counter = counter +1> <#assign orderItemQuantity = orderItemQuantity.subtract(verifiedQuantity)> <#assign product = orderItem.getRelatedOne("Product")?if_exists/> <#if (orderItemQuantity.compareTo(readyToVerify) > 0) > <#assign isShowVerifyItemButton = "true"> <#else> <#assign workOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment")/> <#if workOrderItemFulfillments?has_content> <#assign workOrderItemFulfillment = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(workOrderItemFulfillments)/> <#if workOrderItemFulfillment?has_content> <#assign workEffort = workOrderItemFulfillment.getRelatedOne("WorkEffort")/> <#if workEffort?has_content> <#assign workEffortTask = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(delegator.findByAnd("WorkEffort", Static["org.ofbiz.base.util.UtilMisc"].toMap("workEffortParentId", workEffort.workEffortId)))/> <#if workEffortTask?has_content> <#assign workEffortInventoryAssigns = workEffortTask.getRelated("WorkEffortInventoryAssign")/> <#if workEffortInventoryAssigns?has_content> <#list workEffortInventoryAssigns as workEffortInventoryAssign> <#assign inventoryItem = workEffortInventoryAssign.getRelatedOne("InventoryItem")/> <#assign product = inventoryItem.getRelatedOne("Product")/> <#assign rowKey = rowKey + 1>
  ${uiLabelMap.ProductItem} ${uiLabelMap.CommonNbr} ${uiLabelMap.ProductProductId} ${uiLabelMap.ProductInternalName} ${uiLabelMap.ProductCountryOfOrigin} ${uiLabelMap.ProductOrderedQuantity} ${uiLabelMap.ProductVerified} ${uiLabelMap.CommonQuantity} ${uiLabelMap.CommonQty} ${uiLabelMap.CommonTo} ${uiLabelMap.ProductVerify}
  ${orderItemSeqId?if_exists} ${product.productId?default("N/A")} ${(product.internalName)?if_exists} ${orderItemQuantity?if_exists} ${readyToVerify?if_exists} <#if (orderItemQuantity.compareTo(readyToVerify) > 0)> <#assign qtyToVerify = orderItemQuantity.subtract(readyToVerify) > <#else> 0
${uiLabelMap.OrderMarketingPackageComposedBy}

${product.productId?default("N/A")} ${product.internalName?if_exists} ${workEffortInventoryAssign.quantity?if_exists}

 
<#if isShowVerifyItemButton == "true">   <#if rowKey != counter>

<#assign orderId = orderId?if_exists > <#assign pickRows = verifyPickSession.getPickRows(orderId)?if_exists>
<#if pickRows?has_content>
  • ${uiLabelMap.ProductVerified} ${uiLabelMap.OrderItems} : ${pickRows.size()?if_exists}

<#list pickRows as pickRow> <#if (pickRow.getOrderId()?if_exists).equals(orderId)>
${uiLabelMap.ProductItem} ${uiLabelMap.CommonNbr} ${uiLabelMap.ProductProductId} ${uiLabelMap.ProductInventoryItem} ${uiLabelMap.CommonNbr} ${uiLabelMap.ProductVerified} ${uiLabelMap.CommonQuantity}  
${pickRow.getOrderItemSeqId()?if_exists} ${pickRow.getProductId()?if_exists} ${pickRow.getInventoryItemId()?if_exists} ${pickRow.getReadyToVerifyQty()?if_exists}
${uiLabelMap.ProductComplete}
<#if orderId?has_content> <#else> <#if shipmentId?has_content> <#else>

${uiLabelMap.ProductFacilityViewPermissionError}