Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | 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">
29976 amit.gupta 4
    <meta http-equiv="refresh" content="120">
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>
29994 amit.gupta 35
<div class="container-fluid">
29983 amit.gupta 36
    #foreach($brands in $brandParts)
37
        <table class="table table-bordered table-striped">
29966 amit.gupta 38
            <thead>
39
            <tr>
29981 amit.gupta 40
                <th rowspan="2">Region</th>
29966 amit.gupta 41
                #foreach($brand in $brands)
42
                    <th colspan="3" class="$brand.toLowerCase()"><p>$brand</p></th>
43
                #end
44
            </tr>
45
            <tr>
46
                #foreach($brand in $brands)
47
                    <th>TODAY PO</th>
29973 amit.gupta 48
                    <th>TODAY PO<br> Billed</th>
29966 amit.gupta 49
                    <th>Total Billed</th>
50
                #end
51
            </tr>
52
            </thead>
53
            <tbody>
54
                #foreach($brandRegionModelEntry in $brandRegionModelMap.entrySet())
30786 amit.gupta 55
                <tr class="green">
29981 amit.gupta 56
                    <td><b>$warehouseMap.get($brandRegionModelEntry.getKey())</b></td>
29966 amit.gupta 57
                    #foreach($brand in $brands)
58
                        #set($obj = $brandRegionModelEntry.getValue().get($brand))
29972 amit.gupta 59
                        #if($obj.getTodayPOValue())
30036 amit.gupta 60
                            <td class="currency">$obj.getTodayPOValue()</td>
29972 amit.gupta 61
                        #else
62
                            <td>-</td>
63
                        #end
64
                        #if($obj.getTodayPOBilledValue())
30036 amit.gupta 65
                            <td class="currency">$obj.getTodayPOBilledValue()</td>
29972 amit.gupta 66
                        #else
67
                            <td>-</td>
68
                        #end
69
                        #if($obj.getTodayBilledValue())
30036 amit.gupta 70
                            <td class="currency">$obj.getTodayBilledValue()</td>
29972 amit.gupta 71
                        #else
72
                            <td>-</td>
73
                        #end
29966 amit.gupta 74
                    #end
75
 
76
                </tr>
77
                #end
78
            </tbody>
79
        </table>
29983 amit.gupta 80
    #end
30787 amit.gupta 81
</div>
29994 amit.gupta 82
<div class="container">
83
    <h3>Total Collection</h3>
84
    <div class="row">
85
        #foreach($warehouseEntry in $warehouseMap.entrySet())
30038 amit.gupta 86
            <div class="col-lg-3" style="font-size: 24px">
29994 amit.gupta 87
                $warehouseEntry.getValue() -
88
                #if($warehouseCollectionMap.get($warehouseEntry.getKey()))
31250 amit.gupta 89
                    <span class="currency">$warehouseCollectionMap.get($warehouseEntry.getKey())</span>
29994 amit.gupta 90
                #else
91
 
92
                #end
31242 amit.gupta 93
                /
31250 amit.gupta 94
                #if($warehousePgCollectionMap.get($warehouseEntry.getKey()))
31242 amit.gupta 95
                    <span class="currency">$warehouseCollectionPgMap.get($warehouseEntry.getKey())</span>
96
                #else
97
 
98
                #end
99
 
29994 amit.gupta 100
            </div>
101
        #end
102
    </div>
30784 amit.gupta 103
</div>
30783 amit.gupta 104
    #parse("today_target.vm")
29983 amit.gupta 105
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
106
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
107
        crossorigin="anonymous"></script>
108
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
109
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
110
        crossorigin="anonymous"></script>
111
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
112
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
113
        crossorigin="anonymous"></script>
30036 amit.gupta 114
<script type="text/javascript">
115
    function numberToComma(x) {
29966 amit.gupta 116
 
30036 amit.gupta 117
        x = x.toString();
118
        x = x.split('.');
119
        var x1 = x[0];
120
        var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
121
        var lastThree = x1.substring(x1.length - 3);
122
        var otherNumbers = x1.substring(0, x1.length - 3);
123
        if (x1.charAt(x1.length - 4) == ',' || x1.charAt(x1.length - 4) == '-') {
124
            console.log(lastThree)
125
        } else {
126
            if (otherNumbers != '')
127
                lastThree = ',' + lastThree;
128
        }
129
        return otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + (lastThree)
130
                + x2;
131
 
132
    }
133
 
134
    $(document).ready(function () {
135
        $('.currency').each(function (index, ele) {
136
            if (!isNaN(parseInt($(ele).html()))) {
137
                $(ele).html(numberToComma($(ele).html()));
138
            }
139
        });
140
    })
141
</script>
29966 amit.gupta 142
</body>
143
</html>