From 5855c1dd2b5fe9a4e109d6e6ba934194a9b8c476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 17 Jul 2020 00:17:18 +0800 Subject: [PATCH] Added the balance value to the total record in the cash account summary and ledger summary in the accounting application. --- accounting/views/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/accounting/views/__init__.py b/accounting/views/__init__.py index 10723fa..5fbb3bc 100644 --- a/accounting/views/__init__.py +++ b/accounting/views/__init__.py @@ -351,6 +351,7 @@ ORDER BY month""", label=pgettext("Accounting|", "Total"), credit_amount=sum([x.credit_amount for x in records]), debit_amount=sum([x.debit_amount for x in records]), + balance=sum([x.balance for x in records]), cumulative_balance=cumulative_balance, )) pagination = Pagination(request, records, True) @@ -497,6 +498,7 @@ ORDER BY month""", label=pgettext("Accounting|", "Total"), credit_amount=sum([x.credit_amount for x in records]), debit_amount=sum([x.debit_amount for x in records]), + balance=sum([x.balance for x in records]), cumulative_balance=cumulative_balance, )) pagination = Pagination(request, records, True)