Browse Source

Merge pull request #2690 from rohitwaghchaure/strip_currecny_issue

[Fix] Strip currency symbol issue for EGP currency
version-14
Nabin Hait 8 years ago
committed by GitHub
parent
commit
383b0ec691
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 // strip currency symbol if exists
if(v.indexOf(" ")!=-1) { if(v.indexOf(" ")!=-1) {
// using slice(1).join(" ") because space could also be a group separator // using slice(1).join(" ") because space could also be a group separator
v = isNaN(parseFloat(v.split(" ")[0])) ? v.split(" ").slice(1).join(" ") : v;
parts = v.split(" ");
v = isNaN(parseFloat(parts[0])) ? parts.slice(parts.length - 1).join(" ") : v;
} }


v = strip_number_groups(v, number_format); v = strip_number_groups(v, number_format);


Loading…
Cancel
Save