Subversion Repositories SmartDukaan

Rev

Rev 32888 | Rev 34518 | 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
32915 shampa 86
                    Payout</b> - This is basis the activation of the handset.
32331 amit.gupta 87
                </div>
88
            #end
89
        #end
90
        #if($schemeInOut || $offerPayouts)
91
            <div class="row">
92
                <div class="col-lg-12">
93
                    <h3 style="text-align:center; color:#4169e1;">IMEI Wise Margin Status</h3>
94
                    <div>
32338 amit.gupta 95
                        <h4>
96
                            DP - <span class="currency">$inventoryItem.getUnitPrice()</span>,
97
                            Net Margin - <span class="currency">$nf.format($netEarnings)</span>
98
                        </h4>
32331 amit.gupta 99
                    </div>
100
                    <table class="table table-border table-condensed table-bordered">
101
                        <tr>
102
                            <th>ID</th>
103
                            `
104
                            <th>Name</th>
105
                            <th>Description</th>
106
                            <th>Type</th>
107
                            <th>Amount</th>
108
                            <th>Paid Amount</th>
109
                            <th>Status</th>
110
                            <th>Credit Timestamp</th>
30026 amit.gupta 111
 
32331 amit.gupta 112
                            <th>Description</th>
30026 amit.gupta 113
 
32331 amit.gupta 114
                        </tr>
30026 amit.gupta 115
 
32331 amit.gupta 116
                        #if(!$schemeInOut && $schemeInOut.isEmpty() && !$offerPayouts && $offerPayouts.isEmpty())
117
                            $noData
118
                        #end
30026 amit.gupta 119
 
32331 amit.gupta 120
                        #if($schemeInOut && !$schemeInOut.isEmpty())
121
                            #foreach( $sio in $schemeInOut )
122
                                <tr data="$schemeMap.get($sio.getSchemeId()).getId()">
123
                                    <td>$schemeMap.get($sio.getSchemeId()).getId()</td>
124
                                    <td>$schemeMap.get($sio.getSchemeId()).getName()</td>
125
                                    <td>$schemeMap.get($sio.getSchemeId()).getDescription()</td>
126
                                    <td>$schemeMap.get($sio.getSchemeId()).getType()</td>
127
                                    <td>$schemeMap.get($sio.getSchemeId()).getAmountModel()</td>
128
                                    <td>$sio.getAmount()</td>
129
                                    <td>$sio.getStatus()</td>
130
                                    #if($sio.getCreditTimestamp().format($dateTimeFormatter))
131
                                        <td>$sio.getCreditTimestamp().format($dateTimeFormatter)</td>
132
                                    #else
133
                                        <td>-</td>
134
                                    #end
30026 amit.gupta 135
 
32331 amit.gupta 136
                                    #if($sio.getStatusDescription())
137
                                        <td>$sio.getStatusDescription()</td>
138
                                    #else
139
                                        <td>-</td>
140
                                    #end
141
                                </tr>
142
                            #end
143
                        #end
30651 amit.gupta 144
 
32331 amit.gupta 145
                        #if($offerPayouts && !$offerPayouts.isEmpty())
146
                            #foreach( $offerPayout in $offerPayouts )
147
                                <tr data-offerid="$offerPayout.getOfferId()">
148
                                    <td colspan="3"><a href="javascript:void(0)"
149
                                                       class="mk_offer_detail">$offerPayout.getDescription()</td>
150
                                    <td>$offerRequestMap.get($offerPayout.getOfferId().intValue()).getSchemeType()</td>
151
                                    <td>$nf.format($inventoryItem.getMarginPercentage($offerPayout.getAmount()))%</td>
152
                                    <td>$offerPayout.getAmount()</td>
153
                                    <td>$offerPayout.getStatus()</td>
154
                                    <td>$offerPayout.getCreateTimestamp().format($dateTimeFormatter)</td>
30651 amit.gupta 155
                                    <td>-</td>
156
 
32331 amit.gupta 157
                                </tr>
158
                            #end
30651 amit.gupta 159
                        #end
30026 amit.gupta 160
 
32331 amit.gupta 161
                    </table>
162
                </div>
30026 amit.gupta 163
            </div>
164
 
32331 amit.gupta 165
        #end
166
        #if($searchImei.length() > 0)
167
            <div class="row">
168
                <div class="col-lg-6">
169
                    <h3>Price Drop</h3>
170
                    <table class="table table-border table-condensed table-bordered"
171
                           id="offr-des">
172
                        <tr>
173
                            <th>Status</th>
174
                            <th>Amount</th>
175
                            <th>Description</th>
30026 amit.gupta 176
 
177
 
32331 amit.gupta 178
                        </tr>
179
                        #if($priceDropImeis && !$priceDropImeis.isEmpty())
180
                            #foreach( $pdi in $priceDropImeis )
181
                                <tr class="priceDrop-details">
182
                                    <td>$pdi.getStatus()</td>
183
                                    <td>$pdi.getPriceDrop().getAmount()</td>
184
                                    #if($pdi.getRejectionReason())
185
                                        <td>$pdi.getRejectionReason()</td>
186
                                    #else
187
                                        <td>-</td>
188
                                    #end
30026 amit.gupta 189
 
32331 amit.gupta 190
                                </tr>
191
                            #end
192
                        #else
193
                            $noData
30651 amit.gupta 194
                        #end
32331 amit.gupta 195
                    </table>
196
                </div>
197
            </div>
198
        #end
199
    #else
200
        #if($searchModel > 0)
201
            <div class="col-lg-3">
202
                <div style="padding: 12px">
203
                    <span>DP - <span class="currency">$dp</span></span>
204
                    #if($mop)
205
                        <span>, MOP - <span class="currency">$mop</span></span>
30026 amit.gupta 206
                    #end
32331 amit.gupta 207
                    #if($nlc)
208
                        <span>, NLC - <span class="currency">$nlc</span></span>
209
                    #end
210
                </div>
30026 amit.gupta 211
            </div>
30274 amit.gupta 212
        #end
213
    #end
214
 
30026 amit.gupta 215
    </div>
32331 amit.gupta 216
</section>
217
<script type="text/javascript">
218
    if ($searchModel > 0) {
219
        currentItem = $searchModel;
220
    }
221
    getEntityAheadOptions($("#scheme-item-search-text"), function (selectedItem) {
222
        currentItem = selectedItem.catalogId_i;
223
    });
30026 amit.gupta 224
 
32331 amit.gupta 225
    getImeiAheadOptions($("#scheme-imei-search-text"), $fofoId, function (
226
            inventoryItem) {
227
        imei = inventoryItem;
228
        console.log(imei)
229
    });
230
 
231
 
232
    $(document).ready(function () {
233
        console.log('$partnerType')
234
        $('#partner-category').val('$partnerType');
235
        $('body').bind('cut copy paste', function (e) {
236
            return false;
237
        });
238
        $('#offr-des').contextmenu(function () {
239
            return false;
240
        });
241
 
242
        $('#sch-des').contextmenu(function () {
243
            return false;
244
        });
245
 
246
    });
247
</script>