Subversion Repositories SmartDukaan

Rev

Rev 32209 | Rev 32338 | 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>
16
                <li><i class="icon_document_alt"></i>MARGINS</li>
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>
98
                        <h4>DP - <span class="currency">$inventoryItem.getUnitPrice()</span>, Price Drops -
99
                            <snap class="currency">$inventoryItem.getUnitPrice()</snap>
100
                            , Net Margin - <span class="currency">$nf.format($netEarnings)</span></h4>
101
                    </div>
102
                    <table class="table table-border table-condensed table-bordered">
103
                        <tr>
104
                            <th>ID</th>
105
                            `
106
                            <th>Name</th>
107
                            <th>Description</th>
108
                            <th>Type</th>
109
                            <th>Amount</th>
110
                            <th>Paid Amount</th>
111
                            <th>Status</th>
112
                            <th>Credit Timestamp</th>
30026 amit.gupta 113
 
32331 amit.gupta 114
                            <th>Description</th>
30026 amit.gupta 115
 
32331 amit.gupta 116
                        </tr>
30026 amit.gupta 117
 
32331 amit.gupta 118
                        #if(!$schemeInOut && $schemeInOut.isEmpty() && !$offerPayouts && $offerPayouts.isEmpty())
119
                            $noData
120
                        #end
30026 amit.gupta 121
 
32331 amit.gupta 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
30026 amit.gupta 137
 
32331 amit.gupta 138
                                    #if($sio.getStatusDescription())
139
                                        <td>$sio.getStatusDescription()</td>
140
                                    #else
141
                                        <td>-</td>
142
                                    #end
143
                                </tr>
144
                            #end
145
                        #end
30651 amit.gupta 146
 
32331 amit.gupta 147
                        #if($offerPayouts && !$offerPayouts.isEmpty())
148
                            #foreach( $offerPayout in $offerPayouts )
149
                                <tr data-offerid="$offerPayout.getOfferId()">
150
                                    <td colspan="3"><a href="javascript:void(0)"
151
                                                       class="mk_offer_detail">$offerPayout.getDescription()</td>
152
                                    <td>$offerRequestMap.get($offerPayout.getOfferId().intValue()).getSchemeType()</td>
153
                                    <td>$nf.format($inventoryItem.getMarginPercentage($offerPayout.getAmount()))%</td>
154
                                    <td>$offerPayout.getAmount()</td>
155
                                    <td>$offerPayout.getStatus()</td>
156
                                    <td>$offerPayout.getCreateTimestamp().format($dateTimeFormatter)</td>
30651 amit.gupta 157
                                    <td>-</td>
158
 
32331 amit.gupta 159
                                </tr>
160
                            #end
30651 amit.gupta 161
                        #end
30026 amit.gupta 162
 
32331 amit.gupta 163
                    </table>
164
                </div>
30026 amit.gupta 165
            </div>
166
 
32331 amit.gupta 167
        #end
168
        #if($searchImei.length() > 0)
169
            <div class="row">
170
                <div class="col-lg-6">
171
                    <h3>Price Drop</h3>
172
                    <table class="table table-border table-condensed table-bordered"
173
                           id="offr-des">
174
                        <tr>
175
                            <th>Status</th>
176
                            <th>Amount</th>
177
                            <th>Description</th>
30026 amit.gupta 178
 
179
 
32331 amit.gupta 180
                        </tr>
181
                        #if($priceDropImeis && !$priceDropImeis.isEmpty())
182
                            #foreach( $pdi in $priceDropImeis )
183
                                <tr class="priceDrop-details">
184
                                    <td>$pdi.getStatus()</td>
185
                                    <td>$pdi.getPriceDrop().getAmount()</td>
186
                                    #if($pdi.getRejectionReason())
187
                                        <td>$pdi.getRejectionReason()</td>
188
                                    #else
189
                                        <td>-</td>
190
                                    #end
30026 amit.gupta 191
 
32331 amit.gupta 192
                                </tr>
193
                            #end
194
                        #else
195
                            $noData
30651 amit.gupta 196
                        #end
32331 amit.gupta 197
                    </table>
198
                </div>
199
            </div>
200
        #end
201
    #else
202
        #if($searchModel > 0)
203
            <div class="col-lg-3">
204
                <div style="padding: 12px">
205
                    <span>DP - <span class="currency">$dp</span></span>
206
                    #if($mop)
207
                        <span>, MOP - <span class="currency">$mop</span></span>
30026 amit.gupta 208
                    #end
32331 amit.gupta 209
                    #if($nlc)
210
                        <span>, NLC - <span class="currency">$nlc</span></span>
211
                    #end
212
                </div>
30026 amit.gupta 213
            </div>
30274 amit.gupta 214
        #end
215
    #end
216
 
30026 amit.gupta 217
    </div>
32331 amit.gupta 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
    });
30026 amit.gupta 226
 
32331 amit.gupta 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
    });
249
</script>