| 24107 |
govind |
1 |
<style>
|
|
|
2 |
|
|
|
3 |
</style>
|
|
|
4 |
<script>
|
|
|
5 |
$(document).ready(function() {
|
|
|
6 |
$('#targetSlabForAdmin').DataTable(
|
|
|
7 |
{
|
|
|
8 |
"bPaginate": true,
|
|
|
9 |
"bLengthChange": false,
|
|
|
10 |
"bFilter": false,
|
|
|
11 |
"bInfo": false,
|
|
|
12 |
"bAutoWidth": false }
|
|
|
13 |
);
|
|
|
14 |
|
|
|
15 |
} );
|
|
|
16 |
</script>
|
|
|
17 |
<section class="wrapper">
|
|
|
18 |
<div class="row">
|
|
|
19 |
<div class="col-lg-12">
|
|
|
20 |
<h3 class="page-header"><i class="icon_document_alt"></i>SALE</h3>
|
|
|
21 |
<ol class="breadcrumb">
|
|
|
22 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
23 |
<li><i class="icon_document_alt"></i>PARTNER TARGET</li>
|
|
|
24 |
</ol>
|
|
|
25 |
</div>
|
|
|
26 |
</div>
|
|
|
27 |
|
|
|
28 |
<div id="partner-target-history-search">
|
|
|
29 |
<div class="row">
|
|
|
30 |
<div class="col-lg-3">
|
|
|
31 |
<select class="form-control input-sm" id="partnerTargetDatetime" name="partnerTargetDatetime" placeholder="Month" style="width:70%" onchange="getSlabTarget()">
|
|
|
32 |
#foreach($monthYear in $monthYears.keySet())
|
|
|
33 |
#if($startDate ==$monthYear)
|
|
|
34 |
<option value="$monthYear" selected>$monthYears.get($monthYear)</option>
|
|
|
35 |
#else
|
|
|
36 |
<option value="$monthYear">$monthYears.get($monthYear)</option>
|
|
|
37 |
#end
|
|
|
38 |
#end
|
|
|
39 |
</select>
|
|
|
40 |
</div>
|
|
|
41 |
</div>
|
|
|
42 |
</div><br><br>
|
|
|
43 |
#if($roleType == "false")
|
|
|
44 |
<div class="col-lg-4">
|
|
|
45 |
<div id="slab-table">
|
|
|
46 |
<div class="row">
|
|
|
47 |
<div class="col-lg-1">
|
|
|
48 |
<table class="table table-bordered">
|
|
|
49 |
<thead>
|
|
|
50 |
<tr>
|
|
|
51 |
<th>Slab</th>
|
|
|
52 |
<th>Target%</th>
|
|
|
53 |
<th>Scheme</th>
|
|
|
54 |
</tr>
|
|
|
55 |
</thead>
|
|
|
56 |
<tbody>
|
|
|
57 |
#foreach($targetSlab in $targetSlabs)
|
|
|
58 |
<tr>
|
|
|
59 |
<td>$targetSlab.getSlabName()</td>
|
|
|
60 |
#if($targetSlab.getMaxTargetPercentage()==-1)
|
|
|
61 |
<td>=>$targetSlab.getMinTargetPercentage()%</td>
|
|
|
62 |
#if($targetSlab.getRewardPercentage()==0)
|
|
|
63 |
<td>actual margins</td>
|
|
|
64 |
#elseif($targetSlab.getRewardPercentage()<0)
|
|
|
65 |
|
|
|
66 |
#set($r1=$targetSlab.getRewardPercentage()*-1)
|
|
|
67 |
<td>$r1% penalty of revenue</td>
|
|
|
68 |
#else
|
|
|
69 |
<td>$targetSlab.getRewardPercentage()% incentive of total revenue</td>
|
|
|
70 |
#end
|
|
|
71 |
#elseif($targetSlab.getMinTargetPercentage()==0)
|
|
|
72 |
<td>=<$targetSlab.getMaxTargetPercentage()%</td>
|
|
|
73 |
#if($targetSlab.getRewardPercentage()==0)
|
|
|
74 |
<td>actual margins</td>
|
|
|
75 |
#elseif($targetSlab.getRewardPercentage()<0)
|
|
|
76 |
#set($r1=$targetSlab.getRewardPercentage()*-1)
|
|
|
77 |
<td>$r1% penalty of revenue</td>
|
|
|
78 |
#else
|
|
|
79 |
<td>$targetSlab.getRewardPercentage()% incentive of total revenue</td>
|
|
|
80 |
#end
|
|
|
81 |
#else
|
|
|
82 |
<td>$targetSlab.getMinTargetPercentage()%-$targetSlab.getMaxTargetPercentage()%</td>
|
|
|
83 |
#if($targetSlab.getRewardPercentage()==0)
|
|
|
84 |
<td>actual margins</td>
|
|
|
85 |
#elseif($targetSlab.getRewardPercentage()<0)
|
|
|
86 |
#set($r1=$targetSlab.getRewardPercentage()*-1)
|
|
|
87 |
<td>$r1% penalty of revenue</td>
|
|
|
88 |
#else
|
|
|
89 |
<td>$targetSlab.getRewardPercentage()% incentive of total revenue</td>
|
|
|
90 |
#end
|
|
|
91 |
#end
|
|
|
92 |
</tr>
|
|
|
93 |
#end
|
|
|
94 |
</tbody>
|
|
|
95 |
</table>
|
|
|
96 |
</div>
|
|
|
97 |
</div>
|
|
|
98 |
</div>
|
|
|
99 |
</div>
|
|
|
100 |
</div>
|
|
|
101 |
#end
|
|
|
102 |
<div class="col-lg-8">
|
|
|
103 |
<div id="target-history-table">
|
|
|
104 |
<div class="row">
|
|
|
105 |
<div class="col-lg-12">
|
|
|
106 |
#if($roleType == "true")
|
|
|
107 |
<table class="table table-bordered" id="targetSlabForAdmin">
|
|
|
108 |
#else
|
|
|
109 |
<table class="table table-bordered">
|
|
|
110 |
#end
|
|
|
111 |
<thead>
|
|
|
112 |
<tr>
|
|
|
113 |
#if($roleType == "true")
|
|
|
114 |
<th>Partner</th>
|
|
|
115 |
#end
|
|
|
116 |
<th>Sales Value</th>
|
|
|
117 |
<th>Target</th>
|
|
|
118 |
<th>Eligibility</th>
|
|
|
119 |
<th>Daily Sale Target</th>
|
|
|
120 |
<th>Feedback</th>
|
|
|
121 |
</tr>
|
|
|
122 |
</thead>
|
|
|
123 |
<tbody>
|
|
|
124 |
#if(!$saleValues.isEmpty())
|
|
|
125 |
#foreach( $saleValue in $saleValues.keySet())
|
|
|
126 |
<tr>
|
|
|
127 |
#if($roleType == "true")
|
|
|
128 |
<td>$fofoIdsAndCustomRetailer.get($saleValue).getBusinessName()</td>
|
|
|
129 |
#end
|
|
|
130 |
<td>$saleValues.get($saleValue)</td>
|
|
|
131 |
#if($targetValues.get($saleValue))
|
|
|
132 |
<td>$targetValues.get($saleValue)</td>
|
|
|
133 |
#else
|
|
|
134 |
<td>Undefined TargetValue</td>
|
|
|
135 |
#end
|
|
|
136 |
#if($fofoIdsAndSlabNames.get($saleValue))
|
|
|
137 |
<td>$fofoIdsAndSlabNames.get($saleValue)</td>
|
|
|
138 |
#else
|
|
|
139 |
<td>No TaregetDefined</td>
|
|
|
140 |
#end
|
|
|
141 |
#if($dailyAverageSale.get($saleValue))
|
|
|
142 |
<td>$dailyAverageSale.get($saleValue)</td>
|
|
|
143 |
#else
|
|
|
144 |
<td>No Target sale defined</td>
|
|
|
145 |
#end
|
|
|
146 |
#if($percentageBelowOrHigherThanTarget.get($saleValue))
|
|
|
147 |
#if($percentageBelowOrHigherThanTarget.get($saleValue)>=0)
|
|
|
148 |
<td style="background-color:green;color:white;font-weight: bold;">$percentageBelowOrHigherThanTarget.get($saleValue)%</td>
|
|
|
149 |
#else
|
|
|
150 |
<td style="background-color:red;color:white;font-weight: bold;">$percentageBelowOrHigherThanTarget.get($saleValue)%</td>
|
|
|
151 |
#end
|
|
|
152 |
#else
|
|
|
153 |
<td style="background-color:red;color:white;font-weight: bold;">null</td>
|
|
|
154 |
#end
|
|
|
155 |
</tr>
|
|
|
156 |
#end
|
|
|
157 |
#else
|
|
|
158 |
<tr>
|
|
|
159 |
<td colspan="6" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
|
|
|
160 |
</tr>
|
|
|
161 |
#end
|
|
|
162 |
</tbody>
|
|
|
163 |
</table>
|
|
|
164 |
</div>
|
|
|
165 |
</div>
|
|
|
166 |
</div>
|
|
|
167 |
</div>
|
|
|
168 |
</section>
|