From 85084c68fd92bb62664a1a5da16dd7a4c59b73bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 5 Apr 2023 12:29:58 +0800 Subject: [PATCH] Removed the rows with zero balance from the balance sheet. --- src/accounting/report/reports/balance_sheet.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/accounting/report/reports/balance_sheet.py b/src/accounting/report/reports/balance_sheet.py index 20e378f..4e0a011 100644 --- a/src/accounting/report/reports/balance_sheet.py +++ b/src/accounting/report/reports/balance_sheet.py @@ -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()