Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
28134 tejbeer 1
<style>
30026 amit.gupta 2
    .table {
3
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='100px' width='100px'><text transform='translate(20, 100) rotate(-45)' fill='rgb(211,211,211)' font-size='20'>$partnerCode</text></svg>");
4
    }
28134 tejbeer 5
</style>
6
 
30026 amit.gupta 7
<section class="wrapper">
8
    <div class="row">
9
        <div class="col-lg-12">
10
            <h3 class="page-header">
11
                <i class="icon_document_alt"></i>MARGINS
12
            </h3>
13
            <ol class="breadcrumb">
14
                <li><i class="fa fa-home"></i><a
15
                        href="${rc.contextPath}/dashboard">Home</a></li>
32888 shampa 16
                <li><i class="icon_document_alt"></i>Model Wise Margins</li>
30026 amit.gupta 17
            </ol>
18
        </div>
19
    </div>
20
    <div class="row">
21
        <div class="col-lg-3"></div>
22
 
23
        <div class="col-lg-3">
24
            #if($schemeInOut)
25
                <div style="padding: 12px">
26
                    <span> <b> Model Name - $item.getItemDescriptionNoColor() </b></span>
27
 
28
                </div>
29
            #end
30
        </div>
31
 
32
        <div class="form-inline col-lg-8">
34518 ranu 33
            #if(!$isAnalysis)
34
                <div class="form-group">
30026 amit.gupta 35
 
34518 ranu 36
                    <div class="input-group">
37
                        <input type="date" class="form-control schemes-date"
38
                               value="${date}"/>
39
                    </div>
30026 amit.gupta 40
 
34518 ranu 41
                    <div class="input-group top_search">
30026 amit.gupta 42
 
34518 ranu 43
                        <input type="text" class="form-control"
44
                               id="scheme-item-search-text" autocomplete="off"
45
                               placeholder="Search Model"
46
                            #if($searchModel > 0)
47
                               value="$modelName"
48
                            #end
49
                        />
50
                        <span class="input-group-btn">
28139 tejbeer 51
							<button class="btn btn-primary submit"
30026 amit.gupta 52
                                    id="scheme-item-search-button" type="button">Go!</button>
28139 tejbeer 53
						</span>
34518 ranu 54
                    </div>
55
 
30026 amit.gupta 56
                </div>
34518 ranu 57
            #else
58
                <div class="form-group">
30026 amit.gupta 59
 
34518 ranu 60
                    <div class="input-group">
61
                        <input type="date" class="form-control analysis-schemes-date"
62
                               value="${date}"/>
63
                    </div>
30026 amit.gupta 64
 
34518 ranu 65
                    <div class="input-group top_search">
66
 
67
                        <input type="text" class="form-control"
68
                               id="analysis-scheme-item-search-text" autocomplete="off"
69
                               placeholder="Search Model"
70
                            #if($searchModel > 0)
71
                               value="$modelName"
72
                            #end
73
                        />
74
                        <span class="input-group-btn">
75
							<button class="btn btn-primary submit"
34524 ranu 76
                                    id="analysis-scheme-item-search-button" data-fofoid="$fofoId"
77
                                    type="button">Go!</button>
34518 ranu 78
						</span>
79
                    </div>
80
 
81
                </div>
82
            #end
83
 
30026 amit.gupta 84
        </div>
85
 
86
        <div class="form-inline col-lg-4">
34518 ranu 87
            #if(!$isAnalysis)
88
                <div class="form-group">
89
                    <label> Check Margins</label>
30026 amit.gupta 90
 
34518 ranu 91
                    <div class="input-group top_search">
92
                        <input type="text" class="form-control" hsd
93
                               id="scheme-imei-search-text" autocomplete="off"
94
                               placeholder="Search for Imei"/> <span class="input-group-btn">
28795 tejbeer 95
							<button class="btn btn-primary submit"
30026 amit.gupta 96
                                    id="scheme-imei-search-button" type="button">Go!</button>
28795 tejbeer 97
						</span>
34518 ranu 98
                    </div>
30026 amit.gupta 99
                </div>
34518 ranu 100
            #else
101
                <div class="form-group">
102
                    <label> Check Margins</label>
103
 
104
                    <div class="input-group top_search">
105
                        <input type="text" class="form-control" hsd
