Subversion Repositories SmartDukaan

Rev

Rev 30414 | Rev 31380 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30414 Rev 31352
Line 1... Line 1...
1
<section>
1
<section>
2
    <div>
2
    <div>
3
        <table class="table table-border table-condensed table-bordered" id="brandWiseIncome">
3
        <table class="table table-border table-condensed table-bordered" id="brandWiseIncome">
4
 
-
 
5
            <thead class="row htable">
4
            <thead>
6
 
-
 
7
            <tr style="color:black;">
5
            <tr style="color:black;">
8
                <th>Model Name</th>
6
                <th>Model Name</th>
9
                <th>Purchase Qty</th>
7
                <th>Prch Qty</th>
10
                <th>Purchase Margin</th>
8
                <th>Prch Margin</th>
-
 
9
                <th>Booster Margin</th>
11
                <th>Sale Qty</th>
10
                <th>Sale Qty</th>
12
                <th>Sale Margin</th>
11
                <th>Sale Margin</th>
13
                <th>Pending Sale Magin</th>
12
                <th>Pending Margin</th>
-
 
13
                <th>Addl Margin</th>
14
                <th>Total Amount</th>
14
                <th>Total Amount</th>
15
            </tr>
15
            </tr>
16
            </thead>
16
            </thead>
17
            <tbody>
17
            <tbody>
18
                #foreach($modelWiseEntry in $modelNameMap.entrySet())
18
                #foreach($modelWiseEntry in $modelNameMap.entrySet())
Line 25... Line 25...
25
                        <td>$nf.format($modelWiseSchemeInMarginsMap.get($modelWiseEntry.getKey()).getAmount())</td>
25
                        <td>$nf.format($modelWiseSchemeInMarginsMap.get($modelWiseEntry.getKey()).getAmount())</td>
26
                    #else
26
                    #else
27
                        <td>--</td>
27
                        <td>--</td>
28
                        <td>--</td>
28
                        <td>--</td>
29
                    #end
29
                    #end
-
 
30
                    #if($additionalPurchasePayoutMap.containsKey($modelWiseEntry.getKey()))
-
 
31
                        <td>$nf.format($additionalPurchasePayoutMap.get($modelWiseEntry.getKey()))</td>
-
 
32
                    #else
-
 
33
                        <td>--</td>
-
 
34
                    #end
30
                    #if($modelWiseSchemeOutMarginsMap.containsKey($modelWiseEntry.getKey()))
35
                    #if($modelWiseSchemeOutMarginsMap.containsKey($modelWiseEntry.getKey()))
31
                        <td>$modelWiseSchemeOutMarginsMap.get($modelWiseEntry.getKey()).getQty()</td>
36
                        <td>$modelWiseSchemeOutMarginsMap.get($modelWiseEntry.getKey()).getQty()</td>
32
                        #if($modelWiseSchemeOutMarginsMap.get($modelWiseEntry.getKey()).getAmount() > 0)
37
                        #if($modelWiseSchemeOutMarginsMap.get($modelWiseEntry.getKey()).getAmount() > 0)
33
                            <td>$nf.format($modelWiseSchemeOutMarginsMap.get($modelWiseEntry.getKey()).getAmount())
38
                            <td>$nf.format($modelWiseSchemeOutMarginsMap.get($modelWiseEntry.getKey()).getAmount())
34
                                #if($categoryUpgradeBrandModelMap.containsKey($modelWiseEntry.getKey()))
39
                                #if($categoryUpgradeBrandModelMap.containsKey($modelWiseEntry.getKey()))
Line 48... Line 53...
48
                    #else
53
                    #else
49
                        <td>--</td>
54
                        <td>--</td>
50
                        <td>--</td>
55
                        <td>--</td>
51
                        <td>--</td>
56
                        <td>--</td>
52
                    #end
57
                    #end
-
 
58
                    #if($additionalSalePayoutMap.containsKey($modelWiseEntry.getKey()))
-
 
59
                        <td>$nf.format($additionalSalePayoutMap.get($modelWiseEntry.getKey()))</td>
-
 
60
                    #else
-
 
61
                        <td>--</td>
-
 
62
                    #end
53
 
63
 
54
                    #if($modelTotalIncomeMap.get($modelWiseEntry.getKey()))
64
                    #if($modelTotalIncomeMap.get($modelWiseEntry.getKey()))
55
                        <td>$nf.format($modelTotalIncomeMap.get($modelWiseEntry.getKey()))</td>
65
                        <td>$nf.format($modelTotalIncomeMap.get($modelWiseEntry.getKey()))</td>
56
                    #else
66
                    #else
57
                        <td>--</td>
67
                        <td>--</td>
58
                    #end
68
                    #end
59
                </tr>
69
                </tr>
60
                #end
70
                #end
61
            <tbody>
71
            </tbody>
62
 
72
 
63
            <tfoot>
73
            <tfoot>
-
 
74
            <tr class="model-sum-footer">
-
 
75
                <th>Total</th>
64
            <tr>
76
                <th></th>
65
                <td style="font-weight: bold;">Total</td>
77
                <th></th>
66
                <td>-</td>
78
                <th></th>
67
                <td id="brand-purchase-total"></td>
79
                <th></th>
68
                <td>-</td>
80
                <th></th>
69
                <td id="brand-sale-total"></td>
81
                <th></th>
70
                <td id="brand-pending-total"></td>
82
                <th></th>
71
                <td id="brand-sum-total"></td>
83
                <th></th>
72
 
-
 
73
            </tr>
84
            </tr>
74
            </tfoot>
85
            </tfoot>
75
 
-
 
76
 
-
 
77
        </table>
86
        </table>
78
 
-
 
79
    </div>
87
    </div>
80
 
-
 
81
</section>
88
</section>
82
 
89
 
83
<script type="text/javascript">
90
<script type="text/javascript">
84
 
91
 
85
    $(document).ready(function () {
92
    $(document).ready(function () {
Line 101... Line 108...
101
 
108
 
102
    });
109
    });
103
 
110
 
104
 
111
 
105
    function datatableSum(datatable) {
112
    function datatableSum(datatable) {
106
        var col_two_sum = datatable.column(2, {page: 'current'}).data().sum();
113
        for (let i = 1; i <= 8; i++) {
107
        $(datatable.column(2).footer()).html(numberToComma(Math.round(col_two_sum)));
-
 
108
 
-
 
109
        var col_four_sum = datatable.column(4, {page: 'current'}).data().sum();
-
 
110
        $(datatable.column(4).footer()).html(numberToComma(Math.round(col_four_sum)));
-
 
111
 
-
 
112
        var col_five_sum = datatable.column(5, {page: 'current'}).data().sum();
-
 
113
        $(datatable.column(5).footer()).html(numberToComma(Math.round(col_five_sum)));
-
 
114
 
-
 
115
        var col_six_sum = datatable.column(6, {page: 'current'}).data().sum();
114
            var col_sum = datatable.column(i, {page: 'current'}).data().sum();
116
        $(datatable.column(6).footer()).html(numberToComma(Math.round(col_six_sum)));
115
            $(datatable.column(i).footer()).html(numberToComma(Math.round(col_sum)));
117
 
116
        }
118
    }
117
    }
119
 
-
 
120
</script>
118
</script>
121
    
119
    
122
    
120
    
123
    
121
    
124
    
122