Moved the "accounting.reports.period" and "accounting.reports.income_expense_account" utility modules into the "accounting.reports.utils" module.

This commit is contained in:
依瑪貓 2023-03-09 18:13:18 +08:00
parent 5d1f87582e
commit 0c647d8f21
14 changed files with 19 additions and 19 deletions

View File

@ -23,8 +23,8 @@ from flask import abort
from werkzeug.routing import BaseConverter
from accounting.models import Account
from .income_expense_account import IncomeExpensesAccount
from .period import Period
from .utils.income_expense_account import IncomeExpensesAccount
from .utils.period import Period
class PeriodConverter(BaseConverter):

View File

@ -26,12 +26,12 @@ from accounting import db
from accounting.locale import gettext
from accounting.models import Currency, BaseAccount, Account, Transaction, \
JournalEntry
from accounting.report.period import Period
from accounting.report.utils.base_page_params import BasePageParams
from accounting.report.utils.base_report import BaseReport
from accounting.report.utils.csv_export import BaseCSVRow, csv_download, \
period_spec
from accounting.report.utils.option_link import OptionLink
from accounting.report.utils.period import Period
from accounting.report.utils.period_choosers import PeriodChooser
from accounting.report.utils.report_chooser import ReportChooser
from accounting.report.utils.report_type import ReportType

View File

@ -27,13 +27,14 @@ from sqlalchemy.orm import selectinload
from accounting import db
from accounting.locale import gettext
from accounting.models import Currency, Account, Transaction, JournalEntry
from accounting.report.income_expense_account import IncomeExpensesAccount
from accounting.report.period import Period
from accounting.report.utils.base_page_params import BasePageParams
from accounting.report.utils.base_report import BaseReport
from accounting.report.utils.csv_export import BaseCSVRow, csv_download, \
period_spec
from accounting.report.utils.income_expense_account import \
IncomeExpensesAccount
from accounting.report.utils.option_link import OptionLink
from accounting.report.utils.period import Period
from accounting.report.utils.period_choosers import PeriodChooser
from accounting.report.utils.report_chooser import ReportChooser
from accounting.report.utils.report_type import ReportType

View File

@ -26,12 +26,12 @@ from accounting import db
from accounting.locale import gettext
from accounting.models import Currency, BaseAccount, Account, Transaction, \
JournalEntry
from accounting.report.period import Period
from accounting.report.utils.base_page_params import BasePageParams
from accounting.report.utils.base_report import BaseReport
from accounting.report.utils.csv_export import BaseCSVRow, csv_download, \
period_spec
from accounting.report.utils.option_link import OptionLink
from accounting.report.utils.period import Period
from accounting.report.utils.period_choosers import PeriodChooser
from accounting.report.utils.report_chooser import ReportChooser
from accounting.report.utils.report_type import ReportType

View File

@ -26,11 +26,11 @@ from sqlalchemy.orm import selectinload
from accounting.locale import gettext
from accounting.models import Currency, Account, Transaction, JournalEntry
from accounting.report.period import Period
from accounting.report.utils.base_page_params import BasePageParams
from accounting.report.utils.base_report import BaseReport
from accounting.report.utils.csv_export import BaseCSVRow, csv_download, \
period_spec
from accounting.report.utils.period import Period
from accounting.report.utils.period_choosers import PeriodChooser
from accounting.report.utils.report_chooser import ReportChooser
from accounting.report.utils.report_type import ReportType

View File

@ -27,12 +27,12 @@ from sqlalchemy.orm import selectinload
from accounting import db
from accounting.locale import gettext
from accounting.models import Currency, Account, Transaction, JournalEntry
from accounting.report.period import Period
from accounting.report.utils.base_page_params import BasePageParams
from accounting.report.utils.base_report import BaseReport
from accounting.report.utils.csv_export import BaseCSVRow, csv_download, \
period_spec
from accounting.report.utils.option_link import OptionLink
from accounting.report.utils.period import Period
from accounting.report.utils.period_choosers import PeriodChooser
from accounting.report.utils.report_chooser import ReportChooser
from accounting.report.utils.report_type import ReportType

View File

@ -25,12 +25,12 @@ from flask import Response, render_template
from accounting import db
from accounting.locale import gettext
from accounting.models import Currency, Account, Transaction, JournalEntry
from accounting.report.period import Period
from accounting.report.utils.base_page_params import BasePageParams
from accounting.report.utils.base_report import BaseReport
from accounting.report.utils.csv_export import BaseCSVRow, csv_download, \
period_spec
from accounting.report.utils.option_link import OptionLink
from accounting.report.utils.period import Period
from accounting.report.utils.period_choosers import PeriodChooser
from accounting.report.utils.report_chooser import ReportChooser
from accounting.report.utils.report_type import ReportType

View File

@ -25,7 +25,7 @@ from io import StringIO
from flask import Response
from accounting.report.period import Period
from .period import Period
class BaseCSVRow(ABC):

View File

@ -24,9 +24,8 @@ import typing as t
from datetime import date
from accounting.models import Transaction
from accounting.report.period import Period, ThisMonth, LastMonth, \
SinceLastMonth, ThisYear, LastYear, Today, Yesterday, AllTime, \
TemplatePeriod, YearPeriod
from .period import Period, ThisMonth, LastMonth, SinceLastMonth, ThisYear, \
LastYear, Today, Yesterday, AllTime, TemplatePeriod, YearPeriod
class PeriodChooser:

View File

@ -28,10 +28,10 @@ from flask_babel import LazyString
from accounting import db
from accounting.locale import gettext
from accounting.models import Currency, Account
from accounting.report.income_expense_account import IncomeExpensesAccount
from accounting.report.period import Period
from accounting.template_globals import default_currency_code
from .income_expense_account import IncomeExpensesAccount
from .option_link import OptionLink
from .period import Period
from .report_type import ReportType
from .urls import journal_url, ledger_url, income_expenses_url, \
trial_balance_url, income_statement_url, balance_sheet_url

View File

@ -20,8 +20,8 @@
from flask import url_for
from accounting.models import Currency, Account
from accounting.report.income_expense_account import IncomeExpensesAccount
from accounting.report.period import Period
from .income_expense_account import IncomeExpensesAccount
from .period import Period
def journal_url(period: Period) \

View File

@ -21,11 +21,11 @@ from flask import Blueprint, request, Response
from accounting.models import Currency, Account
from accounting.utils.permission import has_permission, can_view
from .income_expense_account import IncomeExpensesAccount
from .period import Period
from .reports import Journal, Ledger, IncomeExpenses, TrialBalance, \
IncomeStatement, BalanceSheet, Search
from .template_filters import format_amount
from .utils.income_expense_account import IncomeExpensesAccount
from .utils.period import Period
bp: Blueprint = Blueprint("report", __name__)
"""The view blueprint for the reports."""