{% extends "email/plain/order_cust.html.twig" %}

{% block email_html_order_cust_paymentinfo %}
{% d3modcfgcheck modid="d3unzer" %}{% endd3modcfgcheck %}
{% if mod_d3unzer  %}{% set oPrePaymentData = order.getHeidelpayBankTransferData() %}
{% set easyCreditInformations = order.getHeidelpayEasyCreditInformations() %}
{% if is_object(oPrePaymentData) %}##########################################################

{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_INFOTEXT1" }) }}
{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_INFOTEXT2" }) }}

{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_ACCOUNTHOLDER" }) }} {{ oPrePaymentData.Holder }}
{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_IBAN" }) }} {{ oPrePaymentData.Iban }}
{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_BIC" }) }} {{ oPrePaymentData.Bic }}
{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_AMOUNT" }) }} {{ oPrePaymentData.Amount }} {{ oPrePaymentData.Currency }}
{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_REASON" }) }} {{ oPrePaymentData.Reference }}

##########################################################{% endif %}
{% if oPrePaymentData is iterable %}##########################################################

{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_INFOTEXT1" }) }}
{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_INFOTEXT2" }) }}

{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_ACCOUNTHOLDER" }) }} {{ oPrePaymentData.holder }}
{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_IBAN" }) }} {{ oPrePaymentData.iban }}
{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_BIC" }) }} {{ oPrePaymentData.bic }}
{{ translate({ ident: "D3UNZER_EMAIL_PREPAYMENT_AMOUNT" }) }} {{ oPrePaymentData.formattedAmount }} {{ oPrePaymentData.currency }}
{% if oPrePaymentData.descriptor %}{{ translate({ ident: "D3UNZER_THANKYOU_PREPAYMENT_REASON" }) }} {{ oPrePaymentData.descriptor }}{% endif %}
{% if oPrePaymentData.paymentReference %}{{ oPrePaymentData.paymentReference }}{% endif %}

##########################################################{% endif %}
{% if easyCreditInformations %}##########################################################
{{ translate({ ident: "D3UNZER_ORDER_EASYCREDIT_ACCRUINGINTEREST" }) }} {{ format_price(easyCreditInformations.criterion_easycredit_accruinginterest, { currency: currency }) }}
{{ translate({ ident: "D3UNZER_ORDER_EASYCREDIT_TOTALAMOUNT" }) }} {{ format_price(easyCreditInformations.criterion_easycredit_totalamount, { currency: currency }) }}
{{ translate({ ident: "D3UNZER_ORDER_EASYCREDIT_LINK" }) }}: {{ easyCreditInformations.criterion_easycredit_precontractinformationurl }}
##########################################################{% endif %}
{% endif %}
{{ parent() }}
{% endblock %}