Subversion Repositories SmartDukaan

Rev

Rev 30142 | Rev 30230 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
28102 tejbeer 1
 
28117 tejbeer 2
<style>
28134 tejbeer 3
.table {
4
	background-image:
28136 tejbeer 5
		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>");
28117 tejbeer 6
}
29845 amit.gupta 7
.highlight-br {
8
 border-right:1px solid #aaa !important;
9
}
28117 tejbeer 10
</style>
28134 tejbeer 11
 
12
<script type="text/javascript">
13
	$(document).ready(function() {
28139 tejbeer 14
 
29960 tejbeer 15
 
28134 tejbeer 16
	});
17
</script>
28109 tejbeer 18
 
28139 tejbeer 19
<body>
20
	<div class="col-lg-12">
21
		<h4>Note</h4>
22
		<b>Hygiene Payout</b> - Hygiene Payout calculation is subject to sales
23
		hygiene including customer & other details entered in the system, pl
24
		refer to hygiene meter in your Dashboard.<br> <b>Tertiary
25
			Payout</b> - Tertiary Payout calculation is subject to activation of the
26
		handset against the sales entered in system. <br> <b>Investment
27
			Payout</b> - Investment Payout calculation is subject to maintenance of
28
		90% of minimum Investments for minimum 12 days in a month as per below
29
		slabs
30
		<ul>
31
			<li>a) 2% in case minimum investment is 90% or above for 12 days
32
				or more in a month</li>
33
			<li>b) 1% in case of minimum investment is 90% or above for 8-11
34
				days in a month</li>
35
			<li>c) No payout in case of minimum investment is less than 8
36
				days in a month to change at the discretion of SmartDukaan.</li>
37
		</ul>
38
		<b>Below Price Structure is subject to change at the discretion of
39
			SmartDukaan.</b>
28102 tejbeer 40
 
28139 tejbeer 41
	</div>
28102 tejbeer 42
 
28139 tejbeer 43
	<div class="col-lg-12">
44
		<table class="table table-border table-condensed table-bordered"
45
			id="circular-table">
28102 tejbeer 46
 
28139 tejbeer 47
			<thead>
48
				<tr>
28102 tejbeer 49
 
28139 tejbeer 50
					<th rowspan=2>Model</th>
51
					<th rowspan=2>Type</th>
52
					<th rowspan=2>MRP</th>
53
					<th rowspan=2>MOP</th>
54
					<th rowspan=2>DP</th>
29653 tejbeer 55
					<th colspan=3 style="text-align: center">Sell In Margin</th>
28139 tejbeer 56
					<th colspan=4 style="text-align: center">Sell Out Margin</th>
57
					<th rowspan=2>Activation Payout</th>
29846 amit.gupta 58
					#set($add=0)
29845 amit.gupta 59
					#if($upgradeOffer)
60
					<th rowspan=2>Upgrade Offer</th>
29846 amit.gupta 61
					#set($add=1)
29845 amit.gupta 62
					#end
29785 amit.gupta 63
					#foreach($offer in $offers)
29889 amit.gupta 64
						#set($fieldIndex=$velocityCount*2 + (11 + $add))
29845 amit.gupta 65
						<th data-idx="$fieldIndex" colspan=2 data-offerid="$offer.getId()"><a href="javascript:void(0)" class="mk_partner_view">$offer.getName()</a></th>
29785 amit.gupta 66
					#end
28139 tejbeer 67
					<th rowspan=2>Total Margin</th>
68
					<th rowspan=2>Net Landing Price</th>
69
					<th rowspan=2>MOP-DP</th>
70
					<th rowspan=2>Total Profit</th>
71
					<th rowspan=2>Net % Margin</th>
28102 tejbeer 72
 
28139 tejbeer 73
				</tr>
28102 tejbeer 74
 
28139 tejbeer 75
				<tr>
28102 tejbeer 76
 
77
 
28139 tejbeer 78
					<th>Base Payout</th>
79
					<th>Cash Discount</th>
29653 tejbeer 80
					<th>Upfront Margin</th>
28139 tejbeer 81
					<th>Tertiary Payout</th>
82
					<th>Hygiene Payout</th>
83
					<th>Category Payout</th>
84
					<th>Investment Payout</th>
29785 amit.gupta 85
					#foreach($offer in $offers)
86
						<th>Target</th>
87
						<th>Margin</th>
88
					#end
28102 tejbeer 89
 
90
 
91
 
28139 tejbeer 92
				</tr>
28102 tejbeer 93
 
94
 
95
 
28139 tejbeer 96
			</thead>
97
			<tbody>
98
				#foreach($pc in $priceCircular )
99
				<tr>
30142 amit.gupta 100
					<td>$pc.getModelName() $pc.getModelNumber()</td>
28139 tejbeer 101
					<td>$pc.getType()</td>
