Removed the rows with zero balance from the income statement.

This commit is contained in:
依瑪貓 2023-04-05 12:59:50 +08:00
parent 7df4051452
commit 7a5b3b78fc

View File

@ -269,6 +269,7 @@ class IncomeStatement(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] \