{% load i18n %} {% if configured %}

{% blocktrans trimmed with provider=provider.verbose_name %} Invoicing (PT) — {{ provider }} {% endblocktrans %}

{% if not invoice and not is_paid %}

{% trans "Invoices are only issued once the order is paid." %}

{% endif %} {% if invoice or is_paid %} {% comment %} Same shape as pretix's own "Payments" panel on this page: a table-condensed with one row per document and its own inline actions, rather than a details list per document — reads better once a credit note sits alongside the invoice. {% endcomment %}
{% if invoice %} {% if invoice.status == "error" and invoice.error_message %} {% endif %} {% elif is_paid %} {% endif %} {% if invoice.status == "success" %} {% if credit_note.status == "error" and credit_note.error_message %} {% endif %} {% endif %}
{% trans "Kind" %} {% trans "Status" %} {% trans "Document" %} {% trans "Last attempt" %}
{% trans "Invoice" %} {% if invoice.status == "success" %} {% trans "Issued" %} {% elif invoice.status == "error" %} {% trans "Error" %} {% else %} {% trans "Processing" %} {% endif %} {% if invoice.document_id %} {{ invoice.document_id }} {% if invoice.permanent_url %} · {% blocktrans trimmed with provider=provider.verbose_name %} Open at {{ provider }} {% endblocktrans %} {% endif %} {% else %}—{% endif %} {{ invoice.modified|date:"SHORT_DATETIME_FORMAT" }} {% blocktrans trimmed count attempts=invoice.attempts %} {{ attempts }} attempt {% plural %} {{ attempts }} attempts {% endblocktrans %} {% if invoice.status == "success" %} {% trans "Download PDF" %} {% elif is_paid %}
{% csrf_token %}
{% endif %}
{{ invoice.error_message }}
{% trans "Invoice" %} {% trans "No invoice issued for this order yet." %}
{% csrf_token %}
{% trans "Credit note" %} {% if credit_note.status == "success" %} {% trans "Issued" %} {% elif credit_note.status == "error" %} {% trans "Error" %} {% elif credit_note %} {% trans "Processing" %} {% else %}—{% endif %} {% if credit_note.document_id %} {{ credit_note.document_id }} {% if credit_note.permanent_url %} · {% blocktrans trimmed with provider=provider.verbose_name %} Open at {{ provider }} {% endblocktrans %} {% endif %} {% else %}—{% endif %} {% if credit_note %} {{ credit_note.modified|date:"SHORT_DATETIME_FORMAT" }} {% blocktrans trimmed count attempts=credit_note.attempts %} {{ attempts }} attempt {% plural %} {{ attempts }} attempts {% endblocktrans %} {% else %}—{% endif %} {% if credit_note.status == "success" %} {% trans "Download PDF" %} {% else %}
{% csrf_token %}
{% endif %}
{{ credit_note.error_message }}
{% endif %}
{% endif %}