Subversion Repositories SmartDukaan

Rev

Rev 32209 | Rev 32338 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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