Moved the format_amount and format_date template filters from the "accounting.transaction.template_filters" module to the "accounting.template_filters" module, and rename the filters from "accounting_txn_format_amount" and "accounting_txn_format_date" to "accounting_format_amount" and "accounting_format_date", respectively. They will not only be used in the transaction management, but also the reports.

This commit is contained in:
2023-03-03 18:38:11 +08:00
parent 9065686cc5
commit cc958a39b3
15 changed files with 94 additions and 71 deletions

View File

@ -58,6 +58,10 @@ def init_app(app: Flask, user_utils: AbstractUserUtils,
template_folder="templates",
static_folder="static")
from .template_filters import format_amount, format_date
bp.add_app_template_filter(format_amount, "accounting_format_amount")
bp.add_app_template_filter(format_date, "accounting_format_date")
from . import locale
locale.init_app(app, bp)