Subversion Repositories SmartDukaan

Rev

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

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