Sith/club/templates/club/club_sellings.jinja

61 lines
2.2 KiB
Django/Jinja
Raw Normal View History

2016-09-08 01:29:49 +00:00
{% extends "core/base.jinja" %}
{% from 'core/macros.jinja' import user_profile_link, paginate %}
2016-09-08 01:29:49 +00:00
{% block content %}
<h3>{% trans %}Sellings{% endtrans %}</h3>
<form action="?page=1" method="post">
2016-09-08 01:29:49 +00:00
{% csrf_token %}
{{ form }}
<p><input type="submit" value="{% trans %}Show{% endtrans %}" /></p>
2016-11-07 21:05:09 +00:00
<p><input type="submit" value="{% trans %}Download as cvs{% endtrans %}" formaction="{{ url('club:sellings_csv', club_id=object.id) }}"/></p>
2016-09-08 01:29:49 +00:00
</form>
<p>
2016-10-03 11:55:20 +00:00
{% trans %}Quantity: {% endtrans %}{{ total_quantity }} {% trans %}units{% endtrans %}<br/>
2017-01-05 14:48:06 +00:00
{% trans %}Total: {% endtrans %}{{ total }} €<br/>
2017-01-05 17:02:02 +00:00
{% trans %}Benefit: {% endtrans %}{{ benefit }}
2016-09-08 01:29:49 +00:00
</p>
<table>
<thead>
<tr>
<td>{% trans %}Date{% endtrans %}</td>
<td>{% trans %}Counter{% endtrans %}</td>
<td>{% trans %}Barman{% endtrans %}</td>
<td>{% trans %}Customer{% endtrans %}</td>
<td>{% trans %}Label{% endtrans %}</td>
<td>{% trans %}Quantity{% endtrans %}</td>
<td>{% trans %}Total{% endtrans %}</td>
<td>{% trans %}Payment method{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for s in result %}
<tr>
<td>{{ s.date|localtime|date(DATETIME_FORMAT) }} {{ s.date|localtime|time(DATETIME_FORMAT) }}</td>
<td>{{ s.counter }}</td>
2016-09-29 16:17:44 +00:00
{% if s.seller %}
2016-09-08 01:29:49 +00:00
<td><a href="{{ s.seller.get_absolute_url() }}">{{ s.seller.get_display_name() }}</a></td>
2016-09-29 16:17:44 +00:00
{% else %}
<td></td>
{% endif %}
{% if s.customer %}
2016-09-08 01:29:49 +00:00
<td><a href="{{ s.customer.user.get_absolute_url() }}">{{ s.customer.user.get_display_name() }}</a></td>
2016-09-29 16:17:44 +00:00
{% else %}
<td></td>
{% endif %}
2016-09-08 01:29:49 +00:00
<td>{{ s.label }}</td>
<td>{{ s.quantity }}</td>
<td>{{ s.quantity * s.unit_price }} €</td>
<td>{{ s.get_payment_method_display() }}</td>
{% if s.is_owned_by(user) %}
<td><a href="{{ url('counter:selling_delete', selling_id=s.id) }}">{% trans %}Delete{% endtrans %}</a></td>
{% endif %}
2016-09-08 01:29:49 +00:00
</tr>
{% endfor %}
</tbody>
</table>
{{ paginate(result, paginator) }}
2016-09-08 01:29:49 +00:00
{% endblock %}