{% extends "base.html" %} {% block main %}

Welcome, {{ authuser.name }}

{# Show the users current balance #}

Your balance: {{ authuser.balance|chf }}

Deposit CHF 1 Deposit CHF 10 {% if authuser.logout_after_purchase %} Logout after purchase {% else %} Logout after purchase {% endif %}
0.00
{% for i in [('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8'), ('9', '9'), ('del', '✗'), ('0', '0'), ('ok', '✓')] %}
{{ i.1 }}
{% endfor %}
    {% for user in (users if user != authuser) %}
  • {{ user.name }}
  • {% endfor %}

{% for product in products %} {# Show an item per product, consisting of the name, image, price and stock, triggering a purchase on click #}
{% if product.custom_price %} {% else %} {% endif %}
{{ product.name }}
{% if product.custom_price %} Custom Price {% else %} {% if authuser.is_member %} {{ product.price_member|chf }} {% else %} {{ product.price_non_member|chf }} {% endif %} {% endif %}
Picture of {{ product.name }} {% set pstock = stock.get_stock(product) %} {% if pstock is not none %}
{{ pstock }}
{% endif %}
{% endfor %}
{{ super() }} {% endblock %} {% block eanwebsocket %} let eaninput = document.getElementById("a-buy-ean" + e.data); if (eaninput === null) { document.location = "?ean=" + e.data; } else { eaninput.click(); } {% endblock %}