add checkboxes for accounting

This commit is contained in:
2018-02-15 15:58:55 +01:00
parent 7a2fed8ad0
commit 4d0cb78cb6
2 changed files with 23 additions and 22 deletions

View File

@@ -15,27 +15,30 @@
{{ pk }}
<table class="table">
<tr>
<th>Start-Datum:</th>
<th>Stop-Datum:</th>
<th>Preis Normal:</th>
<th>Preis Happy Hour:</th>
<th>Preis gesamt:</th>
</tr>
{% for acc in accounting %}
<tr>
<td>{{ acc.time_from }}</td>
<td>{{ acc.time_to }}</td>
<td>{{ acc.prize_normal }}</td>
<td>{{ acc.prize_hh }}</td>
<td>{{ acc.prize }}</td>
</tr>
{% endfor %}
</table>
<form action="confirm/" method="post" id="accounting">
{% csrf_token %}
<table class="table">
<tr>
<th></th>
<th>Start-Datum:</th>
<th>Stop-Datum:</th>
<th>Preis Normal:</th>
<th>Preis Happy Hour:</th>
<th>Preis gesamt:</th>
</tr>
{% for acc in accounting %}
<tr>
<td><input type="checkbox" name="list_acc_id" id="option{{ acc.id }}"
value={{ acc.id }} checked="checked"/></td>
<td>{{ acc.time_from }}</td>
<td>{{ acc.time_to }}</td>
<td>{{ acc.prize_normal }}</td>
<td>{{ acc.prize_hh }}</td>
<td>{{ acc.prize }}</td>
</tr>
{% endfor %}
</table>
<input type="hidden" name="location-selector" value="{{ location_id }}">
<input type="hidden" name="accountings" value="{{ acc_ids }}">
<button type="submit" class="btn btn-danger">Abrechnen</button>