Hash based number formats have been removed. Intl.NumberFormat will be used instead. This is locale dependent, each country has an associated locale from which the number format is obtained.
frappe.formatNumber(value) makes use of Intl.NumberFormat on the passed value. Valid values are:
string like numbers
pesa objects
numbers
frappe.formatCurrency(value, currency) uses the above function and prepends the currency sigil obtained from the currency code having the format "XXX". Intl.NumberFormat was not used in currency mode here cause the sigil used to not always load.
Changes
Currency handling using
pesa
frappe.pesa
to be used to handle money related quantities.frappe.pesa
is initialized withSystemSettings#internalPrecision
andAccountingSettings#currency
.frappe.db.getSingleValues
Number Formatting
Hash based number formats have been removed.
Intl.NumberFormat
will be used instead. This is locale dependent, each country has an associated locale from which the number format is obtained.frappe.formatNumber(value)
makes use ofIntl.NumberFormat
on the passed value. Valid values are:pesa
objectsfrappe.formatCurrency(value, currency)
uses the above function and prepends the currency sigil obtained from the currency code having the format"XXX"
.Intl.NumberFormat
was not used in currency mode here cause the sigil used to not always load.Frappe Books: https://github.com/frappe/books/pull/268