2015-09-04 11:39:20 +02:00
|
|
|
{% load i18n %}
|
2018-06-26 08:46:40 +02:00
|
|
|
{% block cell-content %}
|
2020-06-12 10:35:26 +02:00
|
|
|
{% if errors or items or not cell.hide_if_empty %}
|
2016-03-19 20:28:05 +01:00
|
|
|
{% if title %}<h2>{{ title|safe }}</h2>{% endif %}
|
|
|
|
<div>
|
2016-03-27 10:38:24 +02:00
|
|
|
{% if text %}{{ text|safe }}{% endif %}
|
2020-06-12 10:35:26 +02:00
|
|
|
{% if errors %}
|
|
|
|
<ul class="errorlist">
|
|
|
|
{% for error in errors %}
|
|
|
|
<li>{{ error }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
2015-09-04 11:39:20 +02:00
|
|
|
{% if items %}
|
2015-12-31 12:11:36 +01:00
|
|
|
<table class="invoices">
|
2015-09-04 11:39:20 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2016-03-29 11:50:58 +02:00
|
|
|
<th class="invoice-id">{% trans "Number" %}</th>
|
|
|
|
<th class="invoice-subject">{% trans "Label" %}</th>
|
|
|
|
<th class="invoice-creation-date">{% trans "Issue date" %}</th>
|
2020-02-25 14:47:20 +01:00
|
|
|
{% if with_payment_limit_date %}<th class="invoice-payment-limit-date">{% trans "Payment limit date" %}</th>{% endif %}
|
2016-03-29 11:50:58 +02:00
|
|
|
<th class="invoice-amount">{% trans "Amount" %}</th>
|
2020-03-03 10:25:03 +01:00
|
|
|
{% if with_amount_paid %}
|
|
|
|
<th class="invoice-amount-paid">{% trans "Amount already paid" %}</th>
|
|
|
|
{% endif %}
|
2015-09-03 16:03:44 +02:00
|
|
|
<td></td>
|
2015-09-04 11:39:20 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for item in items %}
|
2016-03-30 18:10:17 +02:00
|
|
|
<tr{% if item.no_online_payment_reason %} class='{{ item.no_online_payment_reason }}-invoice'{% endif %}>
|
2016-03-29 11:50:58 +02:00
|
|
|
<td class="invoice-id">{{ item.display_id }}</td>
|
|
|
|
<td class="invoice-subject">{{ item.subject }}</td>
|
|
|
|
<td class="invoice-creation-date">{{ item.creation_date|date:"SHORT_DATE_FORMAT" }}</td>
|
2020-02-25 14:47:20 +01:00
|
|
|
{% if with_payment_limit_date %}<td class="invoice-payment-limit-date">{{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }}</td>{% endif %}
|
2020-03-03 10:25:03 +01:00
|
|
|
{% if with_amount_paid %}
|
|
|
|
<td class="invoice-amount amount">{% if item.amount %}{% blocktrans with amount=item.amount|floatformat:"2" %}
|
|
|
|
{{ amount }}€
|
|
|
|
{% endblocktrans %}{% endif %}
|
|
|
|
</td>
|
|
|
|
<td class="invoice-amount-paid amount">{% if item.amount_paid %}{% blocktrans with amount=item.amount_paid|floatformat:"2" %}
|
|
|
|
{{ amount }}€
|
|
|
|
{% endblocktrans %}{% endif %}
|
|
|
|
</td>
|
|
|
|
{% else %}
|
2016-03-29 11:50:58 +02:00
|
|
|
<td class="invoice-amount amount">{% blocktrans with amount=item.total_amount|floatformat:"2" %}
|
2015-09-04 11:39:20 +02:00
|
|
|
{{ amount }}€
|
|
|
|
{% endblocktrans %}
|
|
|
|
</td>
|
2020-03-03 10:25:03 +01:00
|
|
|
{% endif %}
|
2016-10-11 10:15:19 +02:00
|
|
|
{% if item.regie.is_remote %}
|
2015-09-03 16:03:44 +02:00
|
|
|
<td>
|
2018-04-03 14:17:24 +02:00
|
|
|
<a href="{% url 'view-item' regie_id=item.regie.pk item_crypto_id=item.crypto_id %}?page={{ cell.page.pk }}" rel="popup" class="icon-view">{% trans "View" %}
|
2015-10-07 14:18:19 +02:00
|
|
|
{% if item.online_payment and item.amount >= item.regie.payment_min_amount %}{% trans "and pay" %}{% endif %}
|
2015-09-30 16:08:05 +02:00
|
|
|
</a>
|
2016-03-19 20:03:24 +01:00
|
|
|
{% if item.has_pdf %}
|
2016-07-20 18:20:41 +02:00
|
|
|
<br/><a href="{% url 'download-item-pdf' regie_id=item.regie.pk item_crypto_id=item.crypto_id %}" class="icon-pdf"
|
2016-03-19 20:03:24 +01:00
|
|
|
>{% trans "Download" %}</a>
|
2015-09-03 16:03:44 +02:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
2016-10-11 10:15:19 +02:00
|
|
|
{% endif %}
|
2015-09-04 11:39:20 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
{% trans "No items yet" %}
|
|
|
|
{% endif %}
|
2016-03-19 20:28:05 +01:00
|
|
|
</div>
|
2020-03-31 15:48:28 +02:00
|
|
|
{% endif %}
|
2018-06-26 08:46:40 +02:00
|
|
|
{% endblock %}
|