Browse Source

[Fix] Strip currency symbol issue for EGP currency

version-14
Rohit Waghchaure 8 years ago
parent
commit
bd7ed3dc3d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      frappe/public/js/frappe/misc/number_format.js

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

@@ -12,7 +12,8 @@ function flt(v, decimals, number_format) {
// strip currency symbol if exists
if(v.indexOf(" ")!=-1) {
// using slice(1).join(" ") because space could also be a group separator
v = isNaN(parseFloat(v.split(" ")[0])) ? v.split(" ").slice(1).join(" ") : v;
last_index = v.split(" ").length - 1;
v = isNaN(parseFloat(v.split(" ")[0])) ? v.split(" ").slice(last_index).join(" ") : v;
}

v = strip_number_groups(v, number_format);


Loading…
Cancel
Save