Show payment indicator on Nachweis row when related payment exists (STI-107) #2
@@ -471,6 +471,19 @@
|
||||
{% elif nachweis.status == 'nachbesserung' %}<span class="badge bg-warning">Nachbesserung</span>
|
||||
{% elif nachweis.status == 'abgelehnt' %}<span class="badge bg-danger">Abgelehnt</span>
|
||||
{% endif %}
|
||||
{% with related_payment=nachweis.get_related_support_payment %}
|
||||
{% if related_payment %}
|
||||
{% if related_payment.status == 'ausgezahlt' or related_payment.status == 'abgeschlossen' %}
|
||||
<a href="{% url 'stiftung:unterstuetzung_detail' pk=related_payment.pk %}" class="badge bg-success text-decoration-none ms-1" title="Zahlung überwiesen: €{{ related_payment.betrag|floatformat:2 }}"><i class="fas fa-check-circle"></i> Überwiesen</a>
|
||||
{% elif related_payment.status == 'freigegeben' or related_payment.status == 'in_bearbeitung' %}
|
||||
<a href="{% url 'stiftung:unterstuetzung_detail' pk=related_payment.pk %}" class="badge bg-warning text-decoration-none ms-1" title="Zahlung freigegeben: €{{ related_payment.betrag|floatformat:2 }}"><i class="fas fa-shield-alt"></i> Freigegeben</a>
|
||||
{% elif related_payment.status == 'nachweis_eingereicht' %}
|
||||
<a href="{% url 'stiftung:unterstuetzung_detail' pk=related_payment.pk %}" class="badge bg-info text-decoration-none ms-1" title="Zahlung wartet auf Freigabe: €{{ related_payment.betrag|floatformat:2 }}"><i class="fas fa-hourglass-half"></i> Wartet</a>
|
||||
{% else %}
|
||||
<a href="{% url 'stiftung:unterstuetzung_detail' pk=related_payment.pk %}" class="badge bg-primary text-decoration-none ms-1" title="Zahlung angelegt (€{{ related_payment.betrag|floatformat:2 }}, Status {{ related_payment.get_status_display }})"><i class="fas fa-euro-sign"></i> Zahlung angelegt</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
<td>
|
||||
{% with completion=nachweis.get_completion_percentage %}
|
||||
|
||||
Reference in New Issue
Block a user