funkcje rezerw i przesuniec

This commit is contained in:
Mateusz Gruszczyński
2025-12-11 14:55:34 +01:00
parent da2c2ca3bd
commit 29ca46a5ef
2 changed files with 49 additions and 6 deletions

View File

@@ -320,8 +320,8 @@
{% if aktywnosci and aktywnosci|length > 0 %}
<ul class="list-group list-group-flush">
{% for a in aktywnosci %}
<li class="list-group-item bg-transparent d-flex flex-wrap justify-content-between align-items-center">
<div class="me-3">
<li class="list-group-item bg-transparent d-flex flex-wrap justify-content-between align-items-start">
<div class="me-3 flex-grow-1">
<strong>{{ a.data|dt("%d.%m.%Y %H:%M") }}</strong>
{% if a.typ == 'wpłata' %}
@@ -338,6 +338,22 @@
<span class="text-muted">— {{ a.opis }}</span>
{% endif %}
{# Informacja o przesunięciu wpłaty #}
{% if a.typ == 'wpłata' and a.przesuniecie_z %}
<div class="text-muted small mt-1">
<span class="badge bg-secondary">Przesunięto</span>
Źródło:
<a href="{{ url_for('zbiorka', zbiorka_id=a.przesuniecie_z.zbiorka_zrodlo_id) }}"
class="text-decoration-none">
{{ a.przesuniecie_z.zbiorka_zrodlo_nazwa }}
</a>
{% if a.przesuniecie_z.opis %}
<br><span class="text-muted">{{ a.przesuniecie_z.opis }}</span>
{% endif %}
</div>
{% endif %}
{# Link do źródłowej/docelowej zbiórki dla przesunięć ogólnych #}
{% if a.typ in ['przesunięcie_przych', 'przesunięcie_wych'] and a.zbiorka_id %}
<a href="{{ url_for('zbiorka', zbiorka_id=a.zbiorka_id) }}"
class="ms-2 text-decoration-none small">
@@ -352,7 +368,7 @@
</div>
{% if not zbiorka.ukryj_kwote %}
<span class="badge bg-dark border ms-auto" style="border-color: var(--border);">
<span class="badge bg-dark border" style="border-color: var(--border);">
{% if a.typ == 'wpłata' or a.typ == 'przesunięcie_przych' %}
+{{ a.kwota|round(2) }} PLN
{% else %}
@@ -379,6 +395,7 @@
</div>
</div>
</div>
{% endblock %}
{% block extra_scripts %}