Removed the rows with zero balance from the trial balance.

This commit is contained in:
依瑪貓 2023-04-05 12:56:28 +08:00
parent 85084c68fd
commit 7df4051452

View File

@ -191,6 +191,7 @@ class TrialBalance(BaseReport):
.join(JournalEntry).join(Account)\
.filter(*conditions)\
.group_by(Account.id)\
.having(balance_func != 0)\
.order_by(Account.base_code, Account.no)
balances: list[sa.Row] = db.session.execute(select_balances).all()
accounts: dict[int, Account] \