austax: Generate tax report as at EOFY date

This commit is contained in:
RunasSudo 2023-09-10 19:36:01 +10:00
parent 4de3dc41ac
commit 8c1cb00bda
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -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()))