Subversion Repositories SmartDukaan

Rev

Rev 32040 | Rev 32331 | 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
 
27873 amit.gupta 7
<script type="text/javascript">
30255 amit.gupta 8
    if ($searchModel > 0) {
9
        currentItem = $searchModel;
10
    }
11
    getEntityAheadOptions($("#scheme-item-search-text"), function (selectedItem) {
12
        currentItem = selectedItem.catalogId_i;
30026 amit.gupta 13
    });
27873 amit.gupta 14
 
30026 amit.gupta 15
    getImeiAheadOptions($("#scheme-imei-search-text"), $fofoId, function (
16
            inventoryItem) {
17
        imei = inventoryItem;
18
        console.log(imei)
19
    });
28795 tejbeer 20
 
28136 tejbeer 21
 
30026 amit.gupta 22
    $(document).ready(function () {
23
        console.log('$partnerType')
24
        $('#partner-category').val('$partnerType');
25
        $('body').bind('cut copy paste', function (e) {
26
            return false;
27
        });
28
        $('#offr-des').contextmenu(function () {
29
            return false;
30
        });
28136 tejbeer 31
 
30026 amit.gupta 32
        $('#sch-des').contextmenu(function () {
33
            return false;
34
        });
35
 
36
    });
27873 amit.gupta 37
</script>
28139 tejbeer 38
<body>
30026 amit.gupta 39
<section class="wrapper">
40
    <div class="row">
41
        <div class="col-lg-12">
42
            <h3 class="page-header">
43
                <i class="icon_document_alt"></i>MARGINS
44
            </h3>
45
            <ol class="breadcrumb">
46
                <li><i class="fa fa-home"></i><a
47
                        href="${rc.contextPath}/dashboard">Home</a></li>
48
                <li><i class="icon_document_alt"></i>MARGINS</li>
49
            </ol>
50
        </div>
51
    </div>
52
    <div class="row">
53
        <div class="col-lg-3"></div>
54
 
55
        <div class="col-lg-3">
56
            #if($schemeInOut)
57
                <div style="padding: 12px">
58
                    <span> <b> Model Name - $item.getItemDescriptionNoColor() </b></span>
59
 
60
                </div>
61
            #end
62
        </div>
63
        <div class="col-lg-3">
32209 amit.gupta 64
            #if($searchModel > 0 || $searchImei.length() > 0)
30026 amit.gupta 65
                <div style="padding: 12px">
32209 amit.gupta 66
                    <span>DP - <span class="currency">$dp</span></span>
67
                    #if($mop)
68
                        <span>, MOP - <span class="currency">$mop</span></span>
69
                    #end
70
                    #if($nlc)
71
                        <span>, NLC - <span class="currency">$nlc</span></span>
72
                    #end
30026 amit.gupta 73
                </div>
30274 amit.gupta 74
            #else
30026 amit.gupta 75
                <div style="padding: 12px">
76
                    <span>DP - <span class="currency">0</span>,</span>
77
                    <span>MOP - <span class="currency">0</span>,</span>
78
                    <span>NLC - <span class="currency">0</span></span>
79
                </div>
80
            #end
81
        </div>
82
 
83
 
84
        <div class="form-inline col-lg-8">
85
            <div class="form-group">
86
 
87
                <div class="input-group">
88
                    <input type="date" class="form-control schemes-date"
89
                           value="${date}"/>
90
                </div>
91
 
92
                <div class="input-group top_search">
93
 
94
                    <input type="text" class="form-control"
95
                           id="scheme-item-search-text" autocomplete="off"
30255 amit.gupta 96
                           placeholder="Search Model"
97
                        #if($searchModel > 0)
98
                           value="$modelName"
99
                        #end
100
                    />
101
                    <span class="input-group-btn">
28139 tejbeer 102
							<button class="btn btn-primary submit"
30026 amit.gupta 103
                                    id="scheme-item-search-button" type="button">Go!</button>
28139 tejbeer 104
						</span>
30026 amit.gupta 105
                </div>
106
 
107
 
108
            </div>
109
        </div>
110
 
111
        <div class="form-inline col-lg-4">
112
            <div class="form-group">
113
 
114
 
115
                <label> Check Margins</label>
116
 
117
                <div class="input-group top_search">
118
                    <input type="text" class="form-control"
119
                           id="scheme-imei-search-text" autocomplete="off"
120
                           placeholder="Search for Imei"/> <span class="input-group-btn">
