{% load i18n %} {% if credit.label or credit.previous_invoice %} {{ credit.label }}{% if credit.previous_invoice %}{% if credit.label %} - {% endif %}{% trans "Initial invoice number:" %} {{ credit.previous_invoice.formatted_number }}{% endif %} {% endif %} {% if not pool.draft %} {% trans "Publication date:" %} {{ credit.date_publication|date:"d/m/Y" }} {% 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 %} {{ line.description }} {{ 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 %} {% endfor %} {% if not pool.draft %} {% if not credit.cancelled_at %} {% trans "Assignments" %} {% trans "Payment" context 'payment' %} {% trans "Date" context 'payment' %} {% trans "Amount" %} {% for assignment in credit.creditassignment_set.all %} {% if assignment.payment %} {{ assignment.payment.formatted_number }} {{ assignment.payment.created_at|date:"DATETIME_FORMAT" }} {% elif assignment.invoice %} {% trans "Pending..." %} {% else %} {{ assignment.refund.formatted_number }} ({% trans "Refund" %}) {{ assignment.refund.created_at|date:"DATETIME_FORMAT" }} {% endif %} {% blocktrans with amount=assignment.amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %} {% empty %} {% trans "No assignments for this credit" %} {% endfor %} {% if credit.assigned_amount %} {% trans "Assigned amount:" %} {% blocktrans with amount=credit.assigned_amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %} {% endif %} {% if credit.remaining_amount %} {% trans "Remaining amount to assign:" %} {% blocktrans with amount=credit.remaining_amount|floatformat:"2" %}{{ amount }}€{% endblocktrans %} {% endif %} {% else %} {% for label, value in credit.get_cancellation_info %} {% blocktrans %}{{ label }}:{% endblocktrans %} {{ value }} {% endfor %} {% endif %} {% endif %}