Subversion Repositories SmartDukaan

Rev

Rev 32937 | Rev 33700 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
29966 amit.gupta 1
<html lang="en">
2
<head>
29983 amit.gupta 3
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
31538 amit.gupta 4
    <meta http-equiv="refresh" content="180">
29988 amit.gupta 5
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
6
          integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
29966 amit.gupta 7
    <style>
8
        html, body {
29983 amit.gupta 9
            margin-top: 10px;
29966 amit.gupta 10
            padding: 0;
11
        }
12
 
13
 
14
        td, th {
29981 amit.gupta 15
            font-size: 20px;
29966 amit.gupta 16
        }
17
 
29988 amit.gupta 18
 
19
        .table td, .table th {
20
            padding: 0.25rem;
21
        }
22
 
30786 amit.gupta 23
        tr:first-child.green td {
29981 amit.gupta 24
            font-weight: bold;
29982 amit.gupta 25
            background-color: #00d6b2;
29981 amit.gupta 26
        }
29982 amit.gupta 27
 
28
        td {
29983 amit.gupta 29
            font-size: 24px;
29982 amit.gupta 30
        }
29966 amit.gupta 31
    </style>
32
    <link href="../resources/css/brand-logo.css" rel="stylesheet"/>
33
</head>
34
<body>
32938 amit.gupta 35
#if($isGtEqL2)
29994 amit.gupta 36
<div class="container-fluid">
29983 amit.gupta 37
    #foreach($brands in $brandParts)
38
        <table class="table table-bordered table-striped">
29966 amit.gupta 39
            <thead>
40
            <tr>
29981 amit.gupta 41
                <th rowspan="2">Region</th>
29966 amit.gupta 42
                #foreach($brand in $brands)
43
                    <th colspan="3" class="$brand.toLowerCase()"><p>$brand</p></th>
44
                #end
45
            </tr>
46
            <tr>
47
                #foreach($brand in $brands)
48
                    <th>TODAY PO</th>
29973 amit.gupta 49
                    <th>TODAY PO<br> Billed</th>
29966 amit.gupta 50
                    <th>Total Billed</th>
51
                #end
52
            </tr>
53
            </thead>
54
            <tbody>
55
                #foreach($brandRegionModelEntry in $brandRegionModelMap.entrySet())
30786 amit.gupta 56
                <tr class="green">
29981 amit.gupta 57
                    <td><b>$warehouseMap.get($brandRegionModelEntry.getKey())</b></td>
29966 amit.gupta 58
                    #foreach($brand in $brands)
59
                        #set($obj = $brandRegionModelEntry.getValue().get($brand))
29972 amit.gupta 60
                        #if($obj.getTodayPOValue())
30036 amit.gupta 61
                            <td class="currency">$obj.getTodayPOValue()</td>
29972 amit.gupta 62
                        #else
63
                            <td>-</td>
64
                        #end
65
                        #if($obj.getTodayPOBilledValue())
30036 amit.gupta 66
                            <td class="currency">$obj.getTodayPOBilledValue()</td>
29972 amit.gupta 67
                        #else
68
                            <td>-</td>
69
                        #end
70
                        #if($obj.getTodayBilledValue())
30036 amit.gupta 71
                            <td class="currency">$obj.getTodayBilledValue()</td>
29972 amit.gupta 72
                        #else
73
                            <td>-</td>
74
                        #end
29966 amit.gupta 75
                    #end
76
 
77
                </tr>
78
                #end
79
            </tbody>
80
        </table>
29983 amit.gupta 81
    #end
30787 amit.gupta 82
</div>
32938 amit.gupta 83
#if($partnerTypeRegionModelMap)
31538 amit.gupta 84
<div class="container-fluid">
85
    <table class="table table-bordered table-striped">
86
        <thead>
87
        <tr>
31545 amit.gupta 88
            <th>Regionwise Billed Partners</th>
31538 amit.gupta 89
            #foreach($partnerType in $partnerTypes)
