From 1f8e2ae0b97c5ebddd0f2a1e65275afd2f8acc64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 31 Aug 2020 20:55:34 +0800 Subject: [PATCH] Fixed an error when calculating the balance of the previous period in the cash account report in the accounting application. --- accounting/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounting/views.py b/accounting/views.py index e363327..b9e3890 100644 --- a/accounting/views.py +++ b/accounting/views.py @@ -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),