{% extends "base.html" %} {% block content %}
{% for w in weeks %} {% endfor %}
{% for w in weeks %}
{% if w.summary %}
How's this week looking? {% for line in w.summary %} {{ line | bold_md }} {% endfor %}
{% endif %}
Enter what's in checking when the week begins

Income

{% for src in w.income_sources %} {% set inc = w.income.get(src, {}) %} {% endfor %}
SourceBudgetedActual
{{ src }} {% if src == 'Auto King' %} Fridays {% endif %}
{% if inc.get('actual') %} ✓ logged {% endif %}
Total ${{ (w.income.values() | map(attribute='budgeted') | select | map('float') | sum if w.income else 0) | money }} ${{ w.income_total | money }}

Bills Due This Week

manage bills
{% if w.bills %} {% for b in w.bills %} {% endfor %}
BillDueAmountCategory
{{ b.name }} {{ b.due_date.strftime('%b %-d') if b.due_date else '' }} {% if b.amount %}${{ b.amount | money }}{% else %}{% endif %} {% if b.category %} {{ b.category }} {% endif %}
Bills Total ${{ w.bills_total | money }}
{% else %}

No bills due this week.

{% endif %}

Budget Categories

{% set skip = ['Income', 'Debt', 'Transfer'] %} {% set total_budgeted = namespace(v=0) %} {% set total_actual = namespace(v=0) %} {% for cat in categories if cat not in skip %} {% set cb = w.cat_budget.get(cat, {}) %} {% set actual = w.cat_actuals.get(cat, 0) %} {% set budgeted = cb.get('budgeted', '') | float %} {% set left = budgeted - actual %} {% set over = budgeted > 0 and actual > budgeted %} {% set total_budgeted.v = total_budgeted.v + budgeted %} {% set total_actual.v = total_actual.v + actual %} {% endfor %} {% set total_left = total_budgeted.v - total_actual.v %}
CategoryBudgetedSpentLeft to Spend
{{ cat }} ${{ actual | money }} {% if budgeted %} {% if over %} -${{ (actual - budgeted) | money }} {% else %} ${{ left | money }} {% endif %} {% else %} {% endif %}
Totals ${{ total_budgeted.v | money }} ${{ total_actual.v | money }} {% if total_budgeted.v > 0 %} {% if total_left < 0 %} -${{ total_left | abs | money }} over {% else %} ${{ total_left | money }} left {% endif %} {% endif %}

Sinking Funds

manage funds

Extra Debt Payments

manage debts

Transactions This Week{% if w.transactions %} ({{ w.transactions | length }}){% endif %}

Week {{ w.num }} — What's Left
${{ w.starting_balance | money }} starting + ${{ w.income_total | money }} income − ${{ w.spending_total | money }} spending − ${{ w.sinking_total | money }} savings − ${{ w.extra_debt_total | money }} extra debt
${{ w.leftover | money }}
{% endfor %} {% endblock %}