From 2396b105fce91f49cec9e665977bc00d625bf71d Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Sun, 1 Apr 2018 00:31:37 +0530 Subject: [PATCH] fix fmt_moeny --- frappe/utils/data.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index acbe86f030..78905b54b3 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -373,8 +373,7 @@ def fmt_money(amount, precision=None, currency=None): # 40,000.23000 -> 40,000.23 if decimal_str: - parts = str(amount).split(decimal_str) - decimals = parts[1] if len(parts) > 1 else '' + decimals = str(amount % 1).split(decimal_str)[1] if precision > 2: if len(decimals) < 3: if currency: