Added the option management, and moved the configuration of the default currency, the default account for the income and expenses log, and the recurring expenses and incomes to the options.
This commit is contained in:
@ -21,6 +21,7 @@ from flask import Blueprint, request, Response
|
||||
|
||||
from accounting import db
|
||||
from accounting.models import Currency, Account
|
||||
from accounting.option.options import options
|
||||
from accounting.report.period import Period, get_period
|
||||
from accounting.template_globals import default_currency_code
|
||||
from accounting.utils.ie_account import IncomeExpensesAccount
|
||||
@ -28,7 +29,6 @@ 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 default_ie_account
|
||||
|
||||
bp: Blueprint = Blueprint("report", __name__)
|
||||
"""The view blueprint for the reports."""
|
||||
@ -44,7 +44,7 @@ def get_default_report() -> str | Response:
|
||||
"""
|
||||
return __get_income_expenses(
|
||||
db.session.get(Currency, default_currency_code()),
|
||||
default_ie_account(),
|
||||
options.default_ie_account,
|
||||
get_period())
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user