Fixed an error when calculating the balance of the previous period in the cash account report in the accounting application.

This commit is contained in:
依瑪貓 2020-08-31 20:55:34 +08:00
parent c6987304f4
commit 1f8e2ae0b9

View File

@ -98,7 +98,7 @@ def cash(request: HttpRequest, account: Account,
(Q(account__code__startswith="11") |
Q(account__code__startswith="12") |
Q(account__code__startswith="21") |
Q(account__code__startswith="21"))) \
Q(account__code__startswith="22"))) \
.aggregate(
balance=Coalesce(Sum(Case(
When(is_credit=True, then=-1),