Added owner's equity accounts (base code starts with "3") when calculating the change of owner's equity in the specified period.
This commit is contained in:
parent
4eac10981f
commit
fe1c7669b6
@ -213,7 +213,7 @@ class AccountCollector:
|
|||||||
:return: The balance.
|
:return: The balance.
|
||||||
"""
|
"""
|
||||||
conditions.extend([sa.not_(Account.base_code.startswith(x))
|
conditions.extend([sa.not_(Account.base_code.startswith(x))
|
||||||
for x in {"1", "2"}])
|
for x in {"1", "2", "3"}])
|
||||||
balance_func: sa.Function = sa.func.sum(sa.case(
|
balance_func: sa.Function = sa.func.sum(sa.case(
|
||||||
(JournalEntry.is_debit, JournalEntry.amount),
|
(JournalEntry.is_debit, JournalEntry.amount),
|
||||||
else_=-JournalEntry.amount))
|
else_=-JournalEntry.amount))
|
||||||
|
Loading…
Reference in New Issue
Block a user