<#-- 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. --> <#-- NOTE: this template is used for the orderstatus screen in ecommerce AND for order notification emails through the OrderNoticeEmail.ftl file --> <#-- the "urlPrefix" value will be prepended to URLs by the ofbizUrl transform if/when there is no "request" object in the context --> <#if baseEcommerceSecureUrl??><#assign urlPrefix = baseEcommerceSecureUrl/> <#if (orderHeader.externalId)?? && (orderHeader.externalId)?has_content > <#assign externalOrder = "(" + orderHeader.externalId + ")"/>
<#-- left side -->

<#if maySelectItems?default("N") == "Y" && returnLink?default("N") == "Y" && (orderHeader.statusId)! == "ORDER_COMPLETED" && roleTypeId! == "PLACING_CUSTOMER"> makeReturn?orderId=${orderHeader.orderId}" class="submenutextright">${uiLabelMap.OrderRequestReturn} ${uiLabelMap.OrderOrder} <#if orderHeader?has_content> ${uiLabelMap.CommonNbr}orderstatus?orderId=${orderHeader.orderId}" class="lightbuttontext">${orderHeader.orderId} ${uiLabelMap.CommonInformation} <#if (orderHeader.orderId)??> ${externalOrder!} [ order.pdf?orderId=${(orderHeader.orderId)!}" target="_BLANK" class="lightbuttontext">PDF ]

<#-- placing customer information -->
    <#if localOrderReadHelper?? && orderHeader?has_content> <#assign displayParty = localOrderReadHelper.getPlacingParty()!/> <#if displayParty?has_content> <#assign displayPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", displayParty.partyId, "compareDate", orderHeader.orderDate, "userLogin", userLogin))/>
  • ${uiLabelMap.PartyName} ${(displayPartyNameResult.fullName)?default("[Name Not Found]")}
  • <#-- order status information -->
  • ${uiLabelMap.CommonStatus} <#if orderHeader?has_content> ${localOrderReadHelper.getStatusString(locale)} <#else> ${uiLabelMap.OrderNotYetOrdered}
  • <#-- ordered date --> <#if orderHeader?has_content>
  • ${uiLabelMap.CommonDate} ${orderHeader.orderDate.toString()}
  • <#if distributorId??>
  • ${uiLabelMap.OrderDistributor} ${distributorId}
<#if paymentMethods?has_content || paymentMethodType?has_content || billingAccount?has_content> <#-- order payment info -->

${uiLabelMap.AccountingPaymentInformation}

