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

{{ icon('chevron-left', 'sm') }} All debts

{{ d.name }} {{ 'I owe' if d.direction == 'i_owe' else 'owed to me' }} {% if d.closed %}closed{% endif %}

{% if d.match_pattern %}
{% endif %}
Remaining
{{ s.remaining|eur }}
of {{ d.principal|eur }}
Paid
{{ s.paid|eur }}
Status
{{ s.status }}
{% if s.expected is not none %}expected by now {{ s.expected|eur }} ({{ s.diff|eur(2, true) }}){% else %}set a monthly payment to track schedule{% endif %}
Next due
{{ s.next_due.strftime('%d %b') if s.next_due else '—' }}
{{ 'paid off ≈ ' + s.payoff.strftime('%b %Y') if s.payoff }}

{{ icon('banknote') }} Payments

{% for p, bal in running %} {% else %}{% endfor %}
DateAmountBalance afterNote
{{ p.date.strftime('%d-%m-%Y') }}{{ p.amount|eur }}{{ bal|eur }} {{ p.notes }}{% if p.transaction_id %} {{ icon('landmark', 'sm') }} bank{% endif %}
No payments yet.

{{ icon('pencil') }} Details

{{ debt_form(d) }}
{% endblock %}