<#-- 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)>
<#if request.getAttribute("paymentMethodId")?? || ( (paymentMethodList?has_content || billingAccountList?has_content) && !requestParameters.createNew??)> <#-- initial screen when we have a associated party -->
<#if billingAccountList?has_content> <#if paymentMethodList?has_content> <#list paymentMethodList as paymentMethod> <#if paymentMethod.paymentMethodTypeId == "CREDIT_CARD"> <#assign creditCard = paymentMethod.getRelatedOne("CreditCard", false)> <#elseif paymentMethod.paymentMethodTypeId == "EFT_ACCOUNT"> <#assign eftAccount = paymentMethod.getRelatedOne("EftAccount", false)> <#else>
${uiLabelMap.AccountingNoPaymentMethods}
${uiLabelMap.CommonCreateNew}

${uiLabelMap.FormFieldTitle_billingAccountId}  
${uiLabelMap.OrderBillUpTo}  



${uiLabelMap.OrderCardSecurityCode}  ${uiLabelMap.CommonUpdate}
${uiLabelMap.CommonUpdate}

<#elseif paymentMethodType?? || finalizeMode?default("") == "payment"> <#-- after initial screen; show detailed screens for selected type --> <#if paymentMethodType == "CC"> <#if postalAddress?has_content>
<#elseif requestParameters.useShipAddr??> <#else> <#if paymentMethodType == "EFT"> <#if postalAddress?has_content> <#elseif requestParameters.useShipAddr??> <#else> <#if requestParameters.useShipAddr??> <#if cart.getShippingContactMechId()??> <#if orderPerson?has_content> <#assign toName = ""> <#if orderPerson.personalTitle?has_content><#assign toName = orderPerson.personalTitle + " "> <#assign toName = toName + orderPerson.firstName + " "> <#if orderPerson.middleName?has_content><#assign toName = toName + orderPerson.middleName + " "> <#assign toName = toName + orderPerson.lastName> <#if orderPerson.suffix?has_content><#assign toName = toName + " " + orderPerson.suffix> <#else> <#assign toName = postalFields.toName?default("")> <#-- generic address information --> <#-- credit card fields --> <#if paymentMethodType == "CC"> <#if !creditCard?has_content> <#assign creditCard = requestParameters> <#-- eft fields --> <#if paymentMethodType =="EFT"> <#if !eftAccount?has_content> <#assign eftAccount = requestParameters>

${uiLabelMap.CommonToName}
  disabled="disabled"/>
${uiLabelMap.CommonAttentionName}
  disabled="disabled"/>
${uiLabelMap.CommonAddressLine} 1
  disabled="disabled"/> *
${uiLabelMap.CommonAddressLine} 2
  disabled="disabled"/>
${uiLabelMap.CommonCity}
  disabled="disabled"/> *
${uiLabelMap.CommonStateProvince}
 
${uiLabelMap.CommonZipPostalCode}
  disabled="disabled"/> *
${uiLabelMap.CommonCountry}
  *

${uiLabelMap.AccountingCompanyNameCard}
 
${uiLabelMap.AccountingPrefixCard}
 
${uiLabelMap.AccountingFirstNameCard}
  *
${uiLabelMap.AccountingMiddleNameCard}
 
${uiLabelMap.AccountingLastNameCard}
  *
${uiLabelMap.AccountingSuffixCard}
 
${uiLabelMap.AccountingCardType}
  *
${uiLabelMap.AccountingCardNumber}
  *
${uiLabelMap.AccountingExpirationDate}
  <#assign expMonth = ""> <#assign expYear = ""> <#if creditCard?? && creditCard.expDate??> <#assign expDate = creditCard.expireDate> <#if (expDate?? && expDate.indexOf("/") > 0)> <#assign expMonth = expDate.substring(0,expDate.indexOf("/"))> <#assign expYear = expDate.substring(expDate.indexOf("/")+1)> *
${uiLabelMap.CommonDescription}
 

${uiLabelMap.AccountingNameAccount}
  *
${uiLabelMap.AccountingCompanyNameAccount}
 
${uiLabelMap.AccountingBankName}
  *
${uiLabelMap.AccountingRoutingNumber}
  *
${uiLabelMap.AccountingAccountType}
  *
${uiLabelMap.AccountingAccountNumber}
  *
${uiLabelMap.CommonDescription}
 
<#else> <#-- initial screen show a list of options --> <#if "Y" != requestParameters.createNew?default("")>



<#else>

${uiLabelMap.OrderViewPermissionError}