{% 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 }} €

{% 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 t in categories -%} {%- if counter.products.filter(product_type=t).exists() -%}
{{ t }}
{% for p in counter.products.filter(product_type=t).all() -%} {% 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 %}
{%- endif -%} {%- endfor %}
{% endblock %} {% block script %} {{ super() }} {% endblock %}