106
                               id="analysis-scheme-imei-search-text" autocomplete="off"
107
                               placeholder="Search for Imei"/> <span class="input-group-btn">
108
							<button class="btn btn-primary submit"
34524 ranu 109
                                    id="analysis-scheme-imei-search-button" data-fofoid="$fofoId"
110
                                    type="button">Go!</button>
34518 ranu 111
						</span>
112
                    </div>
113
                </div>
114
            #end
115
 
30026 amit.gupta 116
        </div>
117
    </div>
32331 amit.gupta 118
    #if(!$isAdmin)
119
        #if($searchModel > 0 || $searchImei.length() > 0)
120
            #if($searchModel > 0)
121
                <div class="row" style="margin-top: 12px">
122
                    #parse("price-circular-table.vm")
123
                </div>
124
                <div class="row col-lg-12">
125
                    <b>Alert</b> - While magins are that of on date the date chosen, The dp/mop is of Current date.</b>
126
                    <b>Hygiene Payout</b> - This is basis the customer details entered in
127
                    the system, pls refer to hygiene meter in your Dashboard. <br> <b>Tertiary
32915 shampa 128
                    Payout</b> - This is basis the activation of the handset.
32331 amit.gupta 129
                </div>
130
            #end
131
        #end
132
        #if($schemeInOut || $offerPayouts)
133
            <div class="row">
134
                <div class="col-lg-12">
135
                    <h3 style="text-align:center; color:#4169e1;">IMEI Wise Margin Status</h3>
136
                    <div>
32338 amit.gupta 137
                        <h4>
138
                            DP - <span class="currency">$inventoryItem.getUnitPrice()</span>,
139
                            Net Margin - <span class="currency">$nf.format($netEarnings)</span>
140
                        </h4>
32331 amit.gupta 141
                    </div>
142
                    <table class="table table-border table-condensed table-bordered">
143
                        <tr>
144
                            <th>ID</th>
