fix(cof_clubs): Add remaining budget in period title

This commit is contained in:
sinavir 2025-03-18 14:24:28 +01:00 committed by catvayor
parent 5257e7a58a
commit ee1a589f45
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
2 changed files with 3 additions and 1 deletions

View file

@ -30,7 +30,8 @@
{% if period.is_archived %}
<div class="button is-static"><span>Archivé</span><span class="icon"><i class="fa fa-inbox"></i></span></div>
{% else %}
<a class="button" href="{% url "cof_clubs:budget-line-create" object.id period.id %}"><span class="icon"><i class="fa fa-plus"></i></span></a>
/ {{ period.remaining }}&nbsp€
<a class="button" href="{% url "cof_clubs:budget-line-create" object.id period.id %}"><span class="icon"><i class="fa fa-plus"></i></span><span>Nouvelle ligne</span></a>
{% endif %}
</h2>

View file

@ -144,6 +144,7 @@ class ClubDetailView(AccessMixin, DetailView):
)
value["remaining"] = s
accounting_periods[i]["lines"] = lines
accounting_periods[i]["remaining"] = s
ctx["accounting_periods"] = accounting_periods
return ctx