{#

Notice for plugins and theme developer:

This template can be extended over sw_extends.
The blocks from the templates in the /includes folder can be overwritten directly in this template

#}

{% sw_extends '@Framework/documents/base.html.twig' %}

{% block document_title_tag %}
    {% trans with {'%invoiceNumber%': config.custom.invoiceNumber} %}document.invoiceHeadline{% endtrans %}
{% endblock %}

{% block document_headline %}
    <h1 class="headline">
        {% trans with {'%invoiceNumber%': config.custom.invoiceNumber} %}document.invoiceHeadline{% endtrans %}
    </h1>
{% endblock %}

{% block document_footer_fourth_column %}
    {% if config.executiveDirector %}
        <ul>
            {{ block('document_footer_ceo') }}
            {{ block('document_footer_ceo_name') }}
            {% block document_footer_company_phone_number %}
                <li>{{ config.companyPhone }}</li>
            {% endblock %}
        </ul>
    {% else %}
        {{ parent() }}
    {% endif %}
{% endblock %}

{% block document_payment_shipping_inner %}
    {{ parent() }}

    {% block document_intra_community %}
        {% if config.intraCommunityDelivery %}
            {{ 'document.intraCommunity'|trans|sw_sanitize }}
        {% endif %}
    {% endblock %}
{% endblock %}

{% set shippingAddress = order.deliveries.first.getShippingOrderAddress %}

{% block shipping_address %}
    {% if config.displayDivergentDeliveryAddress %}
        <div class="shipping-address-container">
            <br><p class="bold">{{ 'document.shippingAddress'|trans|sw_sanitize }}</p>
            {{ shippingAddress.company }}
            {{ shippingAddress.department }} <br>
            {{ shippingAddress.firstName }} {{ shippingAddress.lastName }} <br>
            {{ shippingAddress.street }}<br>
            {{ shippingAddress.zipcode }} {{ shippingAddress.city }}<br>
            {{ shippingAddress.country.translated.name }}<br>
            {{ shippingAddress.phoneNumber }}
        </div>
    {% else %}
        {{ parent() }}
    {% endif %}
{% endblock %}
