{% extends "core/base.jinja" %} {% from "core/macros.jinja" import user_mini_profile, user_subscription %} {% macro add_product(id, content, class="") %}
{% csrf_token %}
{% endmacro %} {% macro del_product(id, content, class="") %}
{% csrf_token %}
{% endmacro %} {% block title %} {{ counter }} {% endblock %} {% block content %}

{{ counter }}

{% trans %}Customer{% endtrans %}
{{ user_mini_profile(customer.user) }} {{ user_subscription(customer.user) }}

{% trans %}Amount: {% endtrans %}{{ customer.amount }} €

{% csrf_token %} {% trans %}Add a student card{% endtrans %} {% if request.session['not_valid_student_card_uid'] %}

{% trans %}This is not a valid student card UID{% endtrans %}

{% endif %}
{% trans %}Registered cards{% endtrans %}
{% if customer.student_cards.exists() %} {% else %} {% trans %}No card registered{% endtrans %} {% endif %}
{% trans %}Selling{% endtrans %}
{% if request.session['too_young'] %}

{% trans %}Too young for that product{% endtrans %}

{% endif %} {% if request.session['not_allowed'] %}

{% trans %}Not allowed for that product{% endtrans %}

{% endif %} {% if request.session['no_age'] %}

{% trans %}No date of birth provided{% endtrans %}

{% endif %} {% if request.session['not_enough'] %}

{% trans %}Not enough money{% endtrans %}

{% endif %}
{% csrf_token %}

{% trans %}Basket: {% endtrans %}

{% trans %}Total: {% endtrans %}{{ "%0.2f"|format(basket_total) }} €

{% if request.session['too_young'] %}

{% trans %}Too young for that product{% endtrans %}

{% endif %} {% if request.session['not_allowed'] %}

{% trans %}Not allowed for that product{% endtrans %}

{% endif %} {% if request.session['no_age'] %}

{% trans %}No date of birth provided{% endtrans %}

{% endif %} {% if request.session['not_enough'] %}

{% trans %}Not enough money{% endtrans %}

{% endif %}
{% csrf_token %}
{% csrf_token %}
{% if counter.type == 'BAR' %}
{% trans %}Refilling{% endtrans %}
{% csrf_token %} {{ refill_form.as_p() }}
{% endif %}
{% for category in categories.keys() -%}
{{ category }}
{% for p in categories[category] -%} {% set file = None %} {% if p.icon %} {% set file = p.icon.url %} {% else %} {% set file = static('core/img/na.gif') %} {% endif %} {% set prod = '%s
%s €
%s
' % (p.name, file, p.selling_price, p.code) %} {{ add_product(p.id, prod, "form_button") }} {%- endfor %}
{%- endfor %}
{% endblock %} {% block script %} {{ super() }} {% endblock %}