Subversion Repositories SmartDukaan

Rev

Rev 30780 | Rev 31835 | 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">
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
 
30771 amit.gupta 23
        /*tr:first-child td {
29981 amit.gupta 24
            font-weight: bold;
29982 amit.gupta 25
            background-color: #00d6b2;
30771 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">
30771 amit.gupta 36
    <table class="table table-bordered table-striped">
37
        <thead>
38
        <tr>
39
            <th rowspan="2">RBM</th>
40
            <th rowspan="2">Count</th>
41
            <th colspan="2">Collection</th>
42
            <th colspan="2">Secondary</th>
31833 amit.gupta 43
            <th rowspan="2" style="width: 20%" colspan="5">Active</th>
44
            <th rowspan="2" style="width: 20%" colspan="5">Low Sale</th>
45
            <th rowspan="2" style="width: 20%" colspan="5">Disputed</th>
30771 amit.gupta 46
        </tr>
47
        <tr>
48
            <th>Target</th>
30774 amit.gupta 49
            <th>Achieved</th>
30771 amit.gupta 50
            <th>Target</th>
30774 amit.gupta 51
            <th>Achieved</th>
31833 amit.gupta 52
            <th>Plan Today</th>
53
            <th>Carry Fwd</th>
54
            <th>Untouched</th>
55
            <th>Plan Fut</th>
56
            <th>Normal</th>
57
            <th>Plan Today</th>
58
            <th>Carry Fwd</th>
59
            <th>Untouched</th>
60
            <th>Plan Fut</th>
61
            <th>Normal</th>
62
            <th>Plan Today</th>
63
            <th>Carry Fwd</th>
64
            <th>Untouched</th>
65
            <th>Plan Fut</th>
66
            <th>Normal</th>
67
 
30771 amit.gupta 68
        </tr>
69
        </thead>
70
        <tbody>
71
            #foreach($summaryModel in $summaryModels)
29966 amit.gupta 72
            <tr>
30771 amit.gupta 73
                <td>$summaryModel.getAuthName()</td>
74
                <td>$summaryModel.getPartnersCommunicated()</td>
75
                <td class="currency">$summaryModel.getCollectionTarget()</td>
76
                <td class="currency">$summaryModel.getCollection()</td>
77
                <td class="currency">$summaryModel.getSecondaryTarget()</td>
78
                <td class="currency">$summaryModel.getSecondary()</td>
31833 amit.gupta 79
                #foreach($entry in $summaryModel.setChartLeadModelMap().entrySet())
80
 
81
                    #set($datasets = $entry.getData().getDatasets().get(0))
30771 amit.gupta 82
                    #set($dataPoints=$datasets.getData())
83
                    #set($bgColors=$datasets.getBackgroundColor())
84
                    #set($labels = $summaryModel.getChartLeadModel().getData().getLabels())
30778 amit.gupta 85
                    #set($total=0)
30771 amit.gupta 86
                    #foreach($dataPoint in $dataPoints)
87
                        #set($count = $velocityCount - 1)
31833 amit.gupta 88
                        <td>$bgColors.get($count),$labels.get($count)
89
                            - #if(!$dataPoint) 0 #else $dataPoint #end
90
                        </td>
30771 amit.gupta 91
                    #end
31833 amit.gupta 92
                #end
29966 amit.gupta 93
            </tr>
30771 amit.gupta 94
            #end
95
        </tbody>
96
    </table>
29988 amit.gupta 97
</div>
29983 amit.gupta 98
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
99
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
100
        crossorigin="anonymous"></script>
101
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
102
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
103
        crossorigin="anonymous"></script>
104
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
105
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
106
        crossorigin="anonymous"></script>
30036 amit.gupta 107
<script type="text/javascript">
108
    function numberToComma(x) {
29966 amit.gupta 109
 
30036 amit.gupta 110
        x = x.toString();
111
        x = x.split('.');
112
        var x1 = x[0];
113
        var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
114
        var lastThree = x1.substring(x1.length - 3);
115
        var otherNumbers = x1.substring(0, x1.length - 3);
116
        if (x1.charAt(x1.length - 4) == ',' || x1.charAt(x1.length - 4) == '-') {
117
            console.log(lastThree)
118
        } else {
119
            if (otherNumbers != '')
120
                lastThree = ',' + lastThree;
121
        }
122
        return otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + (lastThree)
123
                + x2;
124
 
125
    }
126
 
127
    $(document).ready(function () {
128
        $('.currency').each(function (index, ele) {
129
            if (!isNaN(parseInt($(ele).html()))) {
130
                $(ele).html(numberToComma($(ele).html()));
131
            }
132
        });
133
    })
134
</script>
29966 amit.gupta 135
</body>
136
</html>