| 32203 |
amit.gupta |
1 |
<div class="modal-header">
|
|
|
2 |
<button type="button" class="close" id="cancel-model" data-dismiss="modal">×</button>
|
|
|
3 |
<h4 class="modal-title">Terms & Conditions</h4>
|
|
|
4 |
</div>
|
| 35415 |
amit |
5 |
|
| 32203 |
amit.gupta |
6 |
<div class="modal-body" style="height:500px;overflow:auto">
|
|
|
7 |
<div style="margin-top: 15px;" class="offer-margin-table">
|
|
|
8 |
|
| 35415 |
amit |
9 |
## Offer Description
|
| 32203 |
amit.gupta |
10 |
<div class="row">
|
|
|
11 |
<div class="col-lg-12">
|
| 35415 |
amit |
12 |
<div style="font-size:20px; font-weight:bold" class="pull-left">
|
|
|
13 |
$vmUtils.html($offer.getDescription())
|
|
|
14 |
</div>
|
| 32203 |
amit.gupta |
15 |
</div>
|
|
|
16 |
</div>
|
| 35415 |
amit |
17 |
|
| 35396 |
amit |
18 |
<div class="row">
|
| 35415 |
amit |
19 |
## Base Criteria Section (if applicable)
|
| 32203 |
amit.gupta |
20 |
#if($offer.isBaseCriteria())
|
| 35415 |
amit |
21 |
<div class="col-lg-12">
|
|
|
22 |
<h5 style="text-align: left">Base Criteria - </h5>
|
|
|
23 |
<div style="text-align:left">$offer.getItemCriteriaString()</div>
|
|
|
24 |
</div>
|
| 32203 |
amit.gupta |
25 |
#end
|
| 35415 |
amit |
26 |
|
|
|
27 |
## Main Offer Table
|
| 32203 |
amit.gupta |
28 |
<div class="col-lg-12">
|
|
|
29 |
<table class="table table-bordered table-sm">
|
| 35415 |
amit |
30 |
|
|
|
31 |
## ===== TABLE HEADER =====
|
| 32203 |
amit.gupta |
32 |
<thead>
|
| 35415 |
amit |
33 |
<tr>
|
|
|
34 |
<th rowspan="2">Models</th>
|
|
|
35 |
<th rowspan="2">Target</th>
|
|
|
36 |
|
| 35668 |
amit |
37 |
## Base Sale columns - only for retailers (not admin)
|
| 35415 |
amit |
38 |
#if(!$isAdmin)
|
|
|
39 |
#if($offer.isActivation())
|
| 35668 |
amit |
40 |
<th colspan="2">Base Sale</th>
|
| 35415 |
amit |
41 |
#else
|
|
|
42 |
<th rowspan="2">Billed</th>
|
|
|
43 |
#end
|
|
|
44 |
#end
|
|
|
45 |
|
|
|
46 |
<th rowspan="2">Payout On</th>
|
|
|
47 |
|
| 35668 |
amit |
48 |
## Model Sale columns - only for retailers when baseCriteria=true
|
|
|
49 |
#if(!$isAdmin && $offer.isBaseCriteria())
|
| 35415 |
amit |
50 |
#if($offer.isActivation())
|
| 35668 |
amit |
51 |
<th colspan="2">Model Sale</th>
|
| 35415 |
amit |
52 |
#else
|
|
|
53 |
<th rowspan="2">Billed</th>
|
|
|
54 |
#end
|
|
|
55 |
#end
|
| 35668 |
amit |
56 |
|
|
|
57 |
## Est. Payout column - only for retailers
|
|
|
58 |
#if(!$isAdmin)
|
|
|
59 |
<th rowspan="2">Est. Payout</th>
|
|
|
60 |
#end
|
| 35415 |
amit |
61 |
</tr>
|
|
|
62 |
|
|
|
63 |
## Sub-headers for Activation offers (Billed/Activated) - only for retailers
|
|
|
64 |
#if(!$isAdmin && $offer.isActivation())
|
|
|
65 |
<tr>
|
|
|
66 |
<th style="background-color: darkgray">Billed</th>
|
|
|
67 |
<th>Activated</th>
|
| 35668 |
amit |
68 |
#if($offer.isBaseCriteria())
|
| 35415 |
amit |
69 |
<th style="background-color: darkgray">Billed</th>
|
|
|
70 |
<th>Activated</th>
|
| 35668 |
amit |
71 |
#end
|
| 35415 |
amit |
72 |
</tr>
|
| 35396 |
amit |
73 |
#end
|
| 35415 |
amit |
74 |
</thead>
|
|
|
75 |
|
|
|
76 |
## ===== TABLE BODY =====
|
|
|
77 |
<tbody>
|
|
|
78 |
#foreach($itemCriteriaPayout in $offer.getTargetSlabs().get(0).getItemCriteriaPayouts())
|
|
|
79 |
|
| 35668 |
amit |
80 |
## Set up model variables for this criteria (with null guard for admin view)
|
|
|
81 |
#if($offer.getCriteriaQtyAmountModel())
|
|
|
82 |
#set($criteriaItemQtyModel = $offer.getCriteriaQtyAmountModel().get($itemCriteriaPayout.getItemCriteria().getId()))
|
|
|
83 |
#if($offer.isBaseCriteria())
|
|
|
84 |
#set($baseItemCriteriaQtyAmountModel = $offer.getCriteriaQtyAmountModel().get(0))
|
|
|
85 |
#else
|
|
|
86 |
#set($baseItemCriteriaQtyAmountModel = $criteriaItemQtyModel)
|
|
|
87 |
#end
|
| 35396 |
amit |
88 |
#end
|
| 35415 |
amit |
89 |
|
|
|
90 |
## Helper variables for readability
|
|
|
91 |
#set($isQuantityPayout = $offer.getPayoutType().name().equals("QUANTITY"))
|
|
|
92 |
#set($isSellinOrSellout = $offer.isSellin() || $offer.isSellout())
|
|
|
93 |
#set($isPercentage = $itemCriteriaPayout.getAmountType().name().equals("PERCENTAGE"))
|
|
|
94 |
#set($isFixed = $itemCriteriaPayout.getAmountType().name().equals("FIXED"))
|
|
|
95 |
|
|
|
96 |
#foreach($payoutSlab in $itemCriteriaPayout.getPayoutSlabs())
|
|
|
97 |
#set($rowspan = $itemCriteriaPayout.getPayoutSlabs().size())
|
|
|
98 |
#set($isFirstRow = $velocityCount == 1)
|
|
|
99 |
#set($selectedStyle = "")
|
|
|
100 |
#if($payoutSlab.isSelected())
|
|
|
101 |
#set($selectedStyle = "background-color: lightgreen")
|
| 35396 |
amit |
102 |
#end
|
|
|
103 |
|
| 35415 |
amit |
104 |
<tr>
|
|
|
105 |
## Column 1: Models (only on first row with rowspan)
|
|
|
106 |
#if($isFirstRow)
|
|
|
107 |
<td style="text-align:left" rowspan="$rowspan">
|
|
|
108 |
$itemCriteriaPayout.getItemCriteriaString()<br>
|
|
|
109 |
#if($itemCriteriaPayout.getStartDate() || $itemCriteriaPayout.getEndDate())
|
|
|
110 |
<span style="font-weight: bold;">Payout Date - </span>
|
|
|
111 |
<span>$itemCriteriaPayout.getStartDate().format($dateFormatter) to $itemCriteriaPayout.getEndDate().format($dateFormatter)</span>
|
| 32203 |
amit.gupta |
112 |
#end
|
| 35415 |
amit |
113 |
</td>
|
|
|
114 |
#end
|
| 35396 |
amit |
115 |
|
| 35415 |
amit |
116 |
## Column 2: Target
|
|
|
117 |
#if($isQuantityPayout)
|
|
|
118 |
<td style="$selectedStyle">$payoutSlab.getOnwardsAmount() pcs Onwards</td>
|
|
|
119 |
#else
|
|
|
120 |
<td style="$selectedStyle">Rs.<span class="currency">$payoutSlab.getOnwardsAmount()</span> Onwards</td>
|
|
|
121 |
#end
|
|
|
122 |
|
| 35668 |
amit |
123 |
## Column 3-4: Base Sale (Billed/Activated) - ONLY FOR RETAILERS
|
| 35415 |
amit |
124 |
#if(!$isAdmin)
|
|
|
125 |
#if($isQuantityPayout)
|
|
|
126 |
#if($isSellinOrSellout)
|
| 35396 |
amit |
127 |
<td>$baseItemCriteriaQtyAmountModel.getQty()</td>
|
|
|
128 |
#else
|
| 35415 |
amit |
129 |
#if($isFirstRow)
|
| 35396 |
amit |
130 |
<td rowspan="$rowspan">$baseItemCriteriaQtyAmountModel.getQty()</td>
|
|
|
131 |
<td rowspan="$rowspan">$baseItemCriteriaQtyAmountModel.getActivationQty()</td>
|
|
|
132 |
#end
|
|
|
133 |
#end
|
|
|
134 |
#else
|
| 35415 |
amit |
135 |
#if($isSellinOrSellout)
|
| 35396 |
amit |
136 |
<td><span class="currency">$baseItemCriteriaQtyAmountModel.getAmount()</span></td>
|
|
|
137 |
#else
|
| 35415 |
amit |
138 |
#if($isFirstRow)
|
|
|
139 |
<td rowspan="$rowspan"><span class="currency" style="color: darkgrey">$baseItemCriteriaQtyAmountModel.getAmount()</span></td>
|
|
|
140 |
<td rowspan="$rowspan"><span class="currency">$baseItemCriteriaQtyAmountModel.getActivationAmount()</span></td>
|
| 35396 |
amit |
141 |
#end
|
|
|
142 |
#end
|
|
|
143 |
#end
|
| 35415 |
amit |
144 |
#end
|
| 35396 |
amit |
145 |
|
| 35415 |
amit |
146 |
## Column 5: Payout On
|
|
|
147 |
#if($isPercentage)
|
|
|
148 |
<td style="$selectedStyle">$payoutSlab.getPayoutAmount()%</td>
|
|
|
149 |
#elseif($isFixed)
|
|
|
150 |
<td style="$selectedStyle">Rs.<span class="currency">$payoutSlab.getPayoutAmount()</span> per pc</td>
|
|
|
151 |
#else
|
|
|
152 |
<td style="$selectedStyle">Rs.<span class="currency">$payoutSlab.getPayoutAmount()</span></td>
|
|
|
153 |
#end
|
|
|
154 |
|
| 35668 |
amit |
155 |
## Column 6-7: Model Sale (Billed/Activated) - ONLY FOR RETAILERS when baseCriteria=true
|
|
|
156 |
#if(!$isAdmin && $offer.isBaseCriteria() && $isFirstRow)
|
| 35415 |
amit |
157 |
#if($isPercentage)
|
|
|
158 |
#if($isSellinOrSellout)
|
|
|
159 |
<td><span class="currency">$criteriaItemQtyModel.getAmount()</span></td>
|
|
|
160 |
#else
|
|
|
161 |
<td rowspan="$rowspan"><span class="currency">$criteriaItemQtyModel.getAmount()</span></td>
|
|
|
162 |
<td rowspan="$rowspan"><span class="currency">$criteriaItemQtyModel.getActivationAmount()</span></td>
|
| 35396 |
amit |
163 |
#end
|
| 35415 |
amit |
164 |
#elseif($isFixed)
|
|
|
165 |
#if($isSellinOrSellout)
|
|
|
166 |
<td>$criteriaItemQtyModel.getQty()</td>
|
|
|
167 |
#else
|
|
|
168 |
<td rowspan="$rowspan">$criteriaItemQtyModel.getQty()</td>
|
|
|
169 |
<td rowspan="$rowspan">$criteriaItemQtyModel.getActivationQty()</td>
|
| 35396 |
amit |
170 |
#end
|
| 32203 |
amit.gupta |
171 |
#else
|
| 35415 |
amit |
172 |
#if($isSellinOrSellout)
|
|
|
173 |
<td rowspan="$rowspan">$criteriaItemQtyModel.getQty()</td>
|
|
|
174 |
#else
|
|
|
175 |
<td rowspan="$rowspan">$criteriaItemQtyModel.getQty()</td>
|
|
|
176 |
<td rowspan="$rowspan">$criteriaItemQtyModel.getActivationQty()</td>
|
| 35396 |
amit |
177 |
#end
|
| 32203 |
amit.gupta |
178 |
#end
|
|
|
179 |
#end
|
| 35668 |
amit |
180 |
|
|
|
181 |
## Column 8: Est. Payout - ONLY FOR RETAILERS on first row
|
|
|
182 |
#if(!$isAdmin && $isFirstRow && $criteriaItemQtyModel)
|
|
|
183 |
<td rowspan="$rowspan">Rs.<span class="currency">$criteriaItemQtyModel.getFinalPayout()</span></td>
|
|
|
184 |
#end
|
| 35415 |
amit |
185 |
</tr>
|
| 32203 |
amit.gupta |
186 |
#end
|
| 35415 |
amit |
187 |
#end
|
| 32203 |
amit.gupta |
188 |
</tbody>
|
|
|
189 |
</table>
|
| 33713 |
tejus.loha |
190 |
<br>
|
| 32203 |
amit.gupta |
191 |
</div>
|
|
|
192 |
</div>
|
|
|
193 |
</div>
|
|
|
194 |
|
| 35415 |
amit |
195 |
## Notes and Terms Section
|
| 32203 |
amit.gupta |
196 |
<div class="row">
|
|
|
197 |
<div class="col-lg-12">
|
|
|
198 |
<ul id="descriptionMenu" style="text-align:left">
|
|
|
199 |
#if($offer.getOfferNotes() && !$offer.getOfferNotes().equals(""))
|
| 35415 |
amit |
200 |
<li>Note - $vmUtils.html($offer.getOfferNotes())</li>
|
| 32203 |
amit.gupta |
201 |
#end
|
|
|
202 |
</ul>
|
|
|
203 |
|
| 35396 |
amit |
204 |
<div class="termContainer ck-content" style="text-align:left">
|
| 34045 |
amit.gupta |
205 |
$offer.getTerms()
|
| 32203 |
amit.gupta |
206 |
</div>
|
|
|
207 |
</div>
|
|
|
208 |
</div>
|
| 35415 |
amit |
209 |
</div>
|
| 32203 |
amit.gupta |
210 |
|
|
|
211 |
<div class="modal-footer">
|
|
|
212 |
<button type="button" data-dismiss="modal" class="btn btn-default cancel-description">Dismiss</button>
|
| 35415 |
amit |
213 |
</div>
|