67 lines
2.3 KiB
HTML
67 lines
2.3 KiB
HTML
{% extends 'billard/base.html' %}
|
|
|
|
{% block header %}
|
|
<meta http-equiv="refresh" content="3" />
|
|
{% endblock %}
|
|
|
|
{% block title %}Location Data{% endblock %}
|
|
|
|
{% block content %}
|
|
<form action="." method="post" id="location-form">
|
|
{% csrf_token %}
|
|
<div id="location-selector" class="alert">
|
|
<select class="form-control" form="location-form" name="location-selector" id="location-select">
|
|
{% for loc in locations %}
|
|
<option value="{{ loc.id }}"{% if loc.id == location_id %} selected{% endif %}>{{ loc.code }} - {{ loc.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</form>
|
|
{% if clients %}
|
|
{% for cli in clients %}
|
|
{% if cli.desk1_enable %}
|
|
<div class="col-md-6">
|
|
<div class="col-md-12 table-info alert {% with cli.accounting_1|last as last %}{% if last.time_to is None %}alert-info{% else %}alert-success{% endif %}{% endwith %}">
|
|
<h4 style="text-align: center">(1) {{ cli.desk1_name }}</h4>
|
|
{% if cli.accounting_1 %}
|
|
<table class="table">
|
|
{% for acc in cli.accounting_1 %}
|
|
<tr>
|
|
<td>{{ acc.time_from|date:"d.m.Y H:i:s" }}</td>
|
|
<td>{% if acc.time_to is not None %}{{ acc.time_to|date:"d.m.Y H:i:s" }}{% endif %}</td>
|
|
<td>{% if acc.prize is not None %}{{ acc.prize|floatformat:2 }}{% endif %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if cli.desk2_enable %}
|
|
<div class="col-md-6">
|
|
<div class="col-md-12 table-info alert {% with cli.accounting_2|last as last %}{% if last.time_to is None %}alert-info{% else %}alert-success{% endif %}{% endwith %}">
|
|
<h4 style="text-align: center">(2) {{ cli.desk2_name }}</h4>
|
|
{% if cli.accounting_2 %}
|
|
<table class="table">
|
|
{% for acc in cli.accounting_2 %}
|
|
<tr>
|
|
<td>{{ acc.time_from|date:"d.m.Y H:i:s" }}</td>
|
|
<td>{% if acc.time_to is not None %}{{ acc.time_to|date:"d.m.Y H:i:s" }}{% endif %}</td>
|
|
<td>{% if acc.prize is not None %}{{ acc.prize|floatformat:2 }}{% endif %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% else %}
|
|
<div class="col-md-12">
|
|
<div class="col-md-12 alert alert-danger">Keine Tische angelegt!</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
|