<#-- offline payment address infomation :: change this to use Company's address -->
    <#if !paymentMethod?has_content && paymentMethodType?has_content>
  • <#if paymentMethodType.paymentMethodTypeId == "EXT_OFFLINE"> ${uiLabelMap.AccountingOfflinePayment} <#if orderHeader?has_content && paymentAddress?has_content> ${uiLabelMap.OrderSendPaymentTo}: <#if paymentAddress.toName?has_content>${paymentAddress.toName} <#if paymentAddress.attnName?has_content>${uiLabelMap.PartyAddrAttnName}: ${paymentAddress.attnName} ${paymentAddress.address1} <#if paymentAddress.address2?has_content>${paymentAddress.address2} <#assign paymentStateGeo = (delegator.findOne("Geo", {"geoId", paymentAddress.stateProvinceGeoId!}, false))! /> ${paymentAddress.city}<#if paymentStateGeo?has_content>, ${paymentStateGeo.geoName!} ${paymentAddress.postalCode!} <#assign paymentCountryGeo = (delegator.findOne("Geo", {"geoId", paymentAddress.countryGeoId!}, false))! /> <#if paymentCountryGeo?has_content>${paymentCountryGeo.geoName!} ${uiLabelMap.EcommerceBeSureToIncludeYourOrderNb} <#else> <#assign outputted = true> ${uiLabelMap.AccountingPaymentVia} ${paymentMethodType.get("description",locale)}
  • <#if paymentMethods?has_content> <#list paymentMethods as paymentMethod> <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId> <#assign creditCard = paymentMethod.getRelatedOne("CreditCard", false)> <#assign formattedCardNumber = Static["org.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)> <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId> <#assign giftCard = paymentMethod.getRelatedOne("GiftCard", false)> <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId> <#assign eftAccount = paymentMethod.getRelatedOne("EftAccount", false)> <#-- credit card info --> <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId && creditCard?has_content> <#if outputted?default(false)> <#assign pmBillingAddress = creditCard.getRelatedOne("PostalAddress", false)!>
    • ${uiLabelMap.AccountingCreditCard} <#if creditCard.companyNameOnCard?has_content>${creditCard.companyNameOnCard} <#if creditCard.titleOnCard?has_content>${creditCard.titleOnCard} ${creditCard.firstNameOnCard} <#if creditCard.middleNameOnCard?has_content>${creditCard.middleNameOnCard} ${creditCard.lastNameOnCard} <#if creditCard.suffixOnCard?has_content>${creditCard.suffixOnCard}
    • ${formattedCardNumber}
  • <#-- Gift Card info --> <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId && giftCard?has_content> <#if outputted?default(false)> <#if giftCard?has_content && giftCard.cardNumber?has_content> <#assign pmBillingAddress = giftCard.getRelatedOne("PostalAddress", false)!> <#assign giftCardNumber = ""> <#assign pcardNumber = giftCard.cardNumber> <#if pcardNumber?has_content> <#assign psize = pcardNumber?length - 4> <#if 0 < psize> <#list 0 .. psize-1 as foo> <#assign giftCardNumber = giftCardNumber + "*"> <#assign giftCardNumber = giftCardNumber + pcardNumber[psize .. psize + 3]> <#else> <#assign giftCardNumber = pcardNumber>
  • ${uiLabelMap.AccountingGiftCard} ${giftCardNumber}
  • <#-- EFT account info --> <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId && eftAccount?has_content> <#if outputted?default(false)> <#assign pmBillingAddress = eftAccount.getRelatedOne("PostalAddress", false)!>
    • ${uiLabelMap.AccountingEFTAccount} ${eftAccount.nameOnAccount!}
    • <#if eftAccount.companyNameOnAccount?has_content>${eftAccount.companyNameOnAccount}
    • ${uiLabelMap.AccountingBank}: ${eftAccount.bankName}, ${eftAccount.routingNumber}
    • ${uiLabelMap.AccountingAccount} #: ${eftAccount.accountNumber}
  • <#if pmBillingAddress?has_content>
    • <#if pmBillingAddress.toName?has_content>${uiLabelMap.CommonTo}: ${pmBillingAddress.toName}
    • <#if pmBillingAddress.attnName?has_content>${uiLabelMap.CommonAttn}: ${pmBillingAddress.attnName}
    • ${pmBillingAddress.address1}
    • <#if pmBillingAddress.address2?has_content>${pmBillingAddress.address2}
    • <#assign pmBillingStateGeo = (delegator.findOne("Geo", {"geoId", pmBillingAddress.stateProvinceGeoId!}, false))! /> ${pmBillingAddress.city}<#if pmBillingStateGeo?has_content>, ${ pmBillingStateGeo.geoName!} ${pmBillingAddress.postalCode!} <#assign pmBillingCountryGeo = (delegator.findOne("Geo", {"geoId", pmBillingAddress.countryGeoId!}, false))! /> <#if pmBillingCountryGeo?has_content>${pmBillingCountryGeo.geoName!}
  • <#assign outputted = true> <#-- billing account info --> <#if billingAccount?has_content> <#if outputted?default(false)> <#assign outputted = true>
  • ${uiLabelMap.AccountingBillingAccount} #${billingAccount.billingAccountId!} - ${billingAccount.description!}
  • <#if (customerPoNumberSet?has_content)>
  • ${uiLabelMap.OrderPurchaseOrderNumber} <#list customerPoNumberSet as customerPoNumber> ${customerPoNumber!}
<#-- right side -->
<#if orderItemShipGroups?has_content>

${uiLabelMap.OrderShippingInformation}

<#-- shipping address --> <#assign groupIdx = 0> <#list orderItemShipGroups as shipGroup> <#if orderHeader?has_content> <#assign shippingAddress = shipGroup.getRelatedOne("PostalAddress", false)!> <#assign groupNumber = shipGroup.shipGroupSeqId!> <#else> <#assign shippingAddress = cart.getShippingAddress(groupIdx)!> <#assign groupNumber = groupIdx + 1> <#assign groupIdx = groupIdx + 1> <#-- end list of orderItemShipGroups -->