Subversion Repositories SmartDukaan

Rev

Rev 31950 | Rev 31952 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31950 Rev 31951
Line 29... Line 29...
29
        
29
        
30
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
30
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
31
        <script type="text/javascript" src="resources/js/common.js?v=${version}"></script>
31
        <script type="text/javascript" src="resources/js/common.js?v=${version}"></script>
32
        
32
        
33
        <script type="text/javascript" src="resources/js/retailer.js?v=${version}"></script>
33
        <script type="text/javascript" src="resources/js/retailer.js?v=${version}"></script>
-
 
34
        
-
 
35
        <script type="text/javascript">
-
 
36
				function numberToComma(x) {
-
 
37
				
-
 
38
				    x = x.toString();
-
 
39
				    x = x.split('.');
-
 
40
				    var x1 = x[0];
-
 
41
				    var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
-
 
42
				    var lastThree = x1.substring(x1.length - 3);
-
 
43
				    var otherNumbers = x1.substring(0, x1.length - 3);
-
 
44
				    if (x1.charAt(x1.length - 4) == ',' || x1.charAt(x1.length - 4) == '-') {
-
 
45
				        console.log(lastThree)
-
 
46
				    } else {
-
 
47
				        if (otherNumbers != '')
-
 
48
				            lastThree = ',' + lastThree;
-
 
49
				    }
-
 
50
				    return otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + (lastThree)
-
 
51
				            + x2;
-
 
52
				
-
 
53
				}
-
 
54
				
-
 
55
				$(document).ready(function () {
-
 
56
				    $('.currency').each(function (index, ele) {
-
 
57
				        if (!isNaN(parseInt($(ele).html()))) {
-
 
58
				            $(ele).html(numberToComma($(ele).html()));
-
 
59
				        }
-
 
60
				    });
-
 
61
				})
-
 
62
</script>
34
   
63
   
35
    <style>
64
    <style>
36
        .yellow {
65
        .yellow {
37
            background-color: #fdfd96;
66
            background-color: #fdfd96;
38
        }
67
        }