combo/combo/apps/lingo/templates/lingo/combo/items.html

72 lines
2.6 KiB
HTML

{% load i18n %}
{% block cell-content %}
{% if errors or items or not cell.hide_if_empty %}
{% if title %}<h2>{{ title|safe }}</h2>{% endif %}
<div>
{% if text %}{{ text|safe }}{% endif %}
{% if errors %}
<ul class="errorlist">
{% for error in errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{% if items %}
<table class="invoices">
<thead>
<tr>
<th class="invoice-id">{% trans "Number" %}</th>
<th class="invoice-subject">{% trans "Label" %}</th>
<th class="invoice-creation-date">{% trans "Issue date" %}</th>
{% if with_payment_limit_date %}<th class="invoice-payment-limit-date">{% trans "Payment limit date" %}</th>{% endif %}
<th class="invoice-amount">{% trans "Amount" %}</th>
{% if with_amount_paid %}
<th class="invoice-amount-paid">{% trans "Amount already paid" %}</th>
{% endif %}
<td></td>
</tr>
</thead>
<tbody>
{% for item in items %}
<tr{% if item.no_online_payment_reason %} class='{{ item.no_online_payment_reason }}-invoice'{% endif %}>
<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>
{% if with_payment_limit_date %}<td class="invoice-payment-limit-date">{{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }}</td>{% endif %}
{% 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 %}
<td class="invoice-amount amount">{% blocktrans with amount=item.total_amount|floatformat:"2" %}
{{ amount }}€
{% endblocktrans %}
</td>
{% endif %}
{% if item.regie.is_remote %}
<td>
<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" %}
{% if item.online_payment and item.amount >= item.regie.payment_min_amount %}{% trans "and pay" %}{% endif %}
</a>
{% if item.has_pdf %}
<br/><a href="{% url 'download-item-pdf' regie_id=item.regie.pk item_crypto_id=item.crypto_id %}" class="icon-pdf"
>{% trans "Download" %}</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
{% trans "No items yet" %}
{% endif %}
</div>
{% endif %}
{% endblock %}