Subversion Repositories SmartDukaan

Rev

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