| 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 |
|
|
|
69 |
<td>$fofoIdPartnerTypeMap.get($cr.getKey())</td>
|
|
|
70 |
<td>$partnerSalesHeadersMap.get($cr.getKey()).getTerritoryManager()</td>
|
|
|
71 |
|
|
|
72 |
<td class="currency">$partnerDailyInvestmentMap.get($cr.getKey()).getWalletAmount()</td>
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
#set($realInvestment = $partnerDailyInvestmentMap.get($cr.getKey()).getTotalInvestment() + $partnerDailyInvestmentMap.get($cr.getKey()).getShortInvestment() )
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
#set($realpercent = ($partnerDailyInvestmentMap.get($cr.getKey()).getTotalInvestment() / $realInvestment)*100)
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
#if($realpercent < 75)
|
|
|
83 |
<td class="currency"
|
|
|
84 |
style="color:red">$partnerDailyInvestmentMap.get($cr.getKey()).getShortInvestment()</td>
|
| 30003 |
tejbeer |
85 |
#else
|
| 31665 |
amit.gupta |
86 |
<td class="currency">$partnerDailyInvestmentMap.get($cr.getKey()).getShortInvestment()</td>
|
|
|
87 |
#end
|
|
|
88 |
<td class="currency">$partnerDailyInvestmentMap.get($cr.getKey()).getMinInvestment()</td>
|
| 33812 |
tejus.loha |
89 |
|
|
|
90 |
#if($totalDueMap.get($cr.getKey())>0)
|
|
|
91 |
<td class="currency">$totalDueMap.get($cr.getKey()).setScale(0,$ru)</td>
|
| 33806 |
tejus.loha |
92 |
#else
|
|
|
93 |
<td class="currency">--</td>
|
| 33812 |
tejus.loha |
94 |
#end
|
| 31665 |
amit.gupta |
95 |
|
| 33812 |
tejus.loha |
96 |
#if($fofoIdMonthlyTargetMap.get($cr.getKey()).getPurchaseTarget())
|
|
|
97 |
<td class="currency">$nf.format($fofoIdMonthlyTargetMap.get($cr.getKey()).getPurchaseTarget())</td>
|
|
|
98 |
#else
|
|
|
99 |
<td class="currency">--</td>
|
| 33806 |
tejus.loha |
100 |
#end
|
| 33812 |
tejus.loha |
101 |
|
| 33813 |
tejus.loha |
102 |
#set($isOverSale = $fofoMTDSaleMap.get($cr.getKey())>$currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))
|
| 33812 |
tejus.loha |
103 |
#set($salePurchaseGap = $fofoMTDSaleMap.get($cr.getKey())-$currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))
|
| 33813 |
tejus.loha |
104 |
|
| 33806 |
tejus.loha |
105 |
#if($currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))
|
| 33813 |
tejus.loha |
106 |
#if($isOverSale)
|
|
|
107 |
#if($salePurchaseGap>50000)
|
|
|
108 |
<td class="currency">
|
|
|
109 |
<span style="color:red">$nf.format($currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))</span>
|
|
|
110 |
</td>
|
|
|
111 |
#else
|
|
|
112 |
<td class="currency">
|
|
|
113 |
<span style="color:darkorange">$nf.format($currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))</span>
|
|
|
114 |
</td>
|
|
|
115 |
#end
|
| 33812 |
tejus.loha |
116 |
#else
|
| 33813 |
tejus.loha |
117 |
<td>
|
|
|
118 |
$nf.format($currentMonthTillDateRetailerPOValueMap.get($cr.getKey()))
|
| 33812 |
tejus.loha |
119 |
</td>
|
|
|
120 |
#end
|
| 33806 |
tejus.loha |
121 |
#else
|
|
|
122 |
<td class="currency">--</td>
|
| 33812 |
tejus.loha |
123 |
#end
|
| 31665 |
amit.gupta |
124 |
|
| 33806 |
tejus.loha |
125 |
#if($fofoMTDSaleMap.get($cr.getKey()))
|
| 33813 |
tejus.loha |
126 |
#if($isOverSale)
|
|
|
127 |
#if($salePurchaseGap>50000)
|
|
|
128 |
<td class="currency">
|
|
|
129 |
<span style="color:red">$nf.format($fofoMTDSaleMap.get($cr.getKey()))</span>
|
|
|
130 |
</td>
|
|
|
131 |
#else
|
|
|
132 |
<td class="currency">
|
|
|
133 |
<span style="color:darkorange">$nf.format($fofoMTDSaleMap.get($cr.getKey()))</span>
|
|
|
134 |
</td>
|
|
|
135 |
#end
|
| 33812 |
tejus.loha |
136 |
#else
|
| 33813 |
tejus.loha |
137 |
<td class="currency">
|
|
|
138 |
$nf.format($fofoMTDSaleMap.get($cr.getKey()))
|
| 33812 |
tejus.loha |
139 |
</td>
|
|
|
140 |
#end
|
| 33806 |
tejus.loha |
141 |
#else
|
|
|
142 |
<td class="currency">--</td>
|
|
|
143 |
#end
|
|
|
144 |
|
| 31665 |
amit.gupta |
145 |
#foreach($brand in $brands)
|
|
|
146 |
#set($totalStock = $fofoIdBrandAmountMap.get($cr.getKey()).get($brand))
|
|
|
147 |
#set($minBrandAmount = 0.0)
|
|
|
148 |
#set($stockPercent = 100)
|
|
|
149 |
|
|
|
150 |
#if($partnerBrandLimitMap.get($cr.getKey()))
|
|
|
151 |
#if($partnerBrandLimitMap.get($cr.getKey()).get($brand))
|
|
|
152 |
#set($minBrandAmount = $partnerBrandLimitMap.get($cr.getKey()).get($brand))
|
|
|
153 |
#set($stockPercent = ($totalStock / $minBrandAmount)*100)
|
|
|
154 |
#end
|
|
|
155 |
#end
|
|
|
156 |
|
|
|
157 |
#if($brand == "Nokia" || $brand == "Xiaomi" || $brand == "Realme")
|
|
|
158 |
<td class="currency brandStock" data-fofoid="$cr.getKey()" data-brand="$brand"
|
|
|
159 |
data-toggle="modal" data-target="#itemWiseBrandStock">$totalStock <span
|
|
|
160 |
class="tooltiptext">$minBrandAmount</span></td>
|
|
|
161 |
#else
|
|
|
162 |
#if($stockPercent > 90)
|
|
|
163 |
<td class="currency brandStock" style="background-color:#52BE80"
|
|
|
164 |
data-stock="$inStockBrandModel.get($cr.getKey()).get($brand)"
|
|
|
165 |
data-pending="$pendingIndent.get($cr.getKey()).get($brand)"
|
|
|
166 |
data-grn="$grnPendingOrders.get($cr.getKey()).get($brand)"
|
|
|
167 |
data-fofoid="$cr.getKey()" data-brand="$brand" data-toggle="modal"
|
|
|
168 |
data-target="#itemWiseBrandStock">$totalStock <span
|
|
|
169 |
class="tooltiptext">$minBrandAmount</span></td>
|
|
|
170 |
#elseif($stockPercent < 80)
|
|
|
171 |
<td class="currency brandStock" style="background-color:#EC7063 "
|
|
|
172 |
data-stock="$inStockBrandModel.get($cr.getKey()).get($brand)"
|
|
|
173 |
data-pending="$pendingIndent.get($cr.getKey()).get($brand)"
|
|
|
174 |
data-grn="$grnPendingOrders.get($cr.getKey()).get($brand)"
|
|
|
175 |
data-fofoid="$cr.getKey()" data-brand="$brand" data-toggle="modal"
|
|
|
176 |
data-target="#itemWiseBrandStock"> $totalStock <span
|
|
|
177 |
class="tooltiptext">$minBrandAmount</span></td>
|
|
|
178 |
#else
|
|
|
179 |
<td class="currency brandStock" style="background-color:#F7DC6F"
|
|
|
180 |
data-stock="$inStockBrandModel.get($cr.getKey()).get($brand)"
|
|
|
181 |
data-pending="$pendingIndent.get($cr.getKey()).get($brand)"
|
|
|
182 |
data-grn="$grnPendingOrders.get($cr.getKey()).get($brand)"
|
|
|
183 |
data-fofoid="$cr.getKey()" data-brand="$brand" data-toggle="modal"
|
|
|
184 |
data-target="#itemWiseBrandStock">$totalStock <span
|
|
|
185 |
class="tooltiptext">$minBrandAmount</span></td>
|
|
|
186 |
#end
|
|
|
187 |
|
|
|
188 |
#end
|
|
|
189 |
|
|
|
190 |
#end
|
|
|
191 |
|
|
|
192 |
#if($inStockAccessTv.get($cr.getKey()))
|
|
|
193 |
#set($inStockAcc = $inStockAccessTv.get($cr.getKey()).getAccessoriesAmount())
|
|
|
194 |
#set($inStockTv = $inStockAccessTv.get($cr.getKey()).getTvAmount())
|
| 30003 |
tejbeer |
195 |
#else
|
| 31665 |
amit.gupta |
196 |
#set($inStockAcc = 0)
|
|
|
197 |
#set($inStockTv = 0)
|
|
|
198 |
#end
|
|
|
199 |
|
|
|
200 |
|
|
|
201 |
#if($pendingIndentAccessTv.get($cr.getKey()))
|
|
|
202 |
#set($pendingIndentAcc = $pendingIndentAccessTv.get($cr.getKey()).getAccessoriesAmount())
|
|
|
203 |
#set($pendingIndentTv = $pendingIndentAccessTv.get($cr.getKey()).getTvAmount())
|
| 30003 |
tejbeer |
204 |
#else
|
| 31665 |
amit.gupta |
205 |
#set($pendingIndentAcc = 0)
|
|
|
206 |
#set($pendingIndentTv = 0)
|
|
|
207 |
#end
|
| 30003 |
tejbeer |
208 |
|
|
|
209 |
|
| 31665 |
amit.gupta |
210 |
#if($grnPendingAccessTvOrders.get($cr.getKey()))
|
|
|
211 |
#set($grnPendingAcc = $grnPendingAccessTvOrders.get($cr.getKey()).getAccessoriesAmount())
|
|
|
212 |
#set($grnPendingTv = $grnPendingAccessTvOrders.get($cr.getKey()).getTvAmount())
|
|
|
213 |
#else
|
|
|
214 |
#set($grnPendingAcc = 0)
|
|
|
215 |
#set($grnPendingTv = 0)
|
|
|
216 |
#end
|
| 30003 |
tejbeer |
217 |
|
|
|
218 |
|
| 31665 |
amit.gupta |
219 |
#set($totalAccStock = $inStockAcc+ $pendingIndentAcc + $grnPendingAcc)
|
| 30003 |
tejbeer |
220 |
|
| 31665 |
amit.gupta |
221 |
#set($totalTvStock = $inStockTv+ $pendingIndentTv + $grnPendingTv)
|
|
|
222 |
|
|
|
223 |
|
|
|
224 |
#if($brandAmountLimit.get("accessories") != 0)
|
|
|
225 |
#set($stockAccPercent = ($totalAccStock / $brandAmountLimit.get("accessories"))*100)
|
|
|
226 |
#else
|
|
|
227 |
#set($stockAccPercent = 100)
|
|
|
228 |
#end
|
|
|
229 |
|
|
|
230 |
|
|
|
231 |
#if($stockAccPercent > 90)
|
|
|
232 |
<td class="currency brandStock" style="background-color:#52BE80" data-fofoid="$cr.getKey()"
|
|
|
233 |
data-brand="accessories" data-toggle="modal"
|
|
|
234 |
data-target="#itemWiseBrandStock">$totalAccStock</td>
|
|
|
235 |
#elseif($stockAccPercent < 80)
|
|
|
236 |
<td class="currency brandStock" style="background-color:#EC7063 " data-fofoid="$cr.getKey()"
|
|
|
237 |
data-brand="accessories" data-toggle="modal"
|
|
|
238 |
data-target="#itemWiseBrandStock"> $totalAccStock</td>
|
|
|
239 |
#else
|
|
|
240 |
<td class="currency brandStock" style="background-color:#F7DC6F" data-fofoid="$cr.getKey()"
|
|
|
241 |
data-brand="accessories" data-toggle="modal"
|
|
|
242 |
data-target="#itemWiseBrandStock">$totalAccStock</td>
|
|
|
243 |
#end
|
|
|
244 |
|
|
|
245 |
|
|
|
246 |
|
|
|
247 |
#if($brandAmountLimit.get("TV") != 0)
|
|
|
248 |
#set($stockTVPercent = ($totalTvStock / $brandAmountLimit.get("TV"))*100)
|
|
|
249 |
#else
|
|
|
250 |
#set($stockTVPercent = 100)
|
|
|
251 |
#end
|
|
|
252 |
|
|
|
253 |
|
|
|
254 |
#if($stockTVPercent > 90)
|
|
|
255 |
<td class="currency brandStock" style="background-color:#52BE80" data-fofoid="$cr.getKey()"
|
|
|
256 |
data-brand="TV" data-toggle="modal" data-target="#itemWiseBrandStock">$totalTvStock</td>
|
|
|
257 |
#elseif($stockTVPercent < 80)
|
|
|
258 |
<td class="currency brandStock" style="background-color:#EC7063 " data-fofoid="$cr.getKey()"
|
|
|
259 |
data-brand="TV" data-toggle="modal"
|
|
|
260 |
data-target="#itemWiseBrandStock"> $totalTvStock</td>
|
|
|
261 |
#else
|
|
|
262 |
<td class="currency brandStock" style="background-color:#F7DC6F" data-fofoid="$cr.getKey()"
|
|
|
263 |
data-brand="TV" data-toggle="modal"
|
|
|
264 |
data-target="#itemWiseBrandStock"> $totalTvStock</td>
|
|
|
265 |
#end
|
|
|
266 |
|
| 33806 |
tejus.loha |
267 |
<td>
|
| 31665 |
amit.gupta |
268 |
|
| 33806 |
tejus.loha |
269 |
|
|
|
270 |
<div style="display:flex">
|
|
|
271 |
#if($partnerActivationType.get($cr.getKey()) && $canChangeActivationType)
|
|
|
272 |
<select class="form-control input-sm" id="activationType" name="activationType"
|
|
|
273 |
placeholder="Activation Type">
|
|
|
274 |
|
|
|
275 |
|
|
|
276 |
#foreach($activationType in $activationTypes)
|
|
|
277 |
|
|
|
278 |
#if($activationType == $partnerActivationType.get($cr.getKey())))
|
|
|
279 |
|
|
|
280 |
<option value="$partnerActivationType.get($cr.getKey())"
|
|
|
281 |
selected>$partnerActivationType.get($cr.getKey())</option>
|
|
|
282 |
#else
|
|
|
283 |
<option value="$activationType">$activationType</option>
|
|
|
284 |
#end
|
|
|
285 |
#end
|
|
|
286 |
#else
|
|
|
287 |
$partnerActivationType.get($cr.getKey())
|
|
|
288 |
#end
|
|
|
289 |
</div>
|
|
|
290 |
</select>
|
|
|
291 |
|
|
|
292 |
|
|
|
293 |
</td>
|
| 31665 |
amit.gupta |
294 |
</tr>
|
|
|
295 |
#end
|
|
|
296 |
|
|
|
297 |
</tbody>
|
|
|
298 |
</table>
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
<div id="itemWiseBrandStock" class="modal" role="dialog">
|
|
|
302 |
<div class="modal-dialog">
|
|
|
303 |
<div class="modal-content">
|
|
|
304 |
|
|
|
305 |
</div>
|
|
|
306 |
</div>
|
|
|
307 |
</div>
|
|
|
308 |
|
|
|
309 |
</section>
|
|
|
310 |
|
|
|
311 |
|
| 30003 |
tejbeer |
312 |
<script type="text/javascript">
|
| 31665 |
amit.gupta |
313 |
var editor;
|
| 30003 |
tejbeer |
314 |
|
| 31665 |
amit.gupta |
315 |
$(document).ready(function () {
|
| 30003 |
tejbeer |
316 |
|
| 31665 |
amit.gupta |
317 |
$('#partnerBrandWiseDetail').DataTable({
|
|
|
318 |
"bPaginate": true,
|
|
|
319 |
"bLengthChange": true,
|
|
|
320 |
"bFilter": true,
|
|
|
321 |
"bInfo": false,
|
|
|
322 |
"bAutoWidth": false,
|
|
|
323 |
"scrollX": true,
|
|
|
324 |
});
|
|
|
325 |
});
|
| 30003 |
tejbeer |
326 |
|
| 31665 |
amit.gupta |
327 |
$('#partnerBrandWiseDetail').on('click', '.brandStock', function () {
|
|
|
328 |
var fofoId = $(this).data('fofoid');
|
|
|
329 |
var brand = $(this).data('brand');
|
| 30003 |
tejbeer |
330 |
|
| 31665 |
amit.gupta |
331 |
console.log(brand)
|
| 30046 |
tejbeer |
332 |
|
| 31665 |
amit.gupta |
333 |
doGetAjaxRequestHandler(context + "/getPartnerShortageStock?brand=" + brand + "&fofoId="
|
|
|
334 |
+ fofoId, function (response) {
|
| 30046 |
tejbeer |
335 |
|
| 31665 |
amit.gupta |
336 |
$('#itemWiseBrandStock .modal-content').html(response);
|
| 30046 |
tejbeer |
337 |
|
| 31665 |
amit.gupta |
338 |
});
|
|
|
339 |
});
|
|
|
340 |
|
|
|
341 |
|
| 30003 |
tejbeer |
342 |
</script>
|