Subversion Repositories SmartDukaan

Rev

Rev 30012 | Rev 30206 | 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)
114
					<td class="currency">$pc.getUpgradeOffer()</td>
115
					#end
29785 amit.gupta 116
					#foreach($slabPayout in $pc.getSlabPayouts())
30012 amit.gupta 117
					#if($slabPayout && $slabPayout.size()>0)
118
						<td>
119
							<select class="mk_criteria_slab"
120
									data-value="$slabPayout.entrySet().iterator().next().getValue()">
121
								#foreach($payout in $slabPayout.entrySet())
122
									<option data-value="$payout.getValue()" value="$payout.getKey()">$payout.getKey()
123
										onwards
124
									</option>
125
								#end
126
							</select>
127
						</td>
128
						<td class="currency">$slabPayout.values().iterator().next()</td>
29785 amit.gupta 129
					#else
30012 amit.gupta 130
						<td> -</td>
29785 amit.gupta 131
					<td> - </td>
132
					#end
133
					#end
29846 amit.gupta 134
					<td class="currency totalmargin" data-value="$pc.getTotalScheme()">$pc.getTotalScheme()</td>
135
					<td class="currency netprice" data-value="$pc.getNetPrice()">$pc.getNetPrice()</td>
28139 tejbeer 136
					<td class="currency">$pc.getMopdp()</td>
29846 amit.gupta 137
					<td class="currency totalprofit" data-value="$pc.getTotalProfit()">$pc.getTotalProfit()</td>
138
					<td class="netmargin">$pc.getNetMargin()</td>
28102 tejbeer 139
 
28139 tejbeer 140
				</tr>
141
				#end
142
			</tbody>
143
		</table>
144
	</div>
29785 amit.gupta 145
 
146
			<div class="offer-margin-container">
147
            <div class="modal  text-center" id="offerDescription">
148
                <div class="modal-dialog modal-lg modal-dialog-scrollable">
149
                    <div class="modal-content">
150
                    </div>
151
                </div>
152
            </div>
153
        </div>
28139 tejbeer 154
</body>
28102 tejbeer 155
<script type="text/javascript">
156
	$(document).ready(function() {
29785 amit.gupta 157
		priceCircularTable = $('#circular-table').DataTable({
158
			"scrollX": true,
28102 tejbeer 159
			"bPaginate" : true,
160
			"bLengthChange" : true,
161
			"bFilter" : true,
162
			"bInfo" : false,
163
			"bAutoWidth" : false,
29889 amit.gupta 164
			"pageLength": 100
28102 tejbeer 165
 
29785 amit.gupta 166
		});
28102 tejbeer 167
	});
29846 amit.gupta 168
	$('select.mk_criteria_slab').change(function() {
169
		debugger;
170
		oldSelectedValue = $(this).data("value");
171
		$(this).closest('td').next().html($(this).find("option:selected").data("value"));
172
		let diff=oldSelectedValue - $(this).find("option:selected").data("value");
173
		let $tr = $(this).closest('tr');
174
		let totalMargin = numberToComma($tr.find('.totalmargin').data('value') - diff);
175
		$tr.find('.totalmargin').html(totalMargin);
176
		let netLanding =  $tr.find('.netprice').data('value') + diff;
177
		let netLandingString = numberToComma(netLanding);
178
		$tr.find('.netprice').html(netLandingString);
179
 
180
		let totalProfit =  $tr.find('.totalprofit').data('value') - diff;
181
		let totalProfitString =  numberToComma(totalProfit);
29847 amit.gupta 182
		$tr.find('.totalprofit').html(totalProfitString);
29846 amit.gupta 183
 
184
		##let rouoff = totalProfit / (netLanding / 1.18) * 100;
29847 amit.gupta 185
		let rouoff = totalProfit / ($tr.find('.dp').data('value') / 1.18) * 100;
29846 amit.gupta 186
		let roundOff = Math.round(rouoff * 100.0) / 100.0;
187
		$tr.find('.netmargin').html(roundOff);
188
	});
28102 tejbeer 189
</script>