From e6b1136a14e12c67a962508715712f2ce480a759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Thu, 9 Mar 2023 16:25:59 +0800 Subject: [PATCH] Fixed so that the brought-forward row is not added for norminal accounts in the ledger. --- src/accounting/report/reports/ledger.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/accounting/report/reports/ledger.py b/src/accounting/report/reports/ledger.py index 3fcda4b..3b162e0 100644 --- a/src/accounting/report/reports/ledger.py +++ b/src/accounting/report/reports/ledger.py @@ -110,6 +110,8 @@ class EntryCollector: """ if self.__period.start is None: return None + if self.__account.base_code[0] not in {"1", "2", "3"}: + return None balance_func: sa.Function = sa.func.sum(sa.case( (JournalEntry.is_debit, JournalEntry.amount), else_=-JournalEntry.amount))