<#-- 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 = requestParameters.showInput?default("Y")> <#assign hideGrid = requestParameters.hideGrid?default("N")> <#if (requestParameters.forceComplete?has_content && !invoiceIds?has_content)> <#assign forceComplete = "true"> <#assign showInput = "Y">

<#if invoiceIds?has_content>
${uiLabelMap.CommonView} ${uiLabelMap.ProductPackingSlip} ${uiLabelMap.CommonOr} ${uiLabelMap.CommonView} ${uiLabelMap.ProductBarcode} ${uiLabelMap.CommonFor} ${uiLabelMap.ProductShipmentId} ${shipmentId}
<#if invoiceIds?exists && invoiceIds?has_content>

${uiLabelMap.AccountingInvoices}:

    <#list invoiceIds as invoiceId>
  • ${uiLabelMap.CommonNbr}${invoiceId} (PDF)

${uiLabelMap.ProductOrderId}   / ${uiLabelMap.ProductHideGrid} checked="" />  
  ${uiLabelMap.ProductPackOrder} ${uiLabelMap.ProductWeighPackageOnly}

${uiLabelMap.FormFieldTitle_picklistBinId}   ${uiLabelMap.ProductHideGrid} checked="" />  
  ${uiLabelMap.ProductPackOrder} ${uiLabelMap.ProductWeighPackageOnly}
<#if showInput != "N" && ((orderHeader?exists && orderHeader?has_content))>

<#if orderItemShipGroup?has_content> <#assign postalAddress = orderItemShipGroup.getRelatedOne("PostalAddress", false)> <#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.ProductEstimatedShipCostForShipGroup}
<#if shipmentCostEstimateForShipGroup?exists> <@ofbizCurrency amount=shipmentCostEstimateForShipGroup isoCode=orderReadHelper.getCurrency()?if_exists/>
  ${uiLabelMap.OrderInstructions}
${orderItemShipGroup.shippingInstructions?default("(${uiLabelMap.CommonNone})")}
<#if showInput != "N">
${uiLabelMap.ProductProductNumber} @ ${uiLabelMap.ProductPackItem}
${uiLabelMap.ProductCurrentPackageSequence} ${packingSession.getCurrentPackageSeq()}
<#assign itemInfos = packingSession.getItemInfos()?if_exists> <#if showInput != "N" && hideGrid != "Y" && itemInfos?has_content>
<#if carrierShipmentBoxTypes?has_content> <#if (itemInfos?has_content)> <#assign rowKey = 1> <#list itemInfos as itemInfo> <#-- <#list itemInfos as orderItem> --> <#assign orderItem = itemInfo.orderItem/> <#assign shippedQuantity = orderReadHelper.getItemShippedQuantity(orderItem)?if_exists> <#assign orderItemQuantity = itemInfo.quantity/> <#assign orderProduct = orderItem.getRelatedOne("Product", false)?if_exists/> <#assign product = Static["org.ofbiz.product.product.ProductWorker"].findProduct(delegator, itemInfo.productId)?if_exists/> <#-- <#if orderItem.cancelQuantity?exists> <#assign orderItemQuantity = orderItem.quantity - orderItem.cancelQuantity> <#else> <#assign orderItemQuantity = orderItem.quantity> --> <#assign inputQty = orderItemQuantity - packingSession.getPackedQuantity(orderId, orderItem.orderItemSeqId, shipGroupSeqId, itemInfo.productId)> <#if carrierShipmentBoxTypes?has_content> <#assign rowKey = rowKey + 1>
  ${uiLabelMap.ProductItem} ${uiLabelMap.CommonNbr} ${uiLabelMap.ProductProductId} ${uiLabelMap.ProductInternalName} ${uiLabelMap.ProductOrderedQuantity} ${uiLabelMap.ProductQuantityShipped} ${uiLabelMap.ProductPackedQty}   ${uiLabelMap.ProductPackQty} ${uiLabelMap.ProductPackedWeight} (${("uiLabelMap.ProductShipmentUomAbbreviation_" + defaultWeightUomId)?eval})${uiLabelMap.ProductShipmentBoxType} ${uiLabelMap.ProductPackage}  * ${uiLabelMap.ProductPackages}
