Subversion Repositories SmartDukaan

Rev

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