Preserve inactive-category fallback and saved settlement header evidence
This commit is contained in:
@@ -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"]}
|
||||
|
||||
Reference in New Issue
Block a user