28795 tejbeer 121
							<button class="btn btn-primary submit"
30026 amit.gupta 122
                                    id="scheme-imei-search-button" type="button">Go!</button>
28795 tejbeer 123
						</span>
30026 amit.gupta 124
                </div>
125
            </div>
126
        </div>
127
    </div>
128
    <div id="schemes-table">
129
        <div class="row">
130
            <div class="col-lg-12">
131
                <table class="table table-border table-condensed table-bordered"
132
                       id="sch-des">
133
                    <tbody>
134
                    <tr>
135
                        <th>ID</th>
136
                        <th>Name</th>
137
                        <th>Description</th>
138
                        <th>Type</th>
139
                        <th>Amount</th>
140
                        <th>Start Date</th>
141
                        <th>End Date</th>
142
                    </tr>
143
                        #if($schemes && !$schemes.isEmpty()) #foreach( $scheme in
144
                            $schemes )
145
                            #if($scheme.getAmountModel())
146
                            <tr data="$scheme.getId()">
147
                                <td>$scheme.getId()</td>
148
                                <td>$scheme.getName()</td>
149
                                <td>$scheme.getDescription()</td>
150
                                <td>$scheme.getType()</td>
32209 amit.gupta 151
                                <td>$scheme.getAmountModel()</td>
30026 amit.gupta 152
                                <td>$scheme.getFormattedStartDateTime()</td>
153
                                <td>$dateTimeFormatter.format($scheme.getEndDateTime())</td>
154
                            </tr>
155
                            #end
156
                        #end #else $noData #end
157
                    </tbody>
158
                </table>
159
            </div>
160
        </div>
161
    </div>
162
 
30651 amit.gupta 163
    #if($schemeInOut || $offerPayouts)
30026 amit.gupta 164
        <div class="row">
165
            <div class="col-lg-12">
166
                <h3 style="text-align:center; color:#4169e1;">IMEI Wise Margin Status</h3>
30656 amit.gupta 167
                <div><h4>Net Margin - $nf.format($netEarnings)</h4></div>
30026 amit.gupta 168
                <table class="table table-border table-condensed table-bordered">
169
                    <tr>
170
                        <th>ID</th>
171
                        <th>Name</th>
172
                        <th>Description</th>
173
                        <th>Type</th>
174
                        <th>Amount</th>
175
                        <th>Paid Amount</th>
176
                        <th>Status</th>
177
                        <th>Credit Timestamp</th>
178
 
179
                        <th>Description</th>
180
 
181
                    </tr>
182
 
30651 amit.gupta 183
                    #if(!$schemeInOut && $schemeInOut.isEmpty() && !$offerPayouts && $offerPayouts.isEmpty())
184
                        $noData
185
                    #end
30026 amit.gupta 186
 
30651 amit.gupta 187
                    #if($schemeInOut && !$schemeInOut.isEmpty())
188
                        #foreach( $sio in $schemeInOut )
189
                            <tr data="$schemeMap.get($sio.getSchemeId()).getId()">
190
                                <td>$schemeMap.get($sio.getSchemeId()).getId()</td>
191
                                <td>$schemeMap.get($sio.getSchemeId()).getName()</td>
192
                                <td>$schemeMap.get($sio.getSchemeId()).getDescription()</td>
193
                                <td>$schemeMap.get($sio.getSchemeId()).getType()</td>
194
                                <td>$schemeMap.get($sio.getSchemeId()).getAmountModel()</td>
195
                                <td>$sio.getAmount()</td>
196
                                <td>$sio.getStatus()</td>
197
                                #if($sio.getCreditTimestamp().format($dateTimeFormatter))
198
                                    <td>$sio.getCreditTimestamp().format($dateTimeFormatter)</td>
199
                                #else
200
                                    <td>-</td>
201
                                #end
202
 
203
                                #if($sio.getStatusDescription())
204
                                    <td>$sio.getStatusDescription()</td>
205
                                #else
206
                                    <td>-</td>
207
                                #end
208
                            </tr>
209
                        #end
210
                    #end
211
 
212
                    #if($offerPayouts && !$offerPayouts.isEmpty())
213
                        #foreach( $offerPayout in $offerPayouts )
214
                            <tr data-offerid="$offerPayout.getOfferId()">
215
                                <td colspan="3"><a href="javascript:void(0)"
216
                                                   class="mk_offer_detail">$offerPayout.getDescription()</td>
217
                                <td>$offerRequestMap.get($offerPayout.getOfferId().intValue()).getSchemeType()</td>
