{% extends "base.html" %} {% block title %}Alberich: the Review{% endblock %} {% macro suggestion(x, back) %}
{{ money(x.cents) }} · {{ x.date }} · {{ x.acct }} · {{ x.desc }}{% if x.sure %} like one you confirmed{% endif %}
{% endmacro %} {% macro card(i, kind) %}

{{ i.description }}

{{ money(i.amount_cents) if i.amount_cents >= 0 else '+' ~ money(-i.amount_cents) }}
{% if i.receipt_id %}

from a receipt one item of the {{ money(i.txn_cents) }} purchase on {{ i.description_raw }}

{% elif i.description != i.description_raw %}

on {{ i.description_raw }}

{% endif %}

{{ i.posted_date }} · {{ i.acct }}{% if i.owner != 'me' %} ({{ i.owner }}){% endif %}{% if i.tkind == 'refund' %} · refund{% endif %}

{{ i.why }}

{% for lab, v in [('All mine', 10000), ('Half', 5000), ('All ' ~ partner ~ "'s", 0)] %}{% endfor %} {% set custom = i.my_bps not in (0, 5000, 10000) %}
{% if i.merchant_id %}{% endif %} {% if kind == 'done' %}{% else %}{% endif %}
{% endmacro %} {% block body %}

The Review

←{{ month }}→ The reckoning

Sort the Other pile

Once a month, say who each purchase belonged to. Alberich learns your habits and stops asking about the ones you always do the same way.

What {{ partner }} owes you

{% set after = tally.balance_after_suggested %}
{% if after > 50 %}{{ money(after) }}{% elif after < -50 %}{{ partner }} is {{ money(-after) }} ahead{% else %}All square{% endif %}

Her share of what you paid{% if tally.start %} since {{ tally.start }}{% endif %}: {{ money(tally.owed) }}. Paid back: {{ money(tally.received) }}.{% if tally.waived %} Waived: {{ money(tally.waived) }}.{% endif %}{% if tally.suggested_total %} Counting {{ money(tally.suggested_total) }} of deposits that look like ones you confirmed before, until you say otherwise below.{% endif %}

{% if tally.suggested %}
Might be {{ partner }} paying you back

{% if tally.maybe_total %}{{ money(tally.maybe_total) }} of e-transfers that are not pay.{% endif %} Say which are hers and the amount that counts. Ones like those you confirm are counted for you next time.

{% set bigs = tally.suggested|selectattr('cents', 'ge', 5000)|list %}{% set smalls = tally.suggested|rejectattr('cents', 'ge', 5000)|list %} {% for x in bigs %}{{ suggestion(x, '/review?month=' ~ month ~ '#iou') }}{% endfor %} {% if smalls %}
{{ smalls|length }} smaller deposit{{ 's' if smalls|length != 1 }}{% for x in smalls %}{{ suggestion(x, '/review?month=' ~ month ~ '#iou') }}{% endfor %}
{% endif %}{% endif %}

For a repayment that is not in a filed statement yet. When the statement arrives, mark the deposit as hers and remove this entry so it is not counted twice.

{% if tally.balance > 50 %}
{% endif %}

Every repayment, and mark one by hand

{% if not prog.total %}
Nothing to review in {{ month }}. File statements in the Ledgers first.
{% else %}

{{ prog.done }} of {{ prog.total }} decided

{{ prog.ask }} need you · {{ prog.auto }} Alberich is sure of
{% if ask %}

Needs your call

{% for i in ask %}{{ card(i, 'ask') }}{% endfor %} {% endif %} {% if auto %}
Alberich decided {{ auto|length }} himself. Check them if you like.
{% for i in auto %}{{ card(i, 'auto') }}{% endfor %}
{% endif %} {% if done %}
{{ done|length }} decided
{% for i in done %}{{ card(i, 'done') }}{% endfor %}
{% endif %}
{% endif %} {% endblock %}