Changed the cumulative_balance property in RecordSummary from a decorated @property to a simple property in the accounting application.

This commit is contained in:
2020-08-03 20:01:36 +08:00
parent a9a47f8526
commit 18161c3fb2
2 changed files with 3 additions and 11 deletions

View File

@ -245,8 +245,8 @@ def cash_summary(request, account):
credit=sum([x.credit for x in months]),
debit=sum([x.debit for x in months]),
balance=sum([x.balance for x in months]),
cumulative_balance=cumulative_balance,
)
total.cumulative_balance = cumulative_balance
total.label = pgettext("Accounting|", "Total")
months.append(total)
pagination = Pagination(request, months, True)
@ -388,8 +388,8 @@ def ledger_summary(request, account):
credit=sum([x.credit for x in months]),
debit=sum([x.debit for x in months]),
balance=sum([x.balance for x in months]),
cumulative_balance=cumulative_balance,
)
total.cumulative_balance = cumulative_balance
total.label = pgettext("Accounting|", "Total")
months.append(total)
pagination = Pagination(request, months, True)