Browse Source

Fixed number format

version-14
Anand Doshi 11 years ago
parent
commit
0971c5847a
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      frappe/public/js/frappe/misc/number_format.js
  2. +1
    -1
      frappe/utils/__init__.py

+ 1
- 1
frappe/public/js/frappe/misc/number_format.js View File

@@ -115,7 +115,7 @@ window.format_number = function(v, format, decimals){
}

// join decimal
part[1] = part[1] ? (info.decimal_str + part[1]) : "";
part[1] = (part[1] && info.decimal_str) ? (info.decimal_str + part[1]) : "";

// join
return (is_negative ? "-" : "") + part[0] + part[1];


+ 1
- 1
frappe/utils/__init__.py View File

@@ -382,7 +382,7 @@ def fmt_money(amount, precision=None, currency=None):

parts.reverse()

amount = comma_str.join(parts) + (precision and (decimal_str + decimals) or "")
amount = comma_str.join(parts) + ((precision and decimal_str) and (decimal_str + decimals) or "")
amount = minus + amount

if currency:


Loading…
Cancel
Save