Preserve inactive-category fallback and saved settlement header evidence

This commit is contained in:
2026-10-13 23:17:12 +00:00
parent ae4383ca2c
commit 10201cdb75
7 changed files with 258 additions and 2 deletions
@@ -51,7 +51,7 @@ def _review_cashflow(conn, month: str, policy: dict) -> dict:
{CASHFLOW_KIND_SQL} AS originalcashflow_kind, lc.cashflow_kind AS category_cashflow_kind,
lc.active AS category_active
FROM transactions t LEFT JOIN ledger_categories lc
ON lc.category=t.category AND lc.subcategory=t.subcategory
ON lc.category=t.category AND lc.subcategory=t.subcategory AND lc.active=1
WHERE t.status='active' AND t.transaction_date>=? AND t.transaction_date<?
ORDER BY t.transaction_date,t.id""", (start.isoformat(), end.isoformat())).fetchall()
savings = {(x["category"], x["subcategory"]) for x in policy["savings_categories"]}