102
					<td class="currency">$pc.getMrp()</td>
29848 amit.gupta 103
					<td class="currency">$pc.getMop()</td>
104
					<td class="currency dp" data-value="$pc.getSellingPrice()">$pc.getSellingPrice()</td>
28139 tejbeer 105
					<td class="currency">$pc.getBasePayout()</td>
106
					<td class="currency">$pc.getCashDiscount()</td>
29653 tejbeer 107
					<td class="currency">$pc.getUpfrontMargin()</td>
28139 tejbeer 108
					<td class="currency">$pc.getTertiaryPayout()</td>
109
					<td class="currency">$pc.getHygienePayout()</td>
110
					<td class="currency">$pc.getCategoryPayout()</td>
111
					<td class="currency">$pc.getInvestmentPayout()</td>
112
					<td class="currency">$pc.getModelSpecfic()</td>
29845 amit.gupta 113
					#if($upgradeOffer)
30206 amit.gupta 114
						<td class="currency">$pc.getUpgradeOffer()</td>
29845 amit.gupta 115
					#end
30206 amit.gupta 116
					#foreach($slabPayouts in $pc.getSlabPayouts())
117
						#if($slabPayouts && $slabPayouts.size()>0)
118
							<td>
119
								<select class="mk_criteria_slab"
120
										data-value="$slabPayouts.entrySet().iterator().next().getValue()">
121
									#foreach($payout in $slabPayouts.entrySet())
122
										<option data-value="$payout.getValue()"
123
												value="$payout.getKey()">$payout.getKey()
124
											onwards
125
										</option>
126
									#end
127
								</select>
128
							</td>
129
							<td class="currency">$slabPayout.values().iterator().next()</td>
130
						#else
131
							<td> -</td>
132
							<td> -</td>
29785 amit.gupta 133
					#end
134
					#end
29846 amit.gupta 135
					<td class="currency totalmargin" data-value="$pc.getTotalScheme()">$pc.getTotalScheme()</td>
136
					<td class="currency netprice" data-value="$pc.getNetPrice()">$pc.getNetPrice()</td>
28139 tejbeer 137
					<td class="currency">$pc.getMopdp()</td>
29846 amit.gupta 138
					<td class="currency totalprofit" data-value="$pc.getTotalProfit()">$pc.getTotalProfit()</td>
139
					<td class="netmargin">$pc.getNetMargin()</td>
28102 tejbeer 140
 
28139 tejbeer 141
				</tr>
142
				#end
143
			</tbody>
144
		</table>
145
	</div>
29785 amit.gupta 146
 
147
			<div class="offer-margin-container">
148
            <div class="modal  text-center" id="offerDescription">
149
                <div class="modal-dialog modal-lg modal-dialog-scrollable">
150
                    <div class="modal-content">
151
                    </div>
152
                </div>
153
            </div>
154
        </div>
28139 tejbeer 155
</body>
28102 tejbeer 156
<script type="text/javascript">
157
	$(document).ready(function() {
29785 amit.gupta 158
		priceCircularTable = $('#circular-table').DataTable({
159
			"scrollX": true,
28102 tejbeer 160
			"bPaginate" : true,
161
			"bLengthChange" : true,
162
			"bFilter" : true,
163
			"bInfo" : false,
164
			"bAutoWidth" : false,
29889 amit.gupta 165
			"pageLength": 100
28102 tejbeer 166
 
29785 amit.gupta 167
		});
28102 tejbeer 168
	});
29846 amit.gupta 169
	$('select.mk_criteria_slab').change(function() {
170
		debugger;
171
		oldSelectedValue = $(this).data("value");
172
		$(this).closest('td').next().html($(this).find("option:selected").data("value"));
173
		let diff=oldSelectedValue - $(this).find("option:selected").data("value");
174
		let $tr = $(this).closest('tr');
175
		let totalMargin = numberToComma($tr.find('.totalmargin').data('value') - diff);
176
		$tr.find('.totalmargin').html(totalMargin);
177
		let netLanding =  $tr.find('.netprice').data('value') + diff;
178
		let netLandingString = numberToComma(netLanding);
179
		$tr.find('.netprice').html(netLandingString);
180
 
181
		let totalProfit =  $tr.find('.totalprofit').data('value') - diff;
182
		let totalProfitString =  numberToComma(totalProfit);
29847 amit.gupta 183
		$tr.find('.totalprofit').html(totalProfitString);
29846 amit.gupta 184
 
185
		##let rouoff = totalProfit / (netLanding / 1.18) * 100;
29847 amit.gupta 186
		let rouoff = totalProfit / ($tr.find('.dp').data('value') / 1.18) * 100;
29846 amit.gupta 187
		let roundOff = Math.round(rouoff * 100.0) / 100.0;
188
		$tr.find('.netmargin').html(roundOff);
189
	});
28102 tejbeer 190
</script>