From f27701099140fc66f1f13309fa08d237636efd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 8 Mar 2023 17:56:57 +0800 Subject: [PATCH] Renamed the TrialBalanceTotal class to Total, to be short and clear. --- src/accounting/report/reports/trial_balance.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/accounting/report/reports/trial_balance.py b/src/accounting/report/reports/trial_balance.py index 3fa66cf..7b59592 100644 --- a/src/accounting/report/reports/trial_balance.py +++ b/src/accounting/report/reports/trial_balance.py @@ -55,8 +55,8 @@ class ReportAccount: """The URL to the ledger of the account.""" -class TrialBalanceTotal: - """The total in the trial balance.""" +class Total: + """The totals.""" def __init__(self, debit: Decimal, credit: Decimal): """Constructs the total in the trial balance. @@ -104,7 +104,7 @@ class PageParams(BasePageParams): def __init__(self, currency: Currency, period: Period, accounts: list[ReportAccount], - total: TrialBalanceTotal): + total: Total): """Constructs the HTML page parameters. :param currency: The currency. @@ -118,7 +118,7 @@ class PageParams(BasePageParams): """The period.""" self.accounts: list[ReportAccount] = accounts """The accounts in the trial balance.""" - self.total: TrialBalanceTotal = total + self.total: Total = total """The total of the trial balance.""" self.period_chooser: TrialBalancePeriodChooser \ = TrialBalancePeriodChooser(currency) @@ -178,7 +178,7 @@ class TrialBalance(BaseReport): """The period.""" self.__accounts: list[ReportAccount] """The accounts in the trial balance.""" - self.__total: TrialBalanceTotal + self.__total: Total """The total of the trial balance.""" self.__set_data() @@ -224,7 +224,7 @@ class TrialBalance(BaseReport): amount=x.balance, url=get_url(accounts[x.id])) for x in balances] - self.__total = TrialBalanceTotal( + self.__total = Total( sum([x.debit for x in self.__accounts if x.debit is not None]), sum([x.credit for x in self.__accounts if x.credit is not None]))