Implement adding orders to the cart and viewing it
This commit is contained in:
@@ -1,16 +1,30 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="entry-app"></div>
|
||||
<script src="{{ url_for('static', filename='entry.js') }}"></script>
|
||||
<script>
|
||||
Elm.Entry.init({
|
||||
node: document.querySelector('.entry-app'),
|
||||
flags: {
|
||||
locations: {{ to_json(locations) | safe }},
|
||||
groups: {{ to_json(groups) | safe }},
|
||||
taxGroups: {{ to_json(tax_groups) | safe }}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<a href="/entry/new-order">Neuer Auftrag</a>
|
||||
<h2>Aufträge</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Barcode</th>
|
||||
<th>Name</th>
|
||||
<th>Eingekauft</th>
|
||||
<th>Gruppen-ID</th>
|
||||
<th>Raum-ID</th>
|
||||
<th>Steuergruppen-ID</th>
|
||||
<th>EK-Preis (Netto)</th>
|
||||
<th>VK-Preis (Brutto)</th>
|
||||
</tr>
|
||||
{% for cart_item in cart %}
|
||||
<tr>
|
||||
<td><code>{{ cart_item.barcode }}</code></td>
|
||||
<td>{{ cart_item.name }}</td>
|
||||
<td class="--align-right">{{ cart_item.sales_units }}</td>
|
||||
<td class="--align-right">{{ cart_item.group_id }}</td>
|
||||
<td class="--align-right">{{ cart_item.location_id }}</td>
|
||||
<td class="--align-right">{{ cart_item.tax_group_id }}</td>
|
||||
<td class="--align-right">{{ format_currency(cart_item.net_unit_price) }}</td>
|
||||
<td class="--align-right">{{ format_currency(cart_item.gross_unit_price) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="entry-app"></div>
|
||||
<script src="{{ url_for('static', filename='entry.js') }}"></script>
|
||||
<script>
|
||||
Elm.Entry.init({
|
||||
node: document.querySelector('.entry-app'),
|
||||
flags: {
|
||||
locations: {{ to_json(locations) | safe }},
|
||||
groups: {{ to_json(groups) | safe }},
|
||||
taxGroups: {{ to_json(tax_groups) | safe }}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user