Fixed so that the brought-forward row is not added for norminal accounts in the ledger.

This commit is contained in:
依瑪貓 2023-03-09 16:25:59 +08:00
parent d7bc01ccb4
commit e6b1136a14

View File

@ -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))