diff --git a/src/accounting/report/report_chooser.py b/src/accounting/report/report_chooser.py index 473f6ca..925d587 100644 --- a/src/accounting/report/report_chooser.py +++ b/src/accounting/report/report_chooser.py @@ -21,7 +21,6 @@ This file is largely taken from the NanoParma ERP project, first written in """ import typing as t -from enum import Enum from flask import url_for from flask_babel import LazyString @@ -31,12 +30,7 @@ from accounting.locale import gettext from accounting.models import Currency from accounting.template_globals import default_currency_code from .period import Period - - -class ReportType(Enum): - """The report types.""" - JOURNAL: str = "journal" - """The journal.""" +from .report_type import ReportType class ReportLink: diff --git a/src/accounting/report/report_type.py b/src/accounting/report/report_type.py new file mode 100644 index 0000000..a3bafdc --- /dev/null +++ b/src/accounting/report/report_type.py @@ -0,0 +1,26 @@ +# The Mia! Accounting Flask Project. +# Author: imacat@mail.imacat.idv.tw (imacat), 2023/3/4 + +# Copyright (c) 2023 imacat. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""The report types. + +""" +from enum import Enum + + +class ReportType(Enum): + """The report types.""" + JOURNAL: str = "journal" + """The journal.""" diff --git a/src/accounting/report/reports.py b/src/accounting/report/reports.py index b70b251..f3eb715 100644 --- a/src/accounting/report/reports.py +++ b/src/accounting/report/reports.py @@ -32,8 +32,9 @@ from accounting.utils.pagination import Pagination from accounting.utils.txn_types import TransactionType from .period import Period from .period_choosers import PeriodChooser, JournalPeriodChooser -from .report_chooser import ReportChooser, ReportType +from .report_chooser import ReportChooser from .report_rows import ReportRow, JournalRow +from .report_type import ReportType class JournalEntryReport(ABC):