81 lines
3.4 KiB
HTML
81 lines
3.4 KiB
HTML
{% load i18n %}
|
|
<div id="content">
|
|
<div id="appbar">
|
|
{% if item %}
|
|
<h2>
|
|
{% blocktrans with number=item.display_id %}
|
|
Item nr. {{ number }}
|
|
{% endblocktrans %}
|
|
</h2>
|
|
<form action="{% url 'lingo-pay' %}" method="POST">
|
|
<div id="item">
|
|
{% if item.subject %}
|
|
<h4 class="label">
|
|
{% blocktrans with label=item.subject %}
|
|
Label: {{ label }}
|
|
{% endblocktrans %}
|
|
</h4>
|
|
{% endif %}
|
|
<div class="total_amount">
|
|
{% blocktrans with amount=item.total_amount|floatformat:"2" %}
|
|
Total amount: <span class="amount">{{ amount }}€</span>
|
|
{% endblocktrans %}
|
|
</div>
|
|
{% if item.amount %}
|
|
<div class="amount">
|
|
{% blocktrans with amount=item.amount|floatformat:"2" %}
|
|
Amount to pay: <span class="amount">{{ amount }}€</span>
|
|
{% endblocktrans %}
|
|
</div>
|
|
{% endif %}
|
|
{% if item.amount_paid %}
|
|
<div class="amount_paid">
|
|
{% blocktrans with amount=item.amount_paid|floatformat:"2" %}
|
|
Amount already paid: <span class="amount">{{ amount }}€</span>
|
|
{% endblocktrans %}
|
|
</div>
|
|
{% endif %}
|
|
<div class="issued">{% trans "Issue date:" %} <span class="timestamp">{{ item.creation_date|date:"SHORT_DATE_FORMAT" }}</span></div>
|
|
{% if item.payment_limit_date %}
|
|
<div class="invoice-payment-limit-date">{% trans "Payment due date:" %}
|
|
<span class="timestamp">{{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }} {% trans "(up to and including)" %}</span></div>
|
|
{% endif %}
|
|
{% if item.payment_date %}
|
|
<div class="paid paid-info">{% trans "Invoice paid on" %} <span class="timestamp">{{ item.payment_date|date:"SHORT_DATE_FORMAT" }}</span></div>
|
|
{% elif item.paid %}
|
|
<div class="paid paid-info">{% trans "Invoice has been paid." %}</div>
|
|
{% endif %}
|
|
{% if item.no_online_payment_reason_details %}
|
|
<div class="no-online-payment-reason"><span>{{ item.no_online_payment_reason_details }}</span></div>
|
|
{% endif %}
|
|
{% if item.waiting_date and not item.paid %}
|
|
<div class="paid paid-info">{% trans "Waiting for payment." %}</div>
|
|
{% endif %}
|
|
{% if not item.paid and item.online_payment and item.amount >= regie.payment_min_amount and not item.waiting_date %}
|
|
{% csrf_token %}
|
|
{% if not user.is_authenticated %}
|
|
<div class="email">
|
|
<label for="email">{% trans 'Email:' %}</label>
|
|
<input type="email" id="email" name="email" required/>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<input type="hidden" name="regie" value="{{ regie.pk }}"/>
|
|
<input type="hidden" name="item" value="{{ item.id }}"/>
|
|
<input type="hidden" name="next_url" value="{{ page.get_online_url }}" />
|
|
{% if item_url %}
|
|
<input type="hidden" name="item_url" value="{{ item_url }}"/>
|
|
{% endif %}
|
|
<div class="buttons">
|
|
<button>{% trans "Pay" %}</button>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</form>
|
|
{% else %}
|
|
<h2>{{ err_desc }}</h2>
|
|
<form></form>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|