diff --git a/frappe/model/meta.py b/frappe/model/meta.py index c88340fb90..9e5624252d 100644 --- a/frappe/model/meta.py +++ b/frappe/model/meta.py @@ -912,11 +912,10 @@ def get_field_precision(df, doc=None, currency=None): def get_precision_from_currency_format(currency: str) -> int: """Get precision from currency format string if applicable.""" - from frappe.locale import get_number_format from frappe.utils.number_format import NumberFormat use_format_from_currency = frappe.get_system_settings("use_number_format_from_currency") - number_format = get_number_format() + number_format = NumberFormat.from_string(frappe.db.get_default("number_format")) if use_format_from_currency: currency_format = frappe.db.get_value("Currency", currency, "number_format", cache=True) number_format = NumberFormat.from_string(currency_format) if currency_format else number_format