| 30055 |
manish |
1 |
|
| 30225 |
tejbeer |
2 |
<section>
|
|
|
3 |
<div>
|
|
|
4 |
<table class="table table-border table-condensed table-bordered" id="brandWiseIncome">
|
| 30055 |
manish |
5 |
|
|
|
6 |
<thead class="row htable">
|
|
|
7 |
|
|
|
8 |
<tr style="color:black;">
|
| 30225 |
tejbeer |
9 |
<th>Model Name</th>
|
|
|
10 |
<th>Purchase Qty</th>
|
|
|
11 |
<th>Purchase Margin</th>
|
|
|
12 |
<th>Sale Qty</th>
|
|
|
13 |
<th>Sale Margin</th>
|
|
|
14 |
<th>Pending Sale Magin</th>
|
|
|
15 |
<th>Total Amount</th>
|
| 30055 |
manish |
16 |
</tr>
|
| 30225 |
tejbeer |
17 |
</thead>
|
| 30055 |
manish |
18 |
<tbody>
|
|
|
19 |
#foreach($modelWiseEntry in $modelWiseMap.entrySet())
|
|
|
20 |
|
|
|
21 |
#if($modelWiseEntry.getValue().getCatalogItemId())
|
|
|
22 |
<tr class="imei_wise_income" data-catalogitemid="$modelWiseEntry.getValue().getCatalogItemId()" data-month="$month">
|
|
|
23 |
#else
|
|
|
24 |
<tr class="imei_wise_income" data-catalogitemid="$purchaseWiseMap.get($modelWiseEntry.getKey()).getCatalogItemId()" data-month="$month">
|
|
|
25 |
#end
|
|
|
26 |
|
|
|
27 |
#if($modelWiseEntry.getValue().getModelName())
|
|
|
28 |
<td>$modelWiseEntry.getValue().getModelName() $modelWiseEntry.getKey()</td>
|
|
|
29 |
#else
|
|
|
30 |
<td>$modelWiseEntry.getKey()</td>
|
|
|
31 |
#end
|
|
|
32 |
|
|
|
33 |
#if($purchaseWiseMap.get($modelWiseEntry.getKey()).getQty())
|
|
|
34 |
<td>$purchaseWiseMap.get($modelWiseEntry.getKey()).getQty()</td>
|
|
|
35 |
#else
|
|
|
36 |
<td>--</td>
|
|
|
37 |
#end
|
|
|
38 |
#if($purchaseWiseMap.get($modelWiseEntry.getKey()).getAmount())
|
|
|
39 |
<td>$nf.format($purchaseWiseMap.get($modelWiseEntry.getKey()).getAmount())</td>
|
|
|
40 |
#else
|
|
|
41 |
<td>--</td>
|
|
|
42 |
#end
|
|
|
43 |
|
|
|
44 |
#if($modelWiseEntry.getValue().getQty() )
|
|
|
45 |
<td>$modelWiseEntry.getValue().getQty()</td>
|
|
|
46 |
#else
|
|
|
47 |
<td>--</td>
|
|
|
48 |
#end
|
|
|
49 |
|
|
|
50 |
#if($categoryUpradeBrandModelMap.get($modelWiseEntry.getKey()))
|
|
|
51 |
|
|
|
52 |
#if($modelWiseEntry.getValue().getAmount())
|
|
|
53 |
<td>$nf.format($modelWiseEntry.getValue().getAmount()) <i class='far fa-arrow-alt-circle-up' style="color: green;" title="$nf.format($categoryUpradeBrandModelMap.get($modelWiseEntry.getKey())) Category Upgrade Additional Margin."></i></td>
|
|
|
54 |
#else
|
|
|
55 |
<td> -- <i class='far fa-arrow-alt-circle-up' style="color: green;" title="$nf.format($categoryUpradeBrandModelMap.get($modelWiseEntry.getKey())) Category Upgrade Additional Margin."></i></td>
|
|
|
56 |
#end
|
|
|
57 |
#else
|
|
|
58 |
#if($modelWiseEntry.getValue().getAmount())
|
|
|
59 |
<td>$nf.format($modelWiseEntry.getValue().getAmount()) </td>
|
|
|
60 |
#else
|
|
|
61 |
<td>--</td>
|
|
|
62 |
#end
|
|
|
63 |
|
|
|
64 |
#end
|
|
|
65 |
|
| 30225 |
tejbeer |
66 |
#if($modelWiseEntry.getValue().getPendingSaleAmount())
|
|
|
67 |
<td>$modelWiseEntry.getValue().getPendingSaleAmount()</td>
|
|
|
68 |
#else
|
|
|
69 |
<td>--</td>
|
|
|
70 |
#end
|
|
|
71 |
|
| 30055 |
manish |
72 |
#if($modelWiseTotalAmount.get($modelWiseEntry.getKey()))
|
|
|
73 |
<td>$nf.format($modelWiseTotalAmount.get($modelWiseEntry.getKey()))</td>
|
|
|
74 |
#else
|
|
|
75 |
<td>--</td>
|
|
|
76 |
#end
|
|
|
77 |
|
|
|
78 |
</tr>
|
|
|
79 |
#end
|
| 30225 |
tejbeer |
80 |
|
|
|
81 |
<tbody>
|
|
|
82 |
|
|
|
83 |
<tfoot>
|
|
|
84 |
<tr>
|
|
|
85 |
<td style="font-weight: bold;">Total</td>
|
|
|
86 |
<td>-</td>
|
|
|
87 |
<td id= "brand-purchase-total"></td>
|
|
|
88 |
<td>-</td>
|
|
|
89 |
<td id = "brand-sale-total"> </td>
|
|
|
90 |
<td id = "brand-pending-total"></td>
|
|
|
91 |
|
|
|
92 |
<td id ="brand-sum-total"></td>
|
|
|
93 |
|
|
|
94 |
</tr>
|
|
|
95 |
</tfoot>
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
</table>
|
|
|
99 |
|
|
|
100 |
</div>
|
|
|
101 |
|
|
|
102 |
</section>
|
|
|
103 |
|
|
|
104 |
<script type="text/javascript">
|
| 30055 |
manish |
105 |
|
| 30225 |
tejbeer |
106 |
$(document).ready(function() {
|
|
|
107 |
var table = $('#brandWiseIncome').DataTable(
|
| 30055 |
manish |
108 |
{
|
|
|
109 |
"bPaginate": true,
|
|
|
110 |
"bLengthChange": true,
|
|
|
111 |
"bFilter": true,
|
|
|
112 |
"bInfo": false,
|
|
|
113 |
"bAutoWidth": false,
|
|
|
114 |
"scrollX": true,
|
| 30225 |
tejbeer |
115 |
|
|
|
116 |
});
|
|
|
117 |
|
|
|
118 |
datatableSum();
|
|
|
119 |
table.on('search.dt', function () {
|
|
|
120 |
console.log('Currently applied global search: ' + table.search());
|
|
|
121 |
datatableSum();
|
|
|
122 |
});
|
|
|
123 |
|
|
|
124 |
});
|
|
|
125 |
|
| 30055 |
manish |
126 |
|
| 30225 |
tejbeer |
127 |
function datatableSum() {
|
|
|
128 |
|
|
|
129 |
var col_two_sum = $('#brandWiseIncome').DataTable().column(2,{page:'current'}).data().sum();
|
|
|
130 |
$('#brand-purchase-total').html(col_two_sum);
|
|
|
131 |
|
|
|
132 |
var col_four_sum = $('#brandWiseIncome').DataTable().column(4,{page:'current'}).data().sum();
|
|
|
133 |
console.log(col_four_sum)
|
|
|
134 |
$('#brand-sale-total').html(col_four_sum);
|
|
|
135 |
|
|
|
136 |
var col_five_sum = $('#brandWiseIncome').DataTable().column(5,{page:'current'}).data().sum();
|
|
|
137 |
$('#brand-pending-total').html(col_five_sum);
|
|
|
138 |
|
|
|
139 |
|
|
|
140 |
var col_six_sum = $('#brandWiseIncome').DataTable().column(6,{page:'current'}).data().sum();
|
|
|
141 |
console.log(col_six_sum)
|
|
|
142 |
$('#brand-sum-total').html(col_six_sum);
|
|
|
143 |
|
|
|
144 |
}
|
| 30055 |
manish |
145 |
|
|
|
146 |
|
| 30225 |
tejbeer |
147 |
</script>
|
|
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
|
151 |
|
|
|
152 |
|