145
                            `
146
                            <th>Name</th>
147
                            <th>Description</th>
148
                            <th>Type</th>
149
                            <th>Amount</th>
150
                            <th>Paid Amount</th>
151
                            <th>Status</th>
152
                            <th>Credit Timestamp</th>
30026 amit.gupta 153
 
32331 amit.gupta 154
                            <th>Description</th>
30026 amit.gupta 155
 
32331 amit.gupta 156
                        </tr>
30026 amit.gupta 157
 
32331 amit.gupta 158
                        #if(!$schemeInOut && $schemeInOut.isEmpty() && !$offerPayouts && $offerPayouts.isEmpty())
159
                            $noData
160
                        #end
30026 amit.gupta 161
 
32331 amit.gupta 162
                        #if($schemeInOut && !$schemeInOut.isEmpty())
163
                            #foreach( $sio in $schemeInOut )
164
                                <tr data="$schemeMap.get($sio.getSchemeId()).getId()">
165
                                    <td>$schemeMap.get($sio.getSchemeId()).getId()</td>
166
                                    <td>$schemeMap.get($sio.getSchemeId()).getName()</td>
167
                                    <td>$schemeMap.get($sio.getSchemeId()).getDescription()</td>
168
                                    <td>$schemeMap.get($sio.getSchemeId()).getType()</td>
169
                                    <td>$schemeMap.get($sio.getSchemeId()).getAmountModel()</td>
170
                                    <td>$sio.getAmount()</td>
171
                                    <td>$sio.getStatus()</td>
172
                                    #if($sio.getCreditTimestamp().format($dateTimeFormatter))
173
                                        <td>$sio.getCreditTimestamp().format($dateTimeFormatter)</td>
174
                                    #else
175
                                        <td>-</td>
176
                                    #end
30026 amit.gupta 177
 
32331 amit.gupta 178
                                    #if($sio.getStatusDescription())
179
                                        <td>$sio.getStatusDescription()</td>
180
                                    #else
181
                                        <td>-</td>
182
                                    #end
183
                                </tr>
184
                            #end
185
                        #end
30651 amit.gupta 186
 
32331 amit.gupta 187
                        #if($offerPayouts && !$offerPayouts.isEmpty())
188
                            #foreach( $offerPayout in $offerPayouts )
189
                                <tr data-offerid="$offerPayout.getOfferId()">
190
                                    <td colspan="3"><a href="javascript:void(0)"
191
                                                       class="mk_offer_detail">$offerPayout.getDescription()</td>
192
                                    <td>$offerRequestMap.get($offerPayout.getOfferId().intValue()).getSchemeType()</td>
193
                                    <td>$nf.format($inventoryItem.getMarginPercentage($offerPayout.getAmount()))%</td>
194
                                    <td>$offerPayout.getAmount()</td>
195
                                    <td>$offerPayout.getStatus()</td>
196
                                    <td>$offerPayout.getCreateTimestamp().format($dateTimeFormatter)</td>
30651 amit.gupta 197
                                    <td>-</td>
198
 
32331 amit.gupta 199
                                </tr>
200
                            #end
30651 amit.gupta 201
                        #end
30026 amit.gupta 202
 
32331 amit.gupta 203
                    </table>
204
                </div>
30026 amit.gupta 205
            </div>
206
 
32331 amit.gupta 207
        #end
208
        #if($searchImei.length() > 0)
209
            <div class="row">
210
                <div class="col-lg-6">
211
                    <h3>Price Drop</h3>
212
                    <table class="table table-border table-condensed table-bordered"
213
                           id="offr-des">
214
                        <tr>
215
                            <th>Status</th>
216
                            <th>Amount</th>
217
                            <th>Description</th>
30026 amit.gupta 218
 
219
 
32331 amit.gupta 220
                        </tr>
221
                        #if($priceDropImeis && !$priceDropImeis.isEmpty())
222
                            #foreach( $pdi in $priceDropImeis )
223
                                <tr class="priceDrop-details">
224
                                    <td>$pdi.getStatus()</td>
225
                                    <td>$pdi.getPriceDrop().getAmount()</td>
226
                                    #if($pdi.getRejectionReason())
227
                                        <td>$pdi.getRejectionReason()</td>
228
                                    #else
229
                                        <td>-</td>
230
                                    #end
30026 amit.gupta 231
 
32331 amit.gupta 232
                                </tr>
233
                            #end
234
                        #else
235
                            $noData
30651 amit.gupta 236
                        #end
32331 amit.gupta 237
                    </table>
238
                </div>
239
            </div>
240
        #end
241
    #else
242
        #if($searchModel > 0)
243
            <div class="col-lg-3">
244
                <div style="padding: 12px">
245
                    <span>DP - <span class="currency">$dp</span></span>
246
                    #if($mop)
247
                        <span>, MOP - <span class="currency">$mop</span></span>
30026 amit.gupta 248
                    #end
32331 amit.gupta 249
                    #if($nlc)
250
                        <span>, NLC - <span class="currency">$nlc</span></span>
251
                    #end
252
                </div>
30026 amit.gupta 253
            </div>
30274 amit.gupta 254
        #end
255
    #end
256
 
30026 amit.gupta 257
    </div>
32331 amit.gupta 258
</section>
259
<script type="text/javascript">
260
    if ($searchModel > 0) {
261
        currentItem = $searchModel;
262
    }
263
    getEntityAheadOptions($("#scheme-item-search-text"), function (selectedItem) {
264
        currentItem = selectedItem.catalogId_i;
265
    });
30026 amit.gupta 266
 
32331 amit.gupta 267
    getImeiAheadOptions($("#scheme-imei-search-text"), $fofoId, function (
268
            inventoryItem) {
269
        imei = inventoryItem;
270
        console.log(imei)
271
    });
272
 
34524 ranu 273
    getEntityAheadOptions($("#analysis-scheme-item-search-text"), function (selectedItem) {
274
        currentItem = selectedItem.catalogId_i;
275
    });
32331 amit.gupta 276
 
34524 ranu 277
    getImeiAheadOptions($("#analysis-scheme-imei-search-text"), $fofoId, function (
278
            inventoryItem) {
279
        imei = inventoryItem;
280
        console.log(imei)
281
    });
282
 
283
 
32331 amit.gupta 284
    $(document).ready(function () {
285
        console.log('$partnerType')
286
        $('#partner-category').val('$partnerType');
287
        $('body').bind('cut copy paste', function (e) {
288
            return false;
289
        });
290
        $('#offr-des').contextmenu(function () {
291
            return false;
292
        });
293
 
294
        $('#sch-des').contextmenu(function () {
295
            return false;
296
        });
297
 
298
    });
299
</script>