{% include 'feedback.html.twig' with {'error': error, 'app': app } %}

{{ 'invoice.guest'|trans }} 

{{ invoice.salutation }}

{{ 'invoice.number'|trans }}
{{ invoice.firstname }} {{ invoice.lastname }} {% if invoice.company is not empty %}
{{ invoice.company }} {% endif %}
{{ invoice.number }}
{{ invoice.address }}
{{ 'invoice.date'|trans }}
{% if invoice.country is not empty %}{{ invoice.country }}-{% endif %}{{ invoice.zip }} {{ invoice.city }} {% if invoice.phone is not empty %}
{{ invoice.phone }} {% endif %} {% if invoice.email is not empty %}
{{ invoice.email }} {% endif %}
{{ invoice.date|date('d.m.Y') }}
{# variable that contains the status whether prices are used that includes vat and does not include vats this will lead to price sums that are displayed incorrect #} {% set lastIncludesVat = null %} {% set vatWarning = false %} {% for appartment in invoice.appartments %} {# check whether there are different prices used, e.g. one uses uses includes vat and one not #} {% if lastIncludesVat is not null and lastIncludesVat != appartment.includesVat %} {% set vatWarning = true %} {% endif %} {% set lastIncludesVat = appartment.includesVat %} {% endfor %}
{{ 'invoice.position.appartment'|trans }} {{ 'invoice.position.amount'|trans }} {{ 'invoice.price.single'|trans }} {{ 'invoice.vat'|trans }} {{ 'invoice.price.total'|trans }} {{ 'invoice.action'|trans }}
{{ appartment.description }} ({{ 'invoice.appartment.persons'|trans({'%count%': appartment.persons }) }})
{{ appartment.startDate|date('d.m.Y') }} - {{ appartment.endDate|date('d.m.Y') }}
{{ appartment.amount }} {{ appartment.price|number_format(2, ',', '.') }} {% if is_decimal_place_0(appartment.vat) %} {{ appartment.vat|number_format(0, ',', '.') }} {% else %} {{ appartment.vat|number_format(2, ',', '.') }} {% endif %} {{ appartment.totalPrice }}
{{ apartmentTotal|number_format(2, ',', '.') }}
{% for position in invoice.positions %} {# check whether there are different prices used, e.g. one uses uses includes vat and one not #} {% if lastIncludesVat is not null and lastIncludesVat != position.includesVat %} {% set vatWarning = true %} {% endif %} {% set lastIncludesVat = position.includesVat %} {% endfor %}
{{ 'invoice.position.additional'|trans }} {{ 'invoice.position.amount'|trans }} {{ 'invoice.price.single'|trans }} {{ 'invoice.vat'|trans }} {{ 'invoice.price.total'|trans }} {{ 'invoice.action'|trans }}
{{ position.description }} {{ position.amount }} {{ position.price|number_format(2, ',', '.') }} {% if is_decimal_place_0(position.vat) %} {{ position.vat|number_format(0, ',', '.') }} {% else %} {{ position.vat|number_format(2, ',', '.') }} {% endif %} {{ position.totalPrice }}
{{ miscTotal|number_format(2, ',', '.') }}
{{ 'invoice.containing.vat'|trans }}
{% for key, value in vats %} {% endfor %}
{% if is_decimal_place_0(key) %} {{ key|number_format(0, ',', '.') }} {% else %} {{ key|number_format(2, ',', '.') }} {% endif %} %:    {{ value.netto|number_format(2, ',', '.') }} €
{{ 'invoice.netto'|trans }}
{{ 'invoice.brutto'|trans }}
{{ (brutto-netto)|number_format(2, ',', '.') }} €
{{ brutto|number_format(2, ',', '.') }} €
{% if vatWarning %}
{{ 'invoice.vatwarning'|trans }}
{% endif %}
{{ 'invoice.paymentmeans.label'|trans }} 
{% if invoice.paymentMeans %}{{ invoice.paymentMeans.name|trans }}{% else %}-{% endif%}
{{ 'invoice.remark'|trans }} 
{%if invoice.remark %}{{ invoice.remark|nl2br }}{% else %}-{% endif%}
{{ 'button.export.pdf'|trans }} {% if is_granted('ROLE_ADMIN') %} {% endif %}
{% if is_granted('ROLE_ADMIN') %}
{{ 'invoice.delete.ask'|trans }}
{% endif %}