|
|
@@ -438,8 +438,9 @@ def money_in_words(number, main_currency = None, fraction_currency=None): |
|
|
|
|
|
|
|
number_format = frappe.db.get_value("Currency", main_currency, "number_format", cache=True) or \ |
|
|
|
frappe.db.get_default("number_format") or "#,###.##" |
|
|
|
|
|
|
|
fraction_length = get_number_format_info(number_format)[2] |
|
|
|
|
|
|
|
fraction_length = len(number_format.rsplit('.', 1)[-1]) |
|
|
|
n = "%.{0}f".format(fraction_length) % number |
|
|
|
main, fraction = n.split('.') |
|
|
|
|
|
|
|