MCPcopy
hub / github.com/frappe/erpnext / get_number_format_info

Function get_number_format_info

banking/src/lib/numbers.ts:104–115  ·  view source on GitHub ↗
(format: string)

Source from the content-addressed store, hash-verified

102};
103
104function get_number_format_info(format: string) {
105 let info: { decimal_str: string, group_sep: string, precision?: number } = number_format_info[format as keyof typeof number_format_info];
106
107 if (!info) {
108 info = { decimal_str: ".", group_sep: "," };
109 }
110
111 // get the precision from the number format
112 info.precision = format.split(info.decimal_str).slice(1)[0].length;
113
114 return info;
115}
116
117function get_number_format(currency?: string): string {
118 return (

Callers 6

get_currency_precisionFunction · 0.85
parse_floatFunction · 0.85
on_numpad_clickedMethod · 0.85
format_numberFunction · 0.85
strip_number_groupsFunction · 0.85
getCurrencyFormatInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected