Subversion Repositories SmartDukaan

Rev

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

Rev 29994 Rev 30036
Line 55... Line 55...
55
                <tr>
55
                <tr>
56
                    <td><b>$warehouseMap.get($brandRegionModelEntry.getKey())</b></td>
56
                    <td><b>$warehouseMap.get($brandRegionModelEntry.getKey())</b></td>
57
                    #foreach($brand in $brands)
57
                    #foreach($brand in $brands)
58
                        #set($obj = $brandRegionModelEntry.getValue().get($brand))
58
                        #set($obj = $brandRegionModelEntry.getValue().get($brand))
59
                        #if($obj.getTodayPOValue())
59
                        #if($obj.getTodayPOValue())
60
                            <td>$nf.format($obj.getTodayPOValue())</td>
60
                            <td class="currency">$obj.getTodayPOValue()</td>
61
                        #else
61
                        #else
62
                            <td>-</td>
62
                            <td>-</td>
63
                        #end
63
                        #end
64
                        #if($obj.getTodayPOBilledValue())
64
                        #if($obj.getTodayPOBilledValue())
65
                            <td>$nf.format($obj.getTodayPOBilledValue())</td>
65
                            <td class="currency">$obj.getTodayPOBilledValue()</td>
66
                        #else
66
                        #else
67
                            <td>-</td>
67
                            <td>-</td>
68
                        #end
68
                        #end
69
                        #if($obj.getTodayBilledValue())
69
                        #if($obj.getTodayBilledValue())
70
                            <td>$nf.format($obj.getTodayBilledValue())</td>
70
                            <td class="currency">$obj.getTodayBilledValue()</td>
71
                        #else
71
                        #else
72
                            <td>-</td>
72
                            <td>-</td>
73
                        #end
73
                        #end
74
                    #end
74
                    #end
75
 
75
 
Line 81... Line 81...
81
    #end
81
    #end
82
<div class="container">
82
<div class="container">
83
    <h3>Total Collection</h3>
83
    <h3>Total Collection</h3>
84
    <div class="row">
84
    <div class="row">
85
        #foreach($warehouseEntry in $warehouseMap.entrySet())
85
        #foreach($warehouseEntry in $warehouseMap.entrySet())
86
            <div class="col-lg-3" style="font-size: 24px">
86
            <div class="col-lg-3 currency" style="font-size: 24px">
87
                $warehouseEntry.getValue() -
87
                $warehouseEntry.getValue() -
88
                #if($warehouseCollectionMap.get($warehouseEntry.getKey()))
88
                #if($warehouseCollectionMap.get($warehouseEntry.getKey()))
89
                    $nf.format($warehouseCollectionMap.get($warehouseEntry.getKey()))
89
                    $warehouseCollectionMap.get($warehouseEntry.getKey()))
90
                #else
90
                #else
91
                    0
91
                    0
92
                #end
92
                #end
93
            </div>
93
            </div>
94
        #end
94
        #end
Line 101... Line 101...
101
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
101
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
102
        crossorigin="anonymous"></script>
102
        crossorigin="anonymous"></script>
103
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
103
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
104
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
104
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
105
        crossorigin="anonymous"></script>
105
        crossorigin="anonymous"></script>
-
 
106
<script type="text/javascript">
-
 
107
    function numberToComma(x) {
106
 
108
 
-
 
109
        x = x.toString();
-
 
110
        x = x.split('.');
-
 
111
        var x1 = x[0];
-
 
112
        var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
-
 
113
        var lastThree = x1.substring(x1.length - 3);
-
 
114
        var otherNumbers = x1.substring(0, x1.length - 3);
-
 
115
        if (x1.charAt(x1.length - 4) == ',' || x1.charAt(x1.length - 4) == '-') {
-
 
116
            console.log(lastThree)
-
 
117
        } else {
-
 
118
            if (otherNumbers != '')
-
 
119
                lastThree = ',' + lastThree;
-
 
120
        }
-
 
121
        return otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + (lastThree)
-
 
122
                + x2;
-
 
123
 
-
 
124
    }
-
 
125
 
-
 
126
    $(document).ready(function () {
-
 
127
        $('.currency').each(function (index, ele) {
-
 
128
            if (!isNaN(parseInt($(ele).html()))) {
-
 
129
                $(ele).html(numberToComma($(ele).html()));
-
 
130
            }
-
 
131
        });
-
 
132
    })
-
 
133
</script>
107
</body>
134
</body>
108
</html>
135
</html>
109
136