0)>checked=""/> ${orderItem.orderItemSeqId} ${orderProduct.productId?default("N/A")} <#if orderProduct.productId != product.productId>  ${product.productId?default("N/A")} ${(orderProduct.internalName)?if_exists} <#if orderProduct.productId != product.productId>  [${(product.internalName)?if_exists}] ${orderItemQuantity} ${shippedQuantity?default(0)} ${packingSession.getPackedQuantity(orderId, orderItem.orderItemSeqId, shipGroupSeqId, itemInfo.productId)}  
 
 

<#if showInput != "N">

<#assign packageSeqIds = packingSession.getPackageSeqIds()/> <#if packageSeqIds?has_content>
${uiLabelMap.ProductPackedWeight} (${("uiLabelMap.ProductShipmentUomAbbreviation_" + defaultWeightUomId)?eval}):
<#list packageSeqIds as packageSeqId> ${uiLabelMap.ProductPackage} ${packageSeqId}
<#if orderItemShipGroup?has_content>
${uiLabelMap.ProductAdditionalShippingCharge}:
<#if packageSeqIds?has_content> ${uiLabelMap.ProductEstimateShipCost}
${uiLabelMap.ProductHandlingInstructions}:
<#assign buttonName = "${uiLabelMap.ProductComplete}"> <#if forceComplete?default("false") == "true"> <#assign buttonName = "${uiLabelMap.ProductCompleteForce}">

<#assign linesByPackageResultMap = packingSession.getPackingSessionLinesByPackage()?if_exists> <#assign packageMap = linesByPackageResultMap.get("packageMap")?if_exists> <#assign sortedKeys = linesByPackageResultMap.get("sortedKeys")?if_exists> <#if ((packageMap?has_content) && (sortedKeys?has_content))>

<#list sortedKeys as key> <#assign packedLines = packageMap.get(key)> <#if packedLines?has_content>
<#assign packedLine = packedLines.get(0)?if_exists> ${uiLabelMap.ProductPackage} ${packedLine.getPackageSeq()?if_exists}
<#list packedLines as line> <#assign product = Static["org.ofbiz.product.product.ProductWorker"].findProduct(delegator, line.getProductId())/>
${uiLabelMap.ProductItem} ${uiLabelMap.CommonNbr} ${uiLabelMap.ProductProductId} ${uiLabelMap.ProductProductDescription} ${uiLabelMap.ProductInventoryItem} ${uiLabelMap.CommonNbr} ${uiLabelMap.ProductPackedQty} ${uiLabelMap.ProductPackedWeight} (${("uiLabelMap.ProductShipmentUomAbbreviation_" + defaultWeightUomId)?eval}) (${uiLabelMap.ProductPackage}) ${uiLabelMap.ProductPackage} ${uiLabelMap.CommonNbr}  
${line.getOrderItemSeqId()} ${line.getProductId()?default("N/A")} ${product.internalName?if_exists?default("[N/A]")} ${line.getInventoryItemId()} ${line.getQuantity()} ${line.getWeight()} (${packingSession.getPackageWeight(line.getPackageSeq()?int)?if_exists}) ${line.getPackageSeq()} ${uiLabelMap.CommonClear}
<#assign packedLines = packingSession.getLines()?if_exists> <#if packedLines?has_content>

<#list packedLines as line> <#assign product = Static["org.ofbiz.product.product.ProductWorker"].findProduct(delegator, line.getProductId())/>
${uiLabelMap.ProductItem} ${uiLabelMap.CommonNbr} ${uiLabelMap.ProductProductId} ${uiLabelMap.ProductProductDescription} ${uiLabelMap.ProductInventoryItem} ${uiLabelMap.CommonNbr} ${uiLabelMap.ProductPackedQty} ${uiLabelMap.ProductPackedWeight} (${("uiLabelMap.ProductShipmentUomAbbreviation_" + defaultWeightUomId)?eval}) (${uiLabelMap.ProductPackage}) ${uiLabelMap.ProductPackage} ${uiLabelMap.CommonNbr}  
${line.getOrderItemSeqId()} ${line.getProductId()?default("N/A")} ${product.internalName?if_exists?default("[N/A]")} ${line.getInventoryItemId()} ${line.getQuantity()} ${line.getWeight()} (${packingSession.getPackageWeight(line.getPackageSeq()?int)?if_exists}) ${line.getPackageSeq()} ${uiLabelMap.CommonClear}
<#if orderId?has_content> <#else> <#else>

${uiLabelMap.ProductFacilityViewPermissionError}