31543 amit.gupta 90
                <th>$partnerType.getValue()<br>Today/MTD/Total</th>
31538 amit.gupta 91
            #end
92
        </tr>
93
        </thead>
94
        <tbody>
95
            #foreach($warehouseEntry in $warehouseMap.entrySet())
96
                #if($warehouseEntry.getKey()!=0)
97
                <tr>
98
                    <td><b>$warehouseEntry.getValue()</b></td>
99
                    #foreach($partnerType in $partnerTypes)
100
                        <td>
101
                            #if($partnerTypeRegionModelMap.containsKey($warehouseEntry.getKey()))
102
                                #if($partnerTypeRegionModelMap.get($warehouseEntry.getKey()).containsKey($partnerType.getValue()))
103
                                    #set ($partnerTypeRegionModel=$partnerTypeRegionModelMap.get($warehouseEntry.getKey()).get($partnerType.getValue()))
104
                                    $partnerTypeRegionModel.getTodayCount()/$partnerTypeRegionModel.getMtdCount()
105
                                    /$partnerTypeRegionModel.getTotalCount()
106
                                #else
107
                                    -
108
                                #end
109
                            #else
110
                                -
111
                            #end
112
                        </td>
113
                    #end
114
                </tr>
115
                #end
116
            #end
117
        </tbody>
118
    </table>
119
</div>
32938 amit.gupta 120
#end
31254 amit.gupta 121
<div class="container-fluid ">
31345 amit.gupta 122
    <h3>Total Collection(Overall Collections/Overall Collections + Loan utilizations))</h3>
29994 amit.gupta 123
    <div class="row">
124
        #foreach($warehouseEntry in $warehouseMap.entrySet())
31345 amit.gupta 125
            <div class="col-lg-2" style="font-size: 20px">
29994 amit.gupta 126
                $warehouseEntry.getValue() -
127
                #if($warehouseCollectionMap.get($warehouseEntry.getKey()))
31250 amit.gupta 128
                    <span class="currency">$warehouseCollectionMap.get($warehouseEntry.getKey())</span>
29994 amit.gupta 129
                #else
130
 
131
                #end
31242 amit.gupta 132
                /
31250 amit.gupta 133
                #if($warehousePgCollectionMap.get($warehouseEntry.getKey()))
31251 amit.gupta 134
                    <span class="currency">$warehousePgCollectionMap.get($warehouseEntry.getKey())</span>
31242 amit.gupta 135
                #else
136
 
137
                #end
138
 
29994 amit.gupta 139
            </div>
140
        #end
141
    </div>
30784 amit.gupta 142
</div>
30783 amit.gupta 143
    #parse("today_target.vm")
32938 amit.gupta 144
#end
29983 amit.gupta 145
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
146
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
147
        crossorigin="anonymous"></script>
148
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
149
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
150
        crossorigin="anonymous"></script>
151
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
152
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
153
        crossorigin="anonymous"></script>
30036 amit.gupta 154
<script type="text/javascript">
155
    function numberToComma(x) {
29966 amit.gupta 156
 
30036 amit.gupta 157
        x = x.toString();
158
        x = x.split('.');
159
        var x1 = x[0];
160
        var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
161
        var lastThree = x1.substring(x1.length - 3);
162
        var otherNumbers = x1.substring(0, x1.length - 3);
163
        if (x1.charAt(x1.length - 4) == ',' || x1.charAt(x1.length - 4) == '-') {
164
            console.log(lastThree)
165
        } else {
166
            if (otherNumbers != '')
167
                lastThree = ',' + lastThree;
168
        }
169
        return otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + (lastThree)
170
                + x2;
171
 
172
    }
173
 
174
    $(document).ready(function () {
175
        $('.currency').each(function (index, ele) {
176
            if (!isNaN(parseInt($(ele).html()))) {
177
                $(ele).html(numberToComma($(ele).html()));
178
            }
179
        });
180
    })
181
</script>
29966 amit.gupta 182
</body>
183
</html>