Removed the rows with zero balance from the balance sheet.

This commit is contained in:
依瑪貓 2023-04-05 12:29:58 +08:00
parent 0185c16654
commit 85084c68fd

View File

@ -137,6 +137,7 @@ class AccountCollector:
.join(JournalEntry).join(Account)\
.filter(*conditions)\
.group_by(Account.id, Account.base_code, Account.no)\
.having(balance_func != 0)\
.order_by(Account.base_code, Account.no)
account_balances: list[sa.Row] \
= db.session.execute(select_balance).all()