cash_register_summary.jinja 907 Bytes
Newer Older
Skia's avatar
Skia committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{% extends "core/base.jinja" %}

{% block title %}
{% trans obj=object %}Edit {{ obj }}{% endtrans %}
{% endblock %}

{% block content %}
<h2>{% trans %}Make a cash register summary{% endtrans %}</h2>
<form action="" method="post" id="cash_summary_form">
    {% csrf_token %}
    {% for field in form %}
    <p>
    {% if field.name[:5] == "check" and field.name[8:] == "value" %}
        {% set name = field.name[:7] + "_quantity" %}
    {{ field.errors }}<label for="{{ field.name }}">{{ field.label }}</label> {{ field }}
    {{ form[name].errors }}<label for="{{ form[name].name }}">{{ form[name].label }}</label> {{ form[name] }}
    {% elif field.name[:5] != "check" %}
    {{ field.errors }}<label for="{{ field.name }}">{{ field.label }}</label> {{ field }}
    {% endif %}
    </p>
    {% endfor %}
    <p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
{% endblock %}