{% extends "pretixcontrol/event/settings_base.html" %} {% load i18n %} {% load bootstrap3 %} {% load static %} {% block inside %}

{% trans "Invoicing (PT)" %}

{% blocktrans trimmed %} Pick the invoicing provider to issue invoice-receipts with once payment is confirmed, and configure its API access below. {% endblocktrans %}

{% comment %} settings.js is a static file (CSP), so its user-facing strings are handed to it translated, as data-* attributes on the form. {% endcomment %}
{% csrf_token %} {% bootstrap_form_errors select_form %} {% comment %} The provider field is rendered by hand as logo cards (radio inputs, so it still posts as ptinvoicing_provider); the rest of the form renders whole. {% endcomment %}
{% for card in provider_cards %} {% endfor %}
{{ select_form.ptinvoicing_provider.help_text }}
{% comment %} The prefix is rendered by hand too, so the note about the selected provider's reference limit sits in its own element for settings.js to keep current as the admin types (the server renders it for the saved provider and prefix). {% endcomment %} {% with field=select_form.ptinvoicing_reference_prefix %}
{{ field }} {% for error in field.errors %} {{ error }} {% endfor %} {{ field.help_text }} {{ select_form.prefix_note }}
{% endwith %} {% bootstrap_form select_form layout="horizontal" exclude="ptinvoicing_provider,ptinvoicing_reference_prefix" %}
{% trans "E-mail" %} {% bootstrap_form_errors email_form %} {% bootstrap_form email_form layout="horizontal" %}
{% for block in provider_blocks %}
{{ block.label }} {% if not block.provider.in_use %} {% comment %} Picking a provider card only shows its settings; nothing is issued through it until it's saved with everything it needs (Moloni's company and series can only be picked once connected) — a Save the admin can easily miss. {% endcomment %}
{% blocktrans trimmed with provider=block.label %} Not in use yet: fill in the {{ provider }} settings below, then click Save. No documents are issued through {{ provider }} until you do. {% endblocktrans %}
{% endif %} {% if block.provider.settings_template %} {% include block.provider.settings_template with provider=block.provider %} {% endif %} {% bootstrap_form_errors block.form %} {% bootstrap_form block.form layout="horizontal" exclude=block.form.table_fields %} {% if block.form.payment_method_rows %} {% include "pretix_ptinvoicing/control/payment_methods.html" with form=block.form %} {% endif %}
{% endfor %}
{% endblock %}