{# Preview panel partial: dry-run result of the (unsaved) draft rule. #} {% macro txn_table(txns) %}
{% for t in txns %} {% endfor %}
Date Account Description Amount Current category
{{ t.transactiondate.isoformat() }} {{ t.accountNumber }} {{ (t.description or '')[:90] }} {{ '%.2f'|format(t.amount) }} {{ t.manual_category or t.category or '—' }}
{% endmacro %}
{% if error %}
Preview failed: {{ error }}
{% else %}
Preview — dry run against non-manual transactions{% if not include_transfers %} (transfers excluded){% endif %}; nothing has been saved.
Matched: {{ preview.counts.matched }} {% if is_edit %} Gained: {{ preview.counts.gains }} Lost: {{ preview.counts.losses }} {% endif %} Would change: {{ preview.counts.changes }}

{% if matched_txns %} {{ txn_table(matched_txns) }} {% if preview.counts.matched > matched_txns|length %}
Showing first {{ matched_txns|length }} of {{ preview.counts.matched }}.
{% endif %} {% else %}
No transactions match this draft.
{% endif %}
{% if is_edit %}

{% if gained_txns %} {{ txn_table(gained_txns) }} {% else %}
None.
{% endif %}

{% if lost_txns %} {{ txn_table(lost_txns) }}
IDs:
    {% for t in lost_txns %}
  • {{ t.id }}
  • {% endfor %}
{% else %}
None.
{% endif %}
{% endif %}

{% if changes %}
{% for row in changes %} {% endfor %}
Transaction Category Tags
{% if row.txn %}{{ (row.txn.description or '')[:70] }}{% endif %}
{{ row.change.transaction_id }}
{{ row.change.old_category or '—' }} {{ row.change.new_category or '—' }} {{ row.change.old_tags or '—' }} {{ row.change.new_tags or '—' }}
{% if preview.counts.changes > changes|length %}
Showing first {{ changes|length }} of {{ preview.counts.changes }}.
{% endif %} {% else %}
No effective category or tag changes.
{% endif %}
{% endif %}