2016-09-04 17:24:53 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
2016-07-17 10:38:02 +00:00
|
|
|
|
2016-09-06 19:47:15 +00:00
|
|
|
{% macro monthly(obj) %}
|
2016-10-16 00:47:21 +00:00
|
|
|
<div>
|
|
|
|
<table>
|
|
|
|
<thead>
|
2016-09-06 16:43:39 +00:00
|
|
|
<tr>
|
2016-10-16 00:47:21 +00:00
|
|
|
<td>{% trans %}Year{% endtrans %}</td>
|
|
|
|
<td>{% trans %}Month{% endtrans %}</td>
|
|
|
|
<td>{% trans %}Total{% endtrans %}</td>
|
2016-09-06 16:43:39 +00:00
|
|
|
</tr>
|
2016-10-16 00:47:21 +00:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for array in obj %}
|
|
|
|
{% for tuple in array %}
|
|
|
|
{% if tuple[0] != 0 %}
|
|
|
|
{% set link=url('core:user_account_detail', user_id=profile.id, year=tuple[1].year, month=tuple[1].month) %}
|
|
|
|
<tr>
|
|
|
|
<td><a href="{{ link }}">{{ tuple[1].year }}</a></td>
|
|
|
|
<td><a href="{{ link }}">{{ tuple[1]|date("E") }}</a></td>
|
|
|
|
<td><a href="{{ link }}">{{ tuple[0] }} €</a></td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2016-09-06 16:43:39 +00:00
|
|
|
{% endfor %}
|
2016-10-16 00:47:21 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2016-09-06 19:47:15 +00:00
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{% if customer %}
|
|
|
|
<h3>{% trans %}User account{% endtrans %}</h3>
|
|
|
|
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
|
2016-10-16 00:47:21 +00:00
|
|
|
<div id="drop">
|
2016-09-06 19:47:15 +00:00
|
|
|
{% if customer.refillings.exists() %}
|
2016-10-16 00:47:21 +00:00
|
|
|
{% if customer.buyings.exists() %}
|
|
|
|
<h5>{% trans %}Account buyings{% endtrans %}</h5>
|
|
|
|
{{ monthly(buyings_month) }}
|
|
|
|
{% endif %}
|
|
|
|
<h5>{% trans %}Refillings{% endtrans %}</h5>
|
|
|
|
{{ monthly(refilling_month) }}
|
|
|
|
{% endif %}
|
|
|
|
{% if customer.user.invoices.exists() %}
|
|
|
|
<h5>{% trans %}Eboutic invoices{% endtrans %}</h5>
|
|
|
|
{{ monthly(invoices_month) }}
|
|
|
|
{% endif %}
|
|
|
|
{% if etickets %}
|
|
|
|
<h4>{% trans %}Etickets{% endtrans %}</h4>
|
|
|
|
<div>
|
|
|
|
<ul>
|
|
|
|
{% for s in etickets %}
|
|
|
|
<li><a href="{{ url('counter:eticket_pdf', selling_id=s.id) }}">{{ s.quantity }} x {{ s.product.eticket }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2016-08-05 07:52:19 +00:00
|
|
|
{% else %}
|
|
|
|
<p>{% trans %}User has no account{% endtrans %}</p>
|
|
|
|
{% endif %}
|
2016-07-17 10:38:02 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2016-10-16 00:47:21 +00:00
|
|
|
{% block script %}
|
|
|
|
{{ super() }}
|
|
|
|
<script>
|
|
|
|
$(function(){
|
|
|
|
$("#drop").accordion();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
2016-07-17 10:38:02 +00:00
|
|
|
|
|
|
|
|