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:
parent
c6987304f4
commit
1f8e2ae0b9
@ -98,7 +98,7 @@ def cash(request: HttpRequest, account: Account,
|
|||||||
(Q(account__code__startswith="11") |
|
(Q(account__code__startswith="11") |
|
||||||
Q(account__code__startswith="12") |
|
Q(account__code__startswith="12") |
|
||||||
Q(account__code__startswith="21") |
|
Q(account__code__startswith="21") |
|
||||||
Q(account__code__startswith="21"))) \
|
Q(account__code__startswith="22"))) \
|
||||||
.aggregate(
|
.aggregate(
|
||||||
balance=Coalesce(Sum(Case(
|
balance=Coalesce(Sum(Case(
|
||||||
When(is_credit=True, then=-1),
|
When(is_credit=True, then=-1),
|
||||||
|
Loading…
Reference in New Issue
Block a user