The Ledger
Leak hunt
{% include 'includes/ledger_nav.html' %}
{% with messages = get_flashed_messages(with_categories=true) %} {% for category, message in messages %}
{{ message }}
{% endfor %} {% endwith %} {# ===== Past leak hunt detail ===== #} {% if detail %}

Leak hunt · {{ detail.imported_at[:10] }}

${{ '{:,.2f}'.format(detail.total_amount) }}
{{ detail.period_start }} → {{ detail.period_end }} · source: {{ detail.source }}
{% if detail_breakdown %} {% set top_amount = detail_breakdown.values()|list|max %} {% for cat, amt in detail_breakdown.items()|sort(attribute=1, reverse=True) %}
{{ cat }} ${{ '{:,.2f}'.format(amt) }}
{% endfor %} {% endif %}
{% endif %} {# ===== Preview after upload ===== #} {% if preview %}

Categorize · {{ source_filename or 'uploaded CSV' }}

{{ preview|length }} rows parsed. Edit categories below, then commit.

{% for r in preview %} {% endfor %}
DateDescriptionAmountCategory
{{ r.date }} {{ r.description }} ${{ '{:,.2f}'.format(r.amount) }}
Cancel
{% else %} {# ===== Upload form ===== #} {% if not detail %}

Upload CSV

Drop a checking export. Best-effort parser — looks for date / description / amount columns.

{% endif %} {% endif %} {# ===== Past leak hunts ===== #} {% if past %}
// Past hunts
{% for p in past %} {% endfor %}
WhenPeriodTotalSource
{{ p.imported_at[:10] }} {{ p.period_start }} → {{ p.period_end }} ${{ '{:,.2f}'.format(p.total_amount) }} {{ p.source }}
{% endif %}
{% include 'includes/today_panel.html' ignore missing %} {% include 'includes/active_timer_strip.html' ignore missing %}