mirror of
https://github.com/ae-utbm/sith.git
synced 2025-04-09 07:26:24 +00:00
81 lines
2.3 KiB
Django/Jinja
81 lines
2.3 KiB
Django/Jinja
{% extends "core/user_base.jinja" %}
|
|
|
|
{% block title %}
|
|
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %}
|
|
{% endblock %}
|
|
|
|
{% block infos %}
|
|
<h3>{% trans %}User account{% endtrans %}</h3>
|
|
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
|
|
<h4>{% trans %}Refillings{% endtrans %}</h4>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<td>{% trans %}Date{% endtrans %}</td>
|
|
<td>{% trans %}Barman{% endtrans %}</td>
|
|
<td>{% trans %}Amount{% endtrans %}</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for i in customer.refillings.all() %}
|
|
<tr>
|
|
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
|
|
<td>{{ i.operator }}</td>
|
|
<td>{{ i.amount }} €</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<h4>{% trans %}Buyings{% endtrans %}</h4>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<td>{% trans %}Date{% endtrans %}</td>
|
|
<td>{% trans %}Barman{% endtrans %}</td>
|
|
<td>{% trans %}Product{% endtrans %}</td>
|
|
<td>{% trans %}Quantity{% endtrans %}</td>
|
|
<td>{% trans %}Total{% endtrans %}</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for i in customer.buyings.all() %}
|
|
<tr>
|
|
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
|
|
<td>{{ i.seller }}</td>
|
|
<td>{{ i.product }}</td>
|
|
<td>{{ i.quantity }}</td>
|
|
<td>{{ i.quantity * i.unit_price }} €</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<h4>{% trans %}Invoices{% endtrans %}</h4>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<td>{% trans %}Date{% endtrans %}</td>
|
|
<td>{% trans %}Items{% endtrans %}</td>
|
|
<td>{% trans %}Amount{% endtrans %}</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for i in customer.user.invoices.all() %}
|
|
<tr>
|
|
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
|
|
<td>
|
|
<ul>
|
|
{% for it in i.items.all() %}
|
|
<li>{{ it.product_name }} - {{ it.product_unit_price }} €</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</td>
|
|
<td>{{ i.get_total() }} €</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|
|
|
|
|
|
|