Renamed the "accounting.report.reports.utils.get_url" module to "accounting.report.reports.utils.urls", and shortened the names of the utilities, for readability.
This commit is contained in:
@ -30,7 +30,7 @@ from accounting.report.period import Period
|
||||
from .utils.base_page_params import BasePageParams
|
||||
from .utils.base_report import BaseReport
|
||||
from .utils.csv_export import BaseCSVRow, csv_download, period_spec
|
||||
from .utils.get_url import get_ledger_url, get_income_statement_url
|
||||
from .utils.urls import ledger_url, income_statement_url
|
||||
from .utils.option_link import OptionLink
|
||||
from .utils.period_choosers import IncomeStatementPeriodChooser
|
||||
from .utils.report_chooser import ReportChooser
|
||||
@ -188,8 +188,7 @@ class PageParams(BasePageParams):
|
||||
:return: The currency options.
|
||||
"""
|
||||
return self._get_currency_options(
|
||||
lambda x: get_income_statement_url(x, self.period),
|
||||
self.currency)
|
||||
lambda x: income_statement_url(x, self.period), self.currency)
|
||||
|
||||
|
||||
class IncomeStatement(BaseReport):
|
||||
@ -276,9 +275,9 @@ class IncomeStatement(BaseReport):
|
||||
.filter(Account.id.in_([x.id for x in balances])).all()}
|
||||
return [ReportAccount(account=accounts[x.id],
|
||||
amount=x.balance,
|
||||
url=get_ledger_url(self.__currency,
|
||||
accounts[x.id],
|
||||
self.__period))
|
||||
url=ledger_url(self.__currency,
|
||||
accounts[x.id],
|
||||
self.__period))
|
||||
for x in balances]
|
||||
|
||||
def csv(self) -> Response:
|
||||
|
Reference in New Issue
Block a user