From 8c1cb00bdaae1d0ad497a265db615cb2d3d05e70 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sun, 10 Sep 2023 19:36:01 +1000 Subject: [PATCH] austax: Generate tax report as at EOFY date --- austax/reports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/austax/reports.py b/austax/reports.py index fec3101..b74bd65 100644 --- a/austax/reports.py +++ b/austax/reports.py @@ -54,7 +54,7 @@ def study_loan_repayment(year, taxable_income, rfb_grossedup): def tax_summary_report(): # Get trial balance balancer = TrialBalancer() - balancer.apply_transactions(db.session.scalars(db.select(Transaction).options(db.selectinload(Transaction.postings))).all()) + balancer.apply_transactions(db.session.scalars(db.select(Transaction).where(Transaction.dt <= eofy_date()).options(db.selectinload(Transaction.postings))).all()) accounts = dict(sorted(balancer.accounts.items()))