Moved the ReportType enumeration from the "accounting.report.report_chooser" module to the new "accounting.report.report_type" module.
This commit is contained in:
parent
250f4ff1ae
commit
b705795b44
@ -21,7 +21,6 @@ This file is largely taken from the NanoParma ERP project, first written in
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
import typing as t
|
import typing as t
|
||||||
from enum import Enum
|
|
||||||
|
|
||||||
from flask import url_for
|
from flask import url_for
|
||||||
from flask_babel import LazyString
|
from flask_babel import LazyString
|
||||||
@ -31,12 +30,7 @@ from accounting.locale import gettext
|
|||||||
from accounting.models import Currency
|
from accounting.models import Currency
|
||||||
from accounting.template_globals import default_currency_code
|
from accounting.template_globals import default_currency_code
|
||||||
from .period import Period
|
from .period import Period
|
||||||
|
from .report_type import ReportType
|
||||||
|
|
||||||
class ReportType(Enum):
|
|
||||||
"""The report types."""
|
|
||||||
JOURNAL: str = "journal"
|
|
||||||
"""The journal."""
|
|
||||||
|
|
||||||
|
|
||||||
class ReportLink:
|
class ReportLink:
|
||||||
|
26
src/accounting/report/report_type.py
Normal file
26
src/accounting/report/report_type.py
Normal file
@ -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."""
|
@ -32,8 +32,9 @@ from accounting.utils.pagination import Pagination
|
|||||||
from accounting.utils.txn_types import TransactionType
|
from accounting.utils.txn_types import TransactionType
|
||||||
from .period import Period
|
from .period import Period
|
||||||
from .period_choosers import PeriodChooser, JournalPeriodChooser
|
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_rows import ReportRow, JournalRow
|
||||||
|
from .report_type import ReportType
|
||||||
|
|
||||||
|
|
||||||
class JournalEntryReport(ABC):
|
class JournalEntryReport(ABC):
|
||||||
|
Loading…
Reference in New Issue
Block a user