{% extends "lingo/invoicing/print_document_base.html" %} {% load i18n lingo %} {% block document-label %}{{ invoice.label }}{% endblock %} {% block informations %}
{% trans "Invoice number:" %}
{{ invoice.formatted_number }}
{% trans "Date:" %}
{{ invoice.created_at|date }}
{% endblock %} {% block content %} {% for line in lines %} {% ifchanged line.user_external_id %} {% if not forloop.first %} {% endif %}

{{ line.user_name }}

{% if invoice.pool.campaign.invoice_model == 'middle' %} {% endif %} {% endifchanged %} {% if invoice.pool.campaign.invoice_model == 'middle' %} {% endif %} {% if line.details.check_type_label or line.details.status != 'absence' %} {% endif %} {% endfor %}
{% trans "Services" %}{% trans "Details" %}{% trans "UA" context 'unit amount' %} {% trans "QTY" context 'quantity' %} {% trans "TA" context 'total amount' %}
{% if line.details %} {% ifchanged line.user_external_id line.label %} {{ line.label }}
{% if line.agenda %} {{ line.agenda.label }}
{% endif %} {% endifchanged %} {% else %} {{ line.event_date|date:"d/m/Y" }} - {{ line.label }}
{% if line.agenda %} {{ line.agenda.label }}
{% endif %} {% endif %} {% if line.details.check_type_label %} {{ line.details.check_type_label }} {% elif line.details.status == 'absence' and invoice.pool.campaign.invoice_model == 'middle' %} {% trans "Absence" %} {% endif %}
{% if line.details.dates and not line.agenda.partial_bookings %} {% for d in line.details.dates %}{{ d|parse_date|date:"Dd" }}{% if not forloop.last %}, {% endif %}{% endfor %} {% endif %} {% blocktrans with amount=line.unit_amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %} {{ line.quantity|floatformat }} {% blocktrans with amount=line.total_amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %}
{% if invoice.basket_set.exists %} {% trans "Total amount:" %} {% else %} {% trans "Total amount to be paid before:" %} {{ invoice.date_payment_deadline }} {% endif %} {% blocktrans with amount=invoice.total_amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %}
{% if regie.invoice_custom_text %}
{{ regie.invoice_custom_text|safe }}
{% endif %} {% if invoice.pool.campaign.invoice_model == 'full' and lines_for_details %}

{% trans "Detail of service days" %}

{% for line in lines_for_details %} {% ifchanged line.user_external_id %} {% if not forloop.first %} {% endif %}

{{ line.user_name }}

{% endifchanged %} {% endfor %} {% endif %} {% endblock %}
{% trans "Services" %} {% trans "Details" %}
{% ifchanged line.user_external_id line.label %} {{ line.label }}
{% if line.agenda %} {{ line.agenda.label }}
{% endif %} {% endifchanged %} {% if line.details.check_type_label %} {{ line.details.check_type_label }} {% elif line.details.status == 'absence' %} {% trans "Absence" %} {% endif %}
{% for d in line.details.dates %}{{ d|parse_date|date:"Dd" }}{% if not forloop.last %}, {% endif %}{% endfor %}