#IF(#FormError) #IF(#FormError_BankAccountHolder OR #FormError_BankAccountNo OR #FormError_BankCode OR #FormError_BankName)
{FillOutForm}
#ENDIF #ENDIF
{DirectDebit}
#WITH(#LineItemContainer.Payment) #WITH_ERROR(#FormError) #LOCAL("DefaultBankAccountHolder",#User.BillingAddress.BankAccountHolder) #LOOP(#User.Customers,0,0)#IF(#BillingAddress.BankAccountHolder)#SET("DefaultBankAccountHolder",#BillingAddress.BankAccountHolder)#ENDIF#ENDLOOP #ENDLOCAL #LOCAL("BillingCountry", #BillingAddress.CountryID)#LOCAL("ShopCountry", #Shop.Address.CountryID) #LOCAL("DefaultBankAccountNo",#User.BillingAddress.BankAccountNo) #LOOP(#User.Customers,0,0)#IF(#BillingAddress.BankAccountNo)#SET("DefaultBankAccountNo",#BillingAddress.BankAccountNo)#ENDIF#ENDLOOP #ENDLOCAL #LOCAL("DefaultBankCode",#User.BillingAddress.BankCode) #LOOP(#User.Customers,0,0)#IF(#BillingAddress.BankCode)#SET("DefaultBankCode",#BillingAddress.BankCode)#ENDIF#ENDLOOP #ENDLOCAL #ENDLOCAL#ENDLOCAL #LOCAL("DefaultBankName",#User.BillingAddress.BankName) #LOOP(#User.Customers,0,0)#IF(#BillingAddress.BankName)#SET("DefaultBankName",#BillingAddress.BankName)#ENDIF#ENDLOOP #ENDLOCAL
{BankAccountHolder} {MandatoryStar}
#IF(NOT #DEFINED(#BillingCountry) OR NOT #DEFINED(#ShopCountry)){BankAccountNo} (IBAN) #ELSIF(#BillingCountry EQ #ShopCountry){BankAccountNo} #ELSE IBAN #ENDIF {MandatoryStar}
#IF(NOT #DEFINED(#BillingCountry) OR NOT #DEFINED(#ShopCountry)){BankCode} (SWIFT) #ELSIF(#BillingCountry EQ #ShopCountry){BankCode} #ELSE SWIFT #ENDIF #IF(#IsBankCodeMandatory) {MandatoryStar} #ENDIF
{BankName} {MandatoryStar}
#ENDWITH_ERROR #ENDWITH {MandatoryFields} #WITH(#LineItemContainer.Payment) #IF (#IsHirePurchaseAllowed AND #HirePurchaseNoOfMonths)

{HirePurchase}

{SumHirePurchase}
{NumberOfMonths} #HirePurchaseNoOfMonths {Months}
{InstallmentAmount} #HirePurchaseInstallmentAmount[money]
{InterestRateValue} #HirePurchaseInterestRateValue[float]%
{EffectiveInterestRateValue} #HirePurchaseEffectiveInterestRateValue[float]%
{GrandTotal} #HirePurchaseGrandTotal[money]

#ENDIF #ENDWITH