Subversion Repositories SmartDukaan

Rev

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

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