{% load i18n %} {% trans "Demat:" %} {{ invoice.payer_demat|yesno }} {% trans "Direct debit:" %} {{ invoice.direct_debit|yesno }} {% if not pool.draft %} {% trans "Publication date:" %} {{ invoice.date_publication|date:"d/m/Y" }} {% trans "Payment deadline:" %} {{ invoice.date_payment_deadline|date:"d/m/Y" }} {% trans "Due date:" %} {{ invoice.date_due|date:"d/m/Y" }} {% if invoice.date_debit %} {% trans "Debit date:" %} {{ invoice.date_debit|date:"d/m/Y" }} {% endif %} {% endif %} {% for line in object_list %} {% if line.pool %} {% url 'lingo-manager-invoicing-pool-journal' regie_pk=regie.pk pk=line.pool.campaign_id pool_pk=line.pool.pk as journal_url %} {% endif %} {% ifchanged line.user_external_id %} {% if line.pool %} {{ line.user_name }} {% else %} {{ line.user_name }} {% endif %} {% trans "Description" %} {% trans "Accounting code" %} {% trans "Amount" %} {% trans "Quantity" %} {% trans "Subtotal" %} {% endifchanged %} {% ifchanged line.user_external_id line.activity_label %} {% if line.activity_label or not forloop.first %} {{ line.activity_label|default:" " }} {% endif %} {% endifchanged %} {% if line.pool %} {{ line.label }} {% elif line.form_url %} {{ line.label }} {% else %} {{ line.label }} {% endif %} {% if not line.details.partial_bookings %} {% if line.details.check_type_label %} {{ line.details.check_type_label }} {% elif line.details.status == 'presence' %} {% trans "Presence" %} {% elif line.details.status == 'absence' %} {% trans "Absence" %} {% endif %} {% endif %} {% if line.display_description %} {{ line.description }} {% endif %} {{ line.accounting_code }} {% blocktrans with amount=line.unit_amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %} {{ line.quantity|floatformat }} {% blocktrans with amount=line.total_amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %} {% if not pool.draft and line.total_amount and not invoice.cancelled_at %} {% endif %} {% if not pool.draft and line.total_amount and not invoice.cancelled_at %} {% trans "Payments" %} {% trans "Payment" context 'payment' %} {% trans "Date" context 'payment' %} {% trans "Type" context 'payment' %} {% trans "Amount" %} {% for invoice_line_payment in line.invoicelinepayment_set.all %} {{ invoice_line_payment.payment.formatted_number }} {{ invoice_line_payment.payment.created_at|date:"DATETIME_FORMAT" }} {{ invoice_line_payment.payment.payment_type.label }} {% blocktrans with amount=invoice_line_payment.amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %} {% empty %} {% trans "No payments for this line" %} {% endfor %} {% endif %} {% endfor %} {% if not pool.draft %} {% if not invoice.cancelled_at %} {% trans "Payments" %} {% trans "Payment" context 'payment' %} {% trans "Date" context 'payment' %} {% trans "Type" context 'payment' %} {% trans "Amount" %} {% for invoice_payment in invoice.get_invoice_payments %} {{ invoice_payment.payment.formatted_number }} {{ invoice_payment.payment.created_at|date:"DATETIME_FORMAT" }} {{ invoice_payment.payment.payment_type.label }} {% blocktrans with amount=invoice_payment.amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %} {% empty %} {% trans "No payments for this invoice" %} {% endfor %} {% if invoice.paid_amount %} {% trans "Paid amount:" %} {% blocktrans with amount=invoice.paid_amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %} {% endif %} {% if invoice.remaining_amount or invoice.total_amount == 0 %} {% trans "Remaining amount:" %} {% blocktrans with amount=invoice.remaining_amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %} {% if not invoice.paid_amount and not pool and user_can_invoice %} {% trans "Cancel invoice" %} {% endif %} {% else %} {% trans "Payments certificate:" %} {% trans "download" %} {% endif %} {% else %} {% for label, value in invoice.get_cancellation_info %} {% blocktrans %}{{ label }}:{% endblocktrans %} {{ value }} {% endfor %} {% endif %} {% endif %}