Subversion Repositories SmartDukaan

Rev

Rev 30466 | Rev 31215 | 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
 
30471 amit.gupta 49
        <thead>
50
        <tr>
28102 tejbeer 51
 
30471 amit.gupta 52
            <th rowspan=2>Model</th>
53
            <th rowspan=2>Type</th>
54
            <th rowspan=2>MRP</th>
55
            <th rowspan=2>MOP</th>
56
            <th rowspan=2>DP</th>
57
            #if($sellins.size() > 0)
58
                <th colspan="$sellins.size()" style="text-align: center">Sell In</th>
59
            #end
60
            #if($sellouts.size() > 0)
61
                <th colspan="$sellouts.size()" style="text-align: center
62
                ">Sell Out
63
                </th>
64
            #end
65
            #set($add=0)
66
            #if($upgradeOffer)
67
                <th rowspan=2>Upgrade Offer</th>
68
                #set($add=1)
69
            #end
70
            #foreach($offer in $offers)
71
                #set($fieldIndex=$velocityCount*2 + (4 + $allMargins.size() + $add))
72
                <th data-idx="$fieldIndex" colspan=2 data-offerid="$offer.getId()"><a href="javascript:void(0)"
73
                                                                                      class="mk_partner_view">$offer.getName()</a>
74
                </th>
75
            #end
76
            <th rowspan=2>Total Margin</th>
77
            <th rowspan=2>Net Landing Price</th>
78
            <th rowspan=2>MOP-DP</th>
79
            <th rowspan=2>Total Profit</th>
80
            <th rowspan=2>Net % Margin</th>
28102 tejbeer 81
 
30471 amit.gupta 82
        </tr>
83
        <tr>
84
            #foreach($marginName in $allMargins)
85
                <th>$marginName</th>
86
            #end
87
            #foreach($offer in $offers)
88
                <th>Target</th>
89
                <th>Margin</th>
90
            #end
91
        </tr>
92
        </thead>
93
        <tbody>
94
            #foreach($pc in $priceCircular )
95
            <tr>
96
                <td>$pc.getModelName() $pc.getModelNumber()</td>
97
                <td>$pc.getType()</td>
98
                <td class="currency">$pc.getMrp()</td>
99
                <td class="currency">$pc.getMop()</td>
100
                <td class="currency dp" data-value="$pc.getSellingPrice()">$pc.getSellingPrice()</td>
101
                #foreach($marginName in $allMargins)
102
                    <td class="currency">$pc.getByPayoutType($marginName)</td>
103
                #end
104
                #if($upgradeOffer)
105
                    <td class="currency">$pc.getUpgradeOffer()</td>
106
                #end
107
                #foreach($slabPayouts in $pc.getSlabPayouts())
108
                    #if($slabPayouts && $slabPayouts.size()>0)
109
                        <td>
110
                            <select class="mk_criteria_slab"
111
                                    data-value="$slabPayouts.entrySet().iterator().next().getValue()">
112
                                #foreach($payout in $slabPayouts.entrySet())
113
                                    <option data-value="$payout.getValue()"
114
                                            value="$payout.getKey()">$payout.getKey()
115
                                        onwards
116
                                    </option>
117
                                #end
118
                            </select>
119
                        </td>
120
                        <td class="currency">$slabPayouts.values().iterator().next()</td>
121
                    #else
122
                        <td> -</td>
123
                        <td> -</td>
124
                    #end
125
                #end
126
                <td class="currency totalmargin" data-value="$pc.getTotalScheme()">$pc.getTotalScheme()</td>
127
                <td class="currency netprice" data-value="$pc.getNetPrice()">$pc.getNetPrice()</td>
128
                <td class="currency">$pc.getMopdp()</td>
129
                <td class="currency totalprofit" data-value="$pc.getTotalProfit()">$pc.getTotalProfit()</td>
130
                <td class="netmargin">$pc.getNetMargin()</td>
28102 tejbeer 131
 
30471 amit.gupta 132
            </tr>
133
            #end
134
        </tbody>
135
    </table>
136
</div>
28102 tejbeer 137
 
30471 amit.gupta 138
<div class="offer-margin-container">
139
    <div class="modal  text-center" id="offerDescription">
140
        <div class="modal-dialog modal-lg modal-dialog-scrollable">
141
            <div class="modal-content">
29785 amit.gupta 142
            </div>
143
        </div>
30471 amit.gupta 144
    </div>
145
</div>
28139 tejbeer 146
</body>
28102 tejbeer 147
<script type="text/javascript">
30471 amit.gupta 148
    $(document).ready(function () {
149
        priceCircularTable = $('#circular-table').DataTable({
150
            "scrollX": true,
151
            "bPaginate": true,
152
            "bLengthChange": true,
153
            "bFilter": true,
154
            "bInfo": false,
155
            "bAutoWidth": false,
156
            "pageLength": 100
28102 tejbeer 157
 
30471 amit.gupta 158
        });
159
    });
160
    $('select.mk_criteria_slab').change(function () {
161
        debugger;
162
        oldSelectedValue = $(this).data("value");
163
        $(this).closest('td').next().html($(this).find("option:selected").data("value"));
164
        let diff = oldSelectedValue - $(this).find("option:selected").data("value");
165
        let $tr = $(this).closest('tr');
166
        let totalMargin = numberToComma($tr.find('.totalmargin').data('value') - diff);
167
            $tr.find('.totalmargin').html(totalMargin);
168
        let netLanding = $tr.find('.netprice').data('value') + diff;
169
        let netLandingString = numberToComma(netLanding);
170
            $tr.find('.netprice').html(netLandingString);
171
 
172
        let totalProfit = $tr.find('.totalprofit').data('value') - diff;
173
        let totalProfitString = numberToComma(totalProfit);
174
            $tr.find('.totalprofit').html(totalProfitString);
175
 
176
        ##let rouoff = totalProfit / (netLanding / 1.18) * 100;
177
        let rouoff = totalProfit / ($tr.find('.dp').data('value') / 1.18) * 100;
178
        let roundOff = Math.round(rouoff * 100.0) / 100.0;
179
            $tr.find('.netmargin').html(roundOff);
180
    });
28102 tejbeer 181
</script>