{% extends "base.html" %}
{% block content %}
Total Income
${{ total_income | money }}
Total Spent
${{ (total_spending + total_bills) | money }}
Saved to Funds
${{ total_sinking | money }}
{{ 'Left Over' if net >= 0 else 'Over Budget' }}
${{ net | abs | money }}
{% if total_income > 0 %}
{% set spent_pct = [(total_spending + total_bills) / total_income * 100, 100] | min | int %}
{% set sinking_pct = [total_sinking / total_income * 100, 100 - spent_pct] | min | int %}
Where did the money go?
${{ total_income | money }} income
Spent {{ spent_pct }}%
Saved {{ sinking_pct }}%
{% if net > 0 %}
Left over {{ [100 - spent_pct - sinking_pct, 0] | max }}%
{% endif %}
{% endif %}
{% if income_by_stream %}
{% for s in income_streams %}
{% set amt = income_by_stream.get(s.name, 0) %}
{% if amt > 0 %}
| {{ s.name }} |
{{ s.owner }} |
${{ amt | money }} |
{% endif %}
{% endfor %}
| Total |
${{ total_income | money }} |
{% else %}
No income logged yet. Log income →
{% endif %}
{% if monthly_bills %}
{% for b in monthly_bills %}
| {{ b.name }} |
day {{ b.due_day }} |
{% if b.amount %}${{ b.amount | money }}{% else %}—{% endif %} |
{% endfor %}
| Total |
${{ total_bills | money }} |
{% else %}
No bills this month.
{% endif %}
{% if sinking_contributions %}
{% for name, amt in sinking_contributions.items() %}
| {{ name }} |
${{ amt | money }} |
{% endfor %}
| Total Saved |
${{ total_sinking | money }} |
{% endif %}
{% if spending_by_cat %}
{% set max_spend = spending_by_cat.values() | max %}
| Category | Budgeted | Actual | |
{% for cat, amt in spending_by_cat | dictsort(by='value', reverse=true) %}
{% set budgeted = budgeted_by_cat.get(cat, 0) %}
{% set over = budgeted > 0 and amt > budgeted %}
| {{ cat }} |
{% if budgeted %}${{ budgeted | money }}{% else %}—{% endif %} |
${{ amt | money }}
{% if over %} over{% endif %}
|
|
{% endfor %}
| Total |
{% if budgeted_by_cat %}${{ budgeted_by_cat.values( | money|sum) }}{% endif %} |
${{ total_spending | money }} |
|
{% else %}
No categorized transactions yet. Review transactions →
{% endif %}
{% if debt_payments %}
| Debt | Owner | Payment | Extra |
{% for d in debt_payments %}
| {{ d.name }} |
{{ d.owner }} |
${{ d.payment | money }} |
{% if d.extra > 0 %}+${{ d.extra | money }}{% else %}—{% endif %} |
{% endfor %}
| Total Paid |
${{ total_debt_paid | money }} |
{% if total_extra_paid > 0 %}+${{ total_extra_paid | money }} extra{% endif %} |
{% endif %}
{{ month_name }} {{ year }} — Final Summary
${{ "%.2f"|format(total_income) }} income
− ${{ "%.2f"|format(total_spending + total_bills) }} spent
− ${{ "%.2f"|format(total_sinking) }} saved
{% if net >= 0 %}+{% endif %}${{ net | money }}
{% endblock %}