Subversion Repositories SmartDukaan

Rev

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