{% if rows %}
{% for column, label, align in [ ('category', 'Category', ''), ('period', 'Period', ''), ('window', 'Window', ''), ('budget', 'Budget €', 'text-end'), ('actual', 'Actual €', 'text-end'), ('remaining', 'Remaining €', 'text-end'), ('used', 'Used', 'text-end'), ('status', 'Status', '')] %} {% endfor %} {% for row in rows %} {% endfor %}
{{ label }} {% if sort_column == column %} {% endif %} Actions
{{ row.category }} {{ row.period }} {{ row.period_start.isoformat() }} → {{ row.period_end.isoformat() }} {{ "%.2f" | format(row.budget) }} {{ "%.2f" | format(row.actual) }} {{ "%.2f" | format(row.remaining) }} {{ row.percentage }}% {% if row.status == 'over' %} over {% elif row.status == 'near' %} near {% else %} under {% endif %}
Edit
{% else %}

No {{ 'yearly' if period == 'year' else 'monthly' }} budgets for this {{ period }}. Use Create budgets, or add one below.

{% endif %}