Subversion Repositories SmartDukaan

Rev

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