{% extends 'AppBundle:Mailer:layout.html.twig' %}

{% block body %}
    Firma: {% if application.company is empty %} - {% else %} {{ application.company }} {% endif %}<br>
    Nazwisko: {{ application.fullName }}<br>
    E-mail: {{ application.email }}<br>
    {% if application.phone %}Telefon: {% if application.phone is empty %} - {% else %} {{ application.phone }} {% endif %}<br>{% endif %}
    Załadunek: {{ application.connection.loading.name }}<br>
    Odbiór: {{ application.connection.unloading.name }}<br>
    Waga: {{ application.weight }} kg<br>
    Objętość: {{ application.volume }} m3<br>
    {% set transportCost = application.documentary + application.customs %}

    {% if application.connection.loading.country == 'Polska' %}
        {% set transportCost = transportCost + application.warehouse|round(0, 'floor') %}
    {% else %}
        {% set transportCost = transportCost + application.thc|round(0, 'floor') + application.isps|round(0, 'floor')  %}
    {% endif %}
    Opłata dokumentacyjna: {{ application.documentary ? 'TAK' : 'NIE' }}<br>
    THC: {{ application.thc ? 'TAK' : 'NIE' }}<br>
    Podjecie towaru z magazynu: {{ application.isps ? 'TAK' : 'NIE' }}<br>
    Odprawa Celna: {{ application.customs ? 'TAK' : 'NIE' }}<br>
    {% if application.connection.useeuro == true %}
    Koszt USD: {{application.connectionCost|round}} USD<br>
    Koszt EURO: {{transportCost|round}} EURO<br>
    Koszt PLN: {{ ((application.connectionCost * application.exchangeRate)|round )+(( transportCost * application.exchangeRateeuro)|round) }} PLN<br>
    {% else %}
    Koszt USD: {{ application.cost|round(0, 'floor') }} USD<br>
    Koszt PLN: {{ (application.cost * application.exchangeRate)|round }} PLN<br>
    {% endif %}


    Chcę otrzymać ofertę na dodatkowy transport lądowy: {{ application.transport ? 'TAK' : 'NIE' }}<br>

    {% set url = url('app.order.preview', { application: application.id }) %}
    Podgląd zamówienia: <strong><a href="{{ url }}">{{ url }}</a></strong>
{% endblock %}
