Subversion Repositories SmartDukaan

Rev

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