| 31665 |
amit.gupta |
1 |
<style>
|
| 30003 |
tejbeer |
2 |
|
| 31665 |
amit.gupta |
3 |
.brandStock .tooltiptext {
|
|
|
4 |
visibility: hidden;
|
|
|
5 |
width: 120px;
|
|
|
6 |
background-color: black;
|
|
|
7 |
color: #fff;
|
|
|
8 |
text-align: center;
|
|
|
9 |
border-radius: 6px;
|
|
|
10 |
padding: 5px 0;
|
| 30003 |
tejbeer |
11 |
|
| 31665 |
amit.gupta |
12 |
/* Position the tooltip */
|
|
|
13 |
position: absolute;
|
|
|
14 |
z-index: 1;
|
|
|
15 |
}
|
| 30044 |
tejbeer |
16 |
|
| 31665 |
amit.gupta |
17 |
.brandStock:hover .tooltiptext {
|
|
|
18 |
visibility: visible;
|
|
|
19 |
}
|
|
|
20 |
</style>
|
|
|
21 |
|
| 30003 |
tejbeer |
22 |
<section class="wrapper">
|
| 31665 |
amit.gupta |
23 |
<div class="row">
|
|
|
24 |
<div class="col-lg-12">
|
|
|
25 |
<h3 class="page-header"><i class="icon_document_alt"></i>BRAND WISE PLACEMENT</h3>
|
|
|
26 |
<ol class="breadcrumb">
|
|
|
27 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
28 |
<li><i class="icon_document_alt"></i>BrandWise Placement</li>
|
|
|
29 |
</ol>
|
|
|
30 |
</div>
|
|
|
31 |
</div>
|
|
|
32 |
|
|
|
33 |
<div class="row">
|
|
|
34 |
|
|
|
35 |
<div class="col-lg-12">
|
|
|
36 |
<table id="partnerBrandWiseDetail" class="table table-striped table-advance table-hover" style="width:100%">
|
|
|
37 |
<thead>
|
|
|
38 |
<tr>
|
|
|
39 |
<th>Partner Name</th>
|
|
|
40 |
<th>Code</th>
|
|
|
41 |
<th>Category</th>
|
|
|
42 |
<th>Manager</th>
|
|
|
43 |
<th>Wallet Amount</th>
|
|
|
44 |
<th>Short Invest</th>
|
|
|
45 |
<th>Min Invest</th>
|
| 33812 |
tejus.loha |
46 |
<th>Total Due</th>
|
| 33806 |
tejus.loha |
47 |
<th>Monthly target</th>
|
|
|
48 |
<th>MTD Purchase</th>
|
|
|
49 |
<th>MTD Sale</th>
|
| 31665 |
amit.gupta |
50 |
|
|
|
51 |
#foreach($brand in $brands)
|
|
|
52 |
|
|
|
53 |
<th class="$brand.toLowerCase()"><p>$brand</p></th>
|
|
|
54 |
#end
|
|
|
55 |
<th>Accessories</th>
|
|
|
56 |
<th>TV</th>
|
| 33806 |
tejus.loha |
57 |
<th>Activation Type</th>
|
| 31665 |
amit.gupta |
58 |
</tr>
|
|
|
59 |
|
|
|
60 |
</thead>
|
|
|
61 |
<tbody>
|
|
|
62 |
|
|
|
63 |
#foreach($cr in $customRetailers.entrySet())
|
|
|
64 |
<tr>
|
|
|
65 |
<td class="brandStock" data-fofoid="$cr.getKey()" data-toggle="modal"
|
|
|
66 |
data-target="#itemWiseBrandStock">$cr.getValue().getBusinessName()</td>
|
|
|
67 |
<td>$cr.getValue().getCode()</td>
|
|
|
68 |
|
| 34397 |
ranu |
69 |
<td>$fofoIdPartnerTypeMap.get($cr.getKey())
|
|
|
70 |
<input type="hidden" class="shortInvestment-mk"
|
| 34401 |
ranu |
71 |
value="$partnerDailyInvestmentMap.get($cr.getKey()).getShortInvestment().longValue()">
|
| 35011 |
ranu |
72 |
<input type="hidden" class="totaldue-with-interest-mk"
|
| 35013 |
ranu |
73 |
value="$totalDueMap.get($cr.getKey()).longValue()">
|
| 34401 |
ranu |
74 |
|
| 34397 |
ranu |
75 |
</td>
|
| 31665 |
amit.gupta |
76 |
<td>$partnerSalesHeadersMap.get($cr.getKey()).getTerritoryManager()</td>
|
|
|
77 |
|
|
|
78 |
<td class="currency">$partnerDailyInvestmentMap.get($cr.getKey()).getWalletAmount()</td>
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
#set($realInvestment = $partnerDailyInvestmentMap.get($cr.getKey()).getTotalInvestment() + $partnerDailyInvestmentMap.get($cr.getKey()).getShortInvestment() )
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
#set($realpercent = ($partnerDailyInvestmentMap.get($cr.getKey()).getTotalInvestment() / $realInvestment)*100)
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
#if($realpercent < 75)
|
|
|
89 |
<td class="currency"
|
|
|
90 |
style="color:red">$partnerDailyInvestmentMap.get($cr.getKey()).getShortInvestment()</td>
|
| 30003 |
tejbeer |
91 |
#else
|
| 31665 |
amit.gupta |
92 |
<td class="currency">$partnerDailyInvestmentMap.get($cr.getKey()).getShortInvestment()</td>
|
|
|
93 |
#end
|
|
|
94 |
<td class="currency">$partnerDailyInvestmentMap.get($cr.getKey()).getMinInvestment()</td>
|
| 33812 |
tejus.loha |
95 |
|
|
|
96 |
#if($totalDueMap.get($cr.getKey())>0)
|
|
|
97 |
<td class="currency">$totalDueMap.get($cr.getKey()).setScale(0,$ru)</td>
|
| 33806 |
tejus.loha |
98 |
#else
|
|
|
99 |
<td class="currency">--</td>
|
| 33812 |
tejus.loha |
100 |
#end
|
| 31665 |
amit.gupta |
101 |
|
| 33812 |
tejus.loha |
102 |
#if($fofoIdMonthlyTargetMap.get($cr.getKey()).getPurchaseTarget())
|
|
|
103 |
<td class="currency">$nf.format($fofoIdMonthlyTargetMap.get($cr.getKey()).getPurchaseTarget())</td>
|
|
|
104 |
#else
|
|
|
105 |
<td class="currency">--</td>
|
| 33806 |
tejus.loha |
106 |
#end
|
| 33812 |
tejus.loha |
107 |
|
| 33813 |
tejus.loha |
108 |
#set($isOverSale = $fofoMTDSaleMap.get($cr.getKey())>$currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))
|
| 33812 |
tejus.loha |
109 |
#set($salePurchaseGap = $fofoMTDSaleMap.get($cr.getKey())-$currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))
|
| 33813 |
tejus.loha |
110 |
|
| 33806 |
tejus.loha |
111 |
#if($currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))
|
| 33813 |
tejus.loha |
112 |
#if($isOverSale)
|
|
|
113 |
#if($salePurchaseGap>50000)
|
|
|
114 |
<td class="currency">
|
|
|
115 |
<span style="color:red">$nf.format($currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))</span>
|
|
|
116 |
</td>
|
|
|
117 |
#else
|
|
|
118 |
<td class="currency">
|
|
|
119 |
<span style="color:darkorange">$nf.format($currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))</span>
|
|
|
120 |
</td>
|
|
|
121 |
#end
|
| 33812 |
tejus.loha |
122 |
#else
|
| 33813 |
tejus.loha |
123 |
<td>
|
|
|
124 |
$nf.format($currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))
|
| 33812 |
tejus.loha |
125 |
</td>
|
|
|
126 |
#end
|
| 33806 |
tejus.loha |
127 |
#else
|
|
|
128 |
<td class="currency">--</td>
|
| 33812 |
tejus.loha |
129 |
#end
|
| 31665 |
amit.gupta |
130 |
|
| 33806 |
tejus.loha |
131 |
#if($fofoMTDSaleMap.get($cr.getKey()))
|
| 33813 |
tejus.loha |
132 |
#if($isOverSale)
|
|
|
133 |
#if($salePurchaseGap>50000)
|
|
|
134 |
<td class="currency">
|
|
|
135 |
<span style="color:red">$nf.format($fofoMTDSaleMap.get($cr.getKey()))</span>
|
|
|
136 |
</td>
|
|
|
137 |
#else
|
|
|
138 |
<td class="currency">
|
|
|
139 |
<span style="color:darkorange">$nf.format($fofoMTDSaleMap.get($cr.getKey()))</span>
|
|
|
140 |
</td>
|
|
|
141 |
#end
|
| 33812 |
tejus.loha |
142 |
#else
|
| 33813 |
tejus.loha |
143 |
<td class="currency">
|
|
|
144 |
$nf.format($fofoMTDSaleMap.get($cr.getKey()))
|
| 33812 |
tejus.loha |
145 |
</td>
|
|
|
146 |
#end
|
| 33806 |
tejus.loha |
147 |
#else
|
|
|
148 |
<td class="currency">--</td>
|
|
|
149 |
#end
|
|
|
150 |
|
| 31665 |
amit.gupta |
151 |
#foreach($brand in $brands)
|
|
|
152 |
#set($totalStock = $fofoIdBrandAmountMap.get($cr.getKey()).get($brand))
|
|
|
153 |
#set($minBrandAmount = 0.0)
|
|
|
154 |
#set($stockPercent = 100)
|
|
|
155 |
|
|
|
156 |
#if($partnerBrandLimitMap.get($cr.getKey()))
|
|
|
157 |
#if($partnerBrandLimitMap.get($cr.getKey()).get($brand))
|
|
|
158 |
#set($minBrandAmount = $partnerBrandLimitMap.get($cr.getKey()).get($brand))
|
|
|
159 |
#set($stockPercent = ($totalStock / $minBrandAmount)*100)
|
|
|
160 |
#end
|
|
|
161 |
#end
|
|
|
162 |
|
|
|
163 |
#if($brand == "Nokia" || $brand == "Xiaomi" || $brand == "Realme")
|
|
|
164 |
<td class="currency brandStock" data-fofoid="$cr.getKey()" data-brand="$brand"
|
|
|
165 |
data-toggle="modal" data-target="#itemWiseBrandStock">$totalStock <span
|
|
|
166 |
class="tooltiptext">$minBrandAmount</span></td>
|
|
|
167 |
#else
|
|
|
168 |
#if($stockPercent > 90)
|
|
|
169 |
<td class="currency brandStock" style="background-color:#52BE80"
|
|
|
170 |
data-stock="$inStockBrandModel.get($cr.getKey()).get($brand)"
|
|
|
171 |
data-pending="$pendingIndent.get($cr.getKey()).get($brand)"
|
|
|
172 |
data-grn="$grnPendingOrders.get($cr.getKey()).get($brand)"
|
|
|
173 |
data-fofoid="$cr.getKey()" data-brand="$brand" data-toggle="modal"
|
|
|
174 |
data-target="#itemWiseBrandStock">$totalStock <span
|
|
|
175 |
class="tooltiptext">$minBrandAmount</span></td>
|
|
|
176 |
#elseif($stockPercent < 80)
|
|
|
177 |
<td class="currency brandStock" style="background-color:#EC7063 "
|
|
|
178 |
data-stock="$inStockBrandModel.get($cr.getKey()).get($brand)"
|
|
|
179 |
data-pending="$pendingIndent.get($cr.getKey()).get($brand)"
|
|
|
180 |
data-grn="$grnPendingOrders.get($cr.getKey()).get($brand)"
|
|
|
181 |
data-fofoid="$cr.getKey()" data-brand="$brand" data-toggle="modal"
|
|
|
182 |
data-target="#itemWiseBrandStock"> $totalStock <span
|
|
|
183 |
class="tooltiptext">$minBrandAmount</span></td>
|
|
|
184 |
#else
|
|
|
185 |
<td class="currency brandStock" style="background-color:#F7DC6F"
|
|
|
186 |
data-stock="$inStockBrandModel.get($cr.getKey()).get($brand)"
|
|
|
187 |
data-pending="$pendingIndent.get($cr.getKey()).get($brand)"
|
|
|
188 |
data-grn="$grnPendingOrders.get($cr.getKey()).get($brand)"
|
|
|
189 |
data-fofoid="$cr.getKey()" data-brand="$brand" data-toggle="modal"
|
|
|
190 |
data-target="#itemWiseBrandStock">$totalStock <span
|
|
|
191 |
class="tooltiptext">$minBrandAmount</span></td>
|
|
|
192 |
#end
|
|
|
193 |
|
|
|
194 |
#end
|
|
|
195 |
|
|
|
196 |
#end
|
|
|
197 |
|
|
|
198 |
#if($inStockAccessTv.get($cr.getKey()))
|
|
|
199 |
#set($inStockAcc = $inStockAccessTv.get($cr.getKey()).getAccessoriesAmount())
|
|
|
200 |
#set($inStockTv = $inStockAccessTv.get($cr.getKey()).getTvAmount())
|
| 30003 |
tejbeer |
201 |
#else
|
| 31665 |
amit.gupta |
202 |
#set($inStockAcc = 0)
|
|
|
203 |
#set($inStockTv = 0)
|
|
|
204 |
#end
|
|
|
205 |
|
|
|
206 |
|
|
|
207 |
#if($pendingIndentAccessTv.get($cr.getKey()))
|
|
|
208 |
#set($pendingIndentAcc = $pendingIndentAccessTv.get($cr.getKey()).getAccessoriesAmount())
|
|
|
209 |
#set($pendingIndentTv = $pendingIndentAccessTv.get($cr.getKey()).getTvAmount())
|
| 30003 |
tejbeer |
210 |
#else
|
| 31665 |
amit.gupta |
211 |
#set($pendingIndentAcc = 0)
|
|
|
212 |
#set($pendingIndentTv = 0)
|
|
|
213 |
#end
|
| 30003 |
tejbeer |
214 |
|
|
|
215 |
|
| 31665 |
amit.gupta |
216 |
#if($grnPendingAccessTvOrders.get($cr.getKey()))
|
|
|
217 |
#set($grnPendingAcc = $grnPendingAccessTvOrders.get($cr.getKey()).getAccessoriesAmount())
|
|
|
218 |
#set($grnPendingTv = $grnPendingAccessTvOrders.get($cr.getKey()).getTvAmount())
|
|
|
219 |
#else
|
|
|
220 |
#set($grnPendingAcc = 0)
|
|
|
221 |
#set($grnPendingTv = 0)
|
|
|
222 |
#end
|
| 30003 |
tejbeer |
223 |
|
|
|
224 |
|
| 31665 |
amit.gupta |
225 |
#set($totalAccStock = $inStockAcc+ $pendingIndentAcc + $grnPendingAcc)
|
| 30003 |
tejbeer |
226 |
|
| 31665 |
amit.gupta |
227 |
#set($totalTvStock = $inStockTv+ $pendingIndentTv + $grnPendingTv)
|
|
|
228 |
|
|
|
229 |
|
|
|
230 |
#if($brandAmountLimit.get("accessories") != 0)
|
|
|
231 |
#set($stockAccPercent = ($totalAccStock / $brandAmountLimit.get("accessories"))*100)
|
|
|
232 |
#else
|
|
|
233 |
#set($stockAccPercent = 100)
|
|
|
234 |
#end
|
|
|
235 |
|
|
|
236 |
|
|
|
237 |
#if($stockAccPercent > 90)
|
|
|
238 |
<td class="currency brandStock" style="background-color:#52BE80" data-fofoid="$cr.getKey()"
|
|
|
239 |
data-brand="accessories" data-toggle="modal"
|
|
|
240 |
data-target="#itemWiseBrandStock">$totalAccStock</td>
|
|
|
241 |
#elseif($stockAccPercent < 80)
|
|
|
242 |
<td class="currency brandStock" style="background-color:#EC7063 " data-fofoid="$cr.getKey()"
|
|
|
243 |
data-brand="accessories" data-toggle="modal"
|
|
|
244 |
data-target="#itemWiseBrandStock"> $totalAccStock</td>
|
|
|
245 |
#else
|
|
|
246 |
<td class="currency brandStock" style="background-color:#F7DC6F" data-fofoid="$cr.getKey()"
|
|
|
247 |
data-brand="accessories" data-toggle="modal"
|
|
|
248 |
data-target="#itemWiseBrandStock">$totalAccStock</td>
|
|
|
249 |
#end
|
|
|
250 |
|
|
|
251 |
|
|
|
252 |
|
|
|
253 |
#if($brandAmountLimit.get("TV") != 0)
|
|
|
254 |
#set($stockTVPercent = ($totalTvStock / $brandAmountLimit.get("TV"))*100)
|
|
|
255 |
#else
|
|
|
256 |
#set($stockTVPercent = 100)
|
|
|
257 |
#end
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
#if($stockTVPercent > 90)
|
|
|
261 |
<td class="currency brandStock" style="background-color:#52BE80" data-fofoid="$cr.getKey()"
|
|
|
262 |
data-brand="TV" data-toggle="modal" data-target="#itemWiseBrandStock">$totalTvStock</td>
|
|
|
263 |
#elseif($stockTVPercent < 80)
|
|
|
264 |
<td class="currency brandStock" style="background-color:#EC7063 " data-fofoid="$cr.getKey()"
|
|
|
265 |
data-brand="TV" data-toggle="modal"
|
|
|
266 |
data-target="#itemWiseBrandStock"> $totalTvStock</td>
|
|
|
267 |
#else
|
|
|
268 |
<td class="currency brandStock" style="background-color:#F7DC6F" data-fofoid="$cr.getKey()"
|
|
|
269 |
data-brand="TV" data-toggle="modal"
|
|
|
270 |
data-target="#itemWiseBrandStock"> $totalTvStock</td>
|
|
|
271 |
#end
|
|
|
272 |
|
| 33806 |
tejus.loha |
273 |
<td>
|
| 31665 |
amit.gupta |
274 |
|
| 33806 |
tejus.loha |
275 |
|
|
|
276 |
<div style="display:flex">
|
|
|
277 |
#if($partnerActivationType.get($cr.getKey()) && $canChangeActivationType)
|
|
|
278 |
<select class="form-control input-sm" id="activationType" name="activationType"
|
|
|
279 |
placeholder="Activation Type">
|
|
|
280 |
|
|
|
281 |
|
|
|
282 |
#foreach($activationType in $activationTypes)
|
|
|
283 |
|
|
|
284 |
#if($activationType == $partnerActivationType.get($cr.getKey())))
|
|
|
285 |
|
|
|
286 |
<option value="$partnerActivationType.get($cr.getKey())"
|
|
|
287 |
selected>$partnerActivationType.get($cr.getKey())</option>
|
|
|
288 |
#else
|
|
|
289 |
<option value="$activationType">$activationType</option>
|
|
|
290 |
#end
|
|
|
291 |
#end
|
|
|
292 |
#else
|
|
|
293 |
$partnerActivationType.get($cr.getKey())
|
|
|
294 |
#end
|
|
|
295 |
</div>
|
|
|
296 |
</select>
|
|
|
297 |
|
|
|
298 |
|
|
|
299 |
</td>
|
| 31665 |
amit.gupta |
300 |
</tr>
|
|
|
301 |
#end
|
|
|
302 |
|
|
|
303 |
</tbody>
|
|
|
304 |
</table>
|
|
|
305 |
|
|
|
306 |
|
|
|
307 |
<div id="itemWiseBrandStock" class="modal" role="dialog">
|
| 34437 |
ranu |
308 |
<div class="modal-dialog modal-lg" style="min-width:95%;">
|
| 31665 |
amit.gupta |
309 |
<div class="modal-content">
|
|
|
310 |
|
|
|
311 |
</div>
|
|
|
312 |
</div>
|
|
|
313 |
</div>
|
|
|
314 |
|
| 34449 |
ranu |
315 |
<div id="poItemsDetail" class="modal" role="dialog">
|
|
|
316 |
<div class="modal-dialog modal-sm">
|
|
|
317 |
<div class="modal-content" style="margin-top: 40%;">
|
|
|
318 |
|
|
|
319 |
</div>
|
|
|
320 |
</div>
|
|
|
321 |
</div>
|
|
|
322 |
|
| 31665 |
amit.gupta |
323 |
</section>
|
|
|
324 |
|
|
|
325 |
|
| 30003 |
tejbeer |
326 |
<script type="text/javascript">
|
| 31665 |
amit.gupta |
327 |
var editor;
|
| 30003 |
tejbeer |
328 |
|
| 31665 |
amit.gupta |
329 |
$(document).ready(function () {
|
| 30003 |
tejbeer |
330 |
|
| 31665 |
amit.gupta |
331 |
$('#partnerBrandWiseDetail').DataTable({
|
|
|
332 |
"bPaginate": true,
|
|
|
333 |
"bLengthChange": true,
|
|
|
334 |
"bFilter": true,
|
|
|
335 |
"bInfo": false,
|
|
|
336 |
"bAutoWidth": false,
|
|
|
337 |
"scrollX": true,
|
|
|
338 |
});
|
|
|
339 |
});
|
| 30003 |
tejbeer |
340 |
|
| 31665 |
amit.gupta |
341 |
$('#partnerBrandWiseDetail').on('click', '.brandStock', function () {
|
|
|
342 |
var fofoId = $(this).data('fofoid');
|
|
|
343 |
var brand = $(this).data('brand');
|
| 30003 |
tejbeer |
344 |
|
| 34397 |
ranu |
345 |
var $row = $(this).closest('tr');
|
| 30046 |
tejbeer |
346 |
|
| 35011 |
ranu |
347 |
var shortInvest = $row.find('.shortInvestment-mk').val().trim();
|
|
|
348 |
var totalDueWithInterest = $row.find('.totaldue-with-interest-mk').val().trim();
|
|
|
349 |
// var shortInvest = 0;
|
| 34401 |
ranu |
350 |
|
| 34397 |
ranu |
351 |
console.log(shortInvest)
|
| 30046 |
tejbeer |
352 |
|
| 35011 |
ranu |
353 |
doGetAjaxRequestHandler(context + "/getPartnerShortageStock?brand=" + brand + "&fofoId=" + fofoId + "&shortInvest=" + shortInvest, +"&totalDueWithInterest=" + totalDueWithInterest, function (response) {
|
| 34397 |
ranu |
354 |
|
| 31665 |
amit.gupta |
355 |
$('#itemWiseBrandStock .modal-content').html(response);
|
| 34398 |
ranu |
356 |
getPartnerShortageStockDetail(fofoId, brand);
|
| 30046 |
tejbeer |
357 |
|
| 31665 |
amit.gupta |
358 |
});
|
|
|
359 |
});
|
|
|
360 |
|
|
|
361 |
|
| 34088 |
ranu |
362 |
function getPartnerShortageStockDetail(fofoId, brand) {
|
|
|
363 |
console.log("fdwfdw");
|
|
|
364 |
doGetAjaxRequestHandler(
|
|
|
365 |
context + "/getPartnerShortageStockDetail?brand=" + brand + "&fofoId="
|
| 34398 |
ranu |
366 |
+ fofoId, function (response) {
|
| 34088 |
ranu |
367 |
|
|
|
368 |
$('#itemWiseBrandStockDetail').html(response);
|
|
|
369 |
|
|
|
370 |
});
|
|
|
371 |
}
|
|
|
372 |
|
|
|
373 |
|
| 34389 |
ranu |
374 |
</script>
|
|
|
375 |
|