<#-- 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("ORDERMGR", "_CREATE", session) || security.hasEntityPermission("ORDERMGR", "_PURCHASE_CREATE", session)> <#-- Purchase Orders --> <#if facilityMaps??>
<#if (cart.getShipGroupSize() > 1)> <#if shipToPartyShippingContactMechList?has_content> <#list shipToPartyShippingContactMechList as shippingContactMech> <#assign shippingAddress = shippingContactMech.getRelatedOne("PostalAddress", false)> <#if shippingContactMech_has_next>
${uiLabelMap.OrderCreateShipGroup} <#list 1..cart.getShipGroupSize() as currIndex> <#assign shipGroupIndex = currIndex - 1> <#assign i = 0> <#assign shipGroup = cart.getShipInfo(shipGroupIndex)> <#list facilityMaps as facilityMap> <#assign facility = facilityMap.facility> <#assign facilityContactMechList = facilityMap.facilityContactMechList> <#-- company postal addresses --> <#if facilityContactMechList?has_content> <#list facilityContactMechList as shippingContactMech> <#if shippingContactMech.postalAddress??> <#assign shippingAddress = shippingContactMech.postalAddress> <#if shippingContactMech_has_next> <#assign i = i + 1> <#else>

${uiLabelMap.OrderShipGroup} ${uiLabelMap.CommonNbr} ${currIndex}

${uiLabelMap.FacilityFacility}: ${facility.facilityName!} [${facility.facilityId}]

<#assign checked='' /> <#if shipGroup?has_content && (shipGroup.getFacilityId()?has_content && shipGroup.getFacilityId() == facility.facilityId) && (shipGroup.getContactMechId()?has_content && shipGroup.getContactMechId() == shippingAddress.contactMechId) && !shipToPartyShippingContactMechList?has_content> <#assign checked='checked' /> <#elseif i == 0 && !shipToPartyShippingContactMechList?has_content> <#assign checked='checked' />     

${uiLabelMap.CommonNoContactInformationOnFile}: ${uiLabelMap.CommonNew}

${uiLabelMap.OrderShipToAnotherParty}: ${Static["org.apache.ofbiz.party.party.PartyHelper"].getPartyName(shipToParty)}

    

<#else> <#-- Sales Orders -->
<#if (cart.getShipGroupSize() > 1)>
${uiLabelMap.CommonCreateNew} ${uiLabelMap.OrderShipGroup} ${uiLabelMap.OrderCreateShippingAddress} <#list 1..cart.getShipGroupSize() as currIndex> <#assign shipGroupIndex = currIndex - 1> <#assign currShipContactMechId = cart.getShippingContactMechId(shipGroupIndex)!> <#assign supplierPartyId = cart.getSupplierPartyId(shipGroupIndex)!> <#assign facilityId = cart.getShipGroupFacilityId(shipGroupIndex)!>
<#if shippingContactMechList?has_content> <#assign i = 0> <#list shippingContactMechList as shippingContactMech> <#assign shippingAddress = shippingContactMech.getRelatedOne("PostalAddress", false)> <#if currShipContactMechId?? && currShipContactMechId?has_content> <#if currShipContactMechId == shippingContactMech.contactMechId> <#assign checkedValue = "checked='checked'"> <#else> <#assign checkedValue = ""> <#else> <#if i == 0> <#assign checkedValue = "checked='checked'"> <#else> <#assign checkedValue = ""> <#if shippingContactMech_has_next> <#assign i = i + 1> <#if shipToPartyShippingContactMechList?has_content> <#list shipToPartyShippingContactMechList as shippingContactMech> <#assign shippingAddress = shippingContactMech.getRelatedOne("PostalAddress", false)> <#if shippingContactMech_has_next>

${uiLabelMap.OrderShipGroup} ${uiLabelMap.CommonNbr} ${currIndex}

${uiLabelMap.PartySupplier}: ${uiLabelMap.ProductReserveInventoryFromFacility}:



${uiLabelMap.OrderShipToAnotherParty}: ${Static["org.apache.ofbiz.party.party.PartyHelper"].getPartyName(shipToParty)}

 

<#-- select a party id to ship to instead -->
  • ${uiLabelMap.OrderShipToAnotherParty}

 
 
${uiLabelMap.PartyPartyId}
 
<@htmlTemplate.lookupField value='${thisPartyId!}' formName="partyshipform" name="shipToPartyId" id="shipToPartyId" fieldFormName="LookupPartyName"/>
<#else>

${uiLabelMap.OrderViewPermissionError}