{% load i18n %} {% load bootstrap3 %} {% load static %} {% comment %} The invoicing settings page itself, included by settings.html (an event's) and organizer_settings.html (an organizer's, whose values its events inherit): the two only differ in the pretix page they sit in, and in the note at the top. {% endcomment %}

{% 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 %} {% trans "Documentation" %}

{% if organizer_settings_url %}
{% blocktrans trimmed with url=organizer_settings_url %} This event starts from the organizer's invoicing settings. What you save here applies to this event only, and keeps applying even if the organizer's settings change later. {% endblocktrans %} {% if has_own_settings %} {% trans "Use the organizer's settings" %} {% endif %}
{% else %}
{% blocktrans trimmed %} These are the defaults for every event of this organizer: an event uses them until something else is saved on its own invoicing settings page. The plugin still has to be enabled on each event, and which payment method maps to which is set per event. {% endblocktrans %}
{% endif %} {% 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 %}