diff --git a/src/accounting/report/utils/ie_account.py b/src/accounting/report/utils/ie_account.py index 5d8cbef..5fb0e18 100644 --- a/src/accounting/report/utils/ie_account.py +++ b/src/accounting/report/utils/ie_account.py @@ -66,21 +66,21 @@ class IncomeExpensesAccount: return account -def default_io_account_code() -> str: +def default_ie_account_code() -> str: """Returns the default account code for the income and expenses log. :return: The default account code for the income and expenses log. """ with current_app.app_context(): - return current_app.config.get("DEFAULT_IO_ACCOUNT", Account.CASH_CODE) + return current_app.config.get("DEFAULT_IE_ACCOUNT", Account.CASH_CODE) -def default_io_account() -> IncomeExpensesAccount: +def default_ie_account() -> IncomeExpensesAccount: """Returns the default account for the income and expenses log. :return: The default account for the income and expenses log. """ - code: str = default_io_account_code() + code: str = default_ie_account_code() if code == IncomeExpensesAccount.CURRENT_AL_CODE: return IncomeExpensesAccount.current_assets_and_liabilities() return IncomeExpensesAccount(Account.find_by_code(code)) diff --git a/src/accounting/report/utils/urls.py b/src/accounting/report/utils/urls.py index dcb8889..4b7987b 100644 --- a/src/accounting/report/utils/urls.py +++ b/src/accounting/report/utils/urls.py @@ -22,7 +22,7 @@ from flask import url_for from accounting.models import Currency, Account from accounting.report.period import Period from accounting.template_globals import default_currency_code -from .ie_account import IncomeExpensesAccount, default_io_account_code +from .ie_account import IncomeExpensesAccount, default_ie_account_code def journal_url(period: Period) \ @@ -64,7 +64,7 @@ def income_expenses_url(currency: Currency, account: IncomeExpensesAccount, :return: The URL of the income and expenses log. """ if currency.code == default_currency_code() \ - and account.code == default_io_account_code() \ + and account.code == default_ie_account_code() \ and period.is_default: return url_for("accounting.report.default") if period.is_default: diff --git a/src/accounting/report/views.py b/src/accounting/report/views.py index 14b55ca..2401b16 100644 --- a/src/accounting/report/views.py +++ b/src/accounting/report/views.py @@ -27,7 +27,7 @@ from accounting.utils.permission import has_permission, can_view from .reports import Journal, Ledger, IncomeExpenses, TrialBalance, \ IncomeStatement, BalanceSheet, Search from .template_filters import format_amount -from .utils.ie_account import IncomeExpensesAccount, default_io_account +from .utils.ie_account import IncomeExpensesAccount, default_ie_account bp: Blueprint = Blueprint("report", __name__) """The view blueprint for the reports.""" @@ -43,7 +43,7 @@ def get_default_report() -> str | Response: """ return __get_income_expenses( db.session.get(Currency, default_currency_code()), - default_io_account(), + default_ie_account(), get_period())