Subversion Repositories SmartDukaan

Rev

Rev 35533 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35533 Rev 35544
Line 468... Line 468...
468
    if (typeof rounded != "undefined" && rounded) {
468
    if (typeof rounded != "undefined" && rounded) {
469
        x = Math.round(x);
469
        x = Math.round(x);
470
    } else {
470
    } else {
471
        x = Math.round(x * 100) / 100;
471
        x = Math.round(x * 100) / 100;
472
    }
472
    }
-
 
473
    // Handle scientific notation (e.g., 1.37E7) - convert to full decimal string
473
    x = x.toString();
474
    x = x.toLocaleString('en-US', {useGrouping: false, maximumFractionDigits: 2});
474
    x = x.split('.');
475
    x = x.split('.');
475
    var x1 = x[0];
476
    var x1 = x[0];
476
    var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
477
    var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
477
    var lastThree = x1.substring(x1.length - 3);
478
    var lastThree = x1.substring(x1.length - 3);
478
    var otherNumbers = x1.substring(0, x1.length - 3);
479
    var otherNumbers = x1.substring(0, x1.length - 3);