<#-- 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. --> <#escape x as x?xml> <#if orderHeader.getString("orderTypeId") == "PURCHASE_ORDER"> <#if supplierGeneralContactMechValueMap??> <#assign contactMech = supplierGeneralContactMechValueMap.contactMech> ${uiLabelMap.OrderPurchasedFrom}: <#assign postalAddress = supplierGeneralContactMechValueMap.postalAddress> <#if postalAddress?has_content> <#if postalAddress.toName?has_content>${postalAddress.toName} <#if postalAddress.attnName?has_content>${postalAddress.attnName!} ${postalAddress.address1!} <#if postalAddress.address2?has_content>${postalAddress.address2!} <#assign stateGeo = (delegator.findOne("Geo", {"geoId", postalAddress.stateProvinceGeoId!}, false))! /> ${postalAddress.city}<#if stateGeo?has_content>, ${stateGeo.geoName!} ${postalAddress.postalCode!} <#assign countryGeo = (delegator.findOne("Geo", {"geoId", postalAddress.countryGeoId!}, false))! /> <#if countryGeo?has_content>${countryGeo.geoName!} <#else> <#-- here we just display the name of the vendor, since there is no address --> <#assign vendorParty = orderReadHelper.getBillFromParty()> ${uiLabelMap.OrderPurchasedFrom}: ${Static['org.apache.ofbiz.party.party.PartyHelper'].getPartyName(vendorParty)} <#-- list all postal addresses of the order. there should be just a billing and a shipping here. --> <#list orderContactMechValueMaps as orderContactMechValueMap> <#assign contactMech = orderContactMechValueMap.contactMech> <#assign contactMechPurpose = orderContactMechValueMap.contactMechPurposeType> <#if contactMech.contactMechTypeId == "POSTAL_ADDRESS"> <#assign postalAddress = orderContactMechValueMap.postalAddress> ${contactMechPurpose.get("description",locale)}: <#if postalAddress?has_content> <#if postalAddress.toName?has_content>${postalAddress.toName!} <#if postalAddress.attnName?has_content>${postalAddress.attnName!} ${postalAddress.address1!} <#if postalAddress.address2?has_content>${postalAddress.address2!} <#assign stateGeo = (delegator.findOne("Geo", {"geoId", postalAddress.stateProvinceGeoId!}, false))! /> ${postalAddress.city}<#if stateGeo?has_content>, ${stateGeo.geoName!} ${postalAddress.postalCode!} <#assign countryGeo = (delegator.findOne("Geo", {"geoId", postalAddress.countryGeoId!}, false))! /> <#if countryGeo?has_content>${countryGeo.geoName!} <#if orderPaymentPreferences?has_content> ${uiLabelMap.AccountingPaymentInformation}: <#list orderPaymentPreferences as orderPaymentPreference> <#assign paymentMethodType = orderPaymentPreference.getRelatedOne("PaymentMethodType", false)!> <#if (orderPaymentPreference?? && (orderPaymentPreference.getString("paymentMethodTypeId") == "CREDIT_CARD") && (orderPaymentPreference.getString("paymentMethodId")?has_content))> <#assign creditCard = orderPaymentPreference.getRelatedOne("PaymentMethod", false).getRelatedOne("CreditCard", false)> ${Static["org.apache.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)} <#else> ${paymentMethodType.get("description",locale)!} <#if orderHeader.getString("orderTypeId") == "SALES_ORDER" && shipGroups?has_content> ${uiLabelMap.OrderShipmentInformation}: <#list shipGroups as shipGroup> <#if shipGroups.size() gt 1>${shipGroup.shipGroupSeqId} - <#if (shipGroup.shipmentMethodTypeId)??> ${(shipGroup.getRelatedOne("ShipmentMethodType", false).get("description", locale))?default(shipGroup.shipmentMethodTypeId)} <#if (shipGroup.shipAfterDate)?? || (shipGroup.shipByDate)??> <#if (shipGroup.shipAfterDate)??> - ${uiLabelMap.OrderShipAfterDate}: ${Static["org.apache.ofbiz.base.util.UtilDateTime"].toDateString(shipGroup.shipAfterDate)}<#if (shipGroup.shipByDate)??> - ${uiLabelMap.OrderShipBeforeDate}: ${Static["org.apache.ofbiz.base.util.UtilDateTime"].toDateString(shipGroup.shipByDate)} <#if orderTerms?has_content && orderTerms.size() gt 0> ${uiLabelMap.OrderOrderTerms}: <#list orderTerms as orderTerm> ${orderTerm.getRelatedOne("TermType", false).get("description",locale)} ${orderTerm.termValue?default("")} ${orderTerm.termDays?default("")} ${orderTerm.textValue?default("")}