fix: use system number format for currency precision (#36648)
* fix: use system number format for currency precision * fix: remove default format
This commit is contained in:
parent
1d9eb802fc
commit
1307ae33eb
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue