Added the balance value to the total record in the cash account summary and ledger summary in the accounting application.

This commit is contained in:
依瑪貓 2020-07-17 00:17:18 +08:00
parent 44a778f4f5
commit 5855c1dd2b

View File

@ -351,6 +351,7 @@ ORDER BY month""",
label=pgettext("Accounting|", "Total"), label=pgettext("Accounting|", "Total"),
credit_amount=sum([x.credit_amount for x in records]), credit_amount=sum([x.credit_amount for x in records]),
debit_amount=sum([x.debit_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, cumulative_balance=cumulative_balance,
)) ))
pagination = Pagination(request, records, True) pagination = Pagination(request, records, True)
@ -497,6 +498,7 @@ ORDER BY month""",
label=pgettext("Accounting|", "Total"), label=pgettext("Accounting|", "Total"),
credit_amount=sum([x.credit_amount for x in records]), credit_amount=sum([x.credit_amount for x in records]),
debit_amount=sum([x.debit_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, cumulative_balance=cumulative_balance,
)) ))
pagination = Pagination(request, records, True) pagination = Pagination(request, records, True)