{% load i18n crispy_forms_tags %} {# Vouchers-Tab für VoucherGroup #} {# Existing Vouchers List #}

{% trans "Existing Vouchers" %}

{# Search and filter for vouchers #}
{% if vouchers %} {# Filter info #} {% if voucher_search or usage_filter %}
{% blocktrans count counter=vouchers|length %} {{ counter }} voucher found {% plural %} {{ counter }} vouchers found {% endblocktrans %} {% if voucher_search %} {% trans "for" %} "{{ voucher_search }}" {% endif %} {% if usage_filter %} {% if usage_filter == 'used' %} ({% trans "used only" %}) {% elif usage_filter == 'unused' %} ({% trans "unused only" %}) {% endif %} {% endif %} {% trans "Clear filters" %}
{% endif %}
{% csrf_token %}
{% for voucher in vouchers %} {% endfor %}
{% trans "Number" %} {% trans "Kind" %} {% trans "Value" %} {% trans "Start Date" %} {% trans "End Date" %} {% trans "Used" %}
{{ voucher.number }} {% if voucher.kind_of == 0 %} {% trans "Absolute" %} {% else %} {% trans "Percentage" %} {% endif %} {% if voucher.kind_of == 0 %} {{ voucher.value|floatformat:2 }} € {% else %} {{ voucher.value|floatformat:2 }} % {% endif %} {{ voucher.start_date|date:"d.m.Y"|default:"-" }} {{ voucher.end_date|date:"d.m.Y"|default:"-" }} {% if voucher.used_amount %} {% else %} {% endif %}
{% else %}
{% trans "No vouchers found." %}
{% endif %}
{# Add New Vouchers Form #}

{% trans "Add New Vouchers" %}

{% csrf_token %} {{ form|crispy }}