Subversion Repositories SmartDukaan

Rev

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