218
                                <td>$nf.format($inventoryItem.getMarginPercentage($offerPayout.getAmount()))%</td>
219
                                <td>$offerPayout.getAmount()</td>
220
                                <td>$offerPayout.getStatus()</td>
221
                                <td>$offerPayout.getCreateTimestamp().format($dateTimeFormatter)</td>
30026 amit.gupta 222
                                <td>-</td>
223
 
30651 amit.gupta 224
                            </tr>
225
                        #end
226
                    #end
30026 amit.gupta 227
 
228
                </table>
229
            </div>
29207 amit.gupta 230
        </div>
30026 amit.gupta 231
 
232
    #end
233
 
30274 amit.gupta 234
    #if($searchImei.length() > 0)
30026 amit.gupta 235
        <div class="row">
236
            <div class="col-lg-6">
237
                <h3>Price Drop</h3>
238
                <table class="table table-border table-condensed table-bordered"
239
                       id="offr-des">
240
                    <tr>
241
                        <th>Status</th>
242
                        <th>Amount</th>
243
                        <th>Description</th>
244
 
245
 
246
                    </tr>
30651 amit.gupta 247
                    #if($priceDropImeis && !$priceDropImeis.isEmpty())
248
                        #foreach( $pdi in $priceDropImeis )
249
                            <tr class="priceDrop-details">
250
                                <td>$pdi.getStatus()</td>
251
                                <td>$pdi.getPriceDrop().getAmount()</td>
252
                                #if($pdi.getRejectionReason())
253
                                    <td>$pdi.getRejectionReason()</td>
254
                                #else
255
                                    <td>-</td>
256
                                #end
30026 amit.gupta 257
 
30651 amit.gupta 258
                            </tr>
259
                        #end
260
                    #else
261
                        $noData
30026 amit.gupta 262
                    #end
263
                </table>
264
            </div>
265
        </div>
266
    #end
267
 
268
    #if(!$schemeInOut)
269
        <div class="row">
270
            <div class="col-lg-12">
271
                <h3>Other Schemes</h3>
272
                <table class="table table-border table-condensed table-bordered"
273
                       id="offr-des">
274
                    <tr>
275
                        <th>Name</th>
276
                        <th>Margin Based On</th>
277
                        <th>Sale Criteria</th>
278
                        <th>Payout(Per pc)</th>
279
                    </tr>
280
                    #if(!$offers.isEmpty())
281
                        #foreach( $offer in $offers )
282
                            #set($itemCriteriaPayout = $offer.getTargetSlabs().get(0).getItemCriteriaPayouts().get(0))
283
                            #set($slab=$itemCriteriaPayout.getCurrentSlab())
284
                            #if(!$slab)
285
                                #set($slab=$itemCriteriaPayout.getNextSlab())
286
                            #end
287
                            <tr class="offer-details" data-offerid="$offer.getId()">
288
                                <td><a class="mk_offer_detail"
289
                                       href="javascript:void(0)">$offer.getName()</a>
290
                                <td>$offer.getSchemeType()</td>
291
                                <td>$itemCriteriaPayout.getItemCriteriaString()</td>
292
                                <td>Rs. <span
293
                                        class="currency">$offerSlabPayoutMap.get($offer.getId()).get($slab.getOnwardsAmount())</span>
294
                                </td>
295
                            </tr>
296
                        #end #else $noData #end
297
                </table>
298
            </div>
299
        </div>
300
    #end
301
 
30274 amit.gupta 302
    #if(!$schemeInOut)
303
        #if($schemes && !$schemes.isEmpty())
304
            <div class="row col-lg-12">
305
                <b>Hygiene Payout</b> - This is basis the customer details entered in
306
                the system, pls refer to hygiene meter in your Dashboard. <br> <b>Tertiary
307
                Payout</b> - This is basis the activation of the handset. <br> <b>Investment
308
                Payout</b> - Investments in stocks should be above 90% for minimum 12
309
                days in a month to earn 2%, between 8-11 days will earn 1%, less then
310
                8 days there will be no payout.
311
            </div>
312
        #end
313
    #end
314
 
30026 amit.gupta 315
    <div class="offer-margin-container">
316
        <div class="modal  text-center" id="offerDescription">
317
            <div class="modal-dialog modal-lg modal-dialog-scrollable">
318
                <div class="modal-content">
319
                </div>
320
            </div>
321
        </div>
322
    </div>
323
 
324
</section>
28139 tejbeer 325
</body>