[Fix] Strip currency symbol issue for EGP currency

This commit is contained in:
Rohit Waghchaure 2017-02-09 12:07:41 +05:30
parent f54efe0aa8
commit bd7ed3dc3d

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);