{% extends "base.html" %} {% block title %}Debts{% endblock %} {% from "_debt_form.html" import debt_form with context %} {% block content %}

Debts

What you owe and what others owe you
{{ icon('plus', 'sm') }} Add debt
{{ icon('arrow-up-right') }}
I owe
{{ sums.i_owe|eur }}
{{ icon('arrow-down-right') }}
Owed to me
{{ sums.owed_to_me|eur }}
{{ icon('scale') }}
Net
{{ (sums.owed_to_me - sums.i_owe)|eur(2, true) }}
{% for dir, label in [('i_owe', 'Debts I have'), ('owed_to_me', 'Money people owe me')] %}

{{ icon('landmark' if dir == 'i_owe' else 'handshake') }} {{ label }}

{% for x, s in debts if x.direction == dir %} {% else %}{% endfor %}
NameStatusProgressTotalPaidRemaining MonthlyNext dueLast paymentPaid off ≈
{{ x.name }}
{{ x.counterparty }}
{% set cls = {'behind':'bad','on track':'good','ahead':'good','paid off':'good'}.get(s.status, '') %} {{ s.status }}{% if s.missed %} · {{ s.missed }} missed{% endif %}
{{ '%.0f'|format(s.pct) }}%
{{ x.principal|eur }} {{ s.paid|eur }} {{ s.remaining|eur }} {{ x.monthly_payment|eur if x.monthly_payment else '—' }} {{ s.next_due.strftime('%d-%m-%Y') if s.next_due else '—' }} {{ s.last_payment.strftime('%d-%m-%Y') if s.last_payment else 'never' }} {{ s.payoff.strftime('%b %Y') if s.payoff else '—' }}
None.
{% endfor %}

{{ 'Hide' if show_closed else 'Show' }} closed debts

{{ icon('plus') }} Add a debt {{ debt_form() }}

With a monthly payment set, the status compares what should have been paid by now with what was paid. The “auto-match” text links bank transactions automatically (outgoing for debts you have, incoming for money owed to you).

{% endblock %}