| 27866 |
tejbeer |
1 |
<link href="https://cdn.datatables.net/fixedcolumns/3.3.0/css/fixedColumns.bootstrap.css" rel="stylesheet"/>
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
<section class="wrapper">
|
|
|
6 |
<div class="row">
|
|
|
7 |
<div class="col-lg-12">
|
|
|
8 |
<h3 class="page-header"><i class="icon_document_alt"></i>Details</h3>
|
|
|
9 |
<ol class="breadcrumb">
|
|
|
10 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
11 |
<li><i class="icon_document_alt"></i>Warehouse Wise Secondary Billing</li>
|
|
|
12 |
</ol>
|
|
|
13 |
</div>
|
|
|
14 |
</div>
|
|
|
15 |
|
|
|
16 |
<div class = "row" >
|
|
|
17 |
|
|
|
18 |
<div class="col-lg-12">
|
|
|
19 |
<table id="billingBrandItem" class="table table-striped table-advance table-hover">
|
|
|
20 |
<thead>
|
|
|
21 |
<tr>
|
|
|
22 |
<th rowspan="2">Warehouse</th>
|
|
|
23 |
<th rowspan="2">Brand</th>
|
|
|
24 |
<th rowspan="2">Total</th>
|
|
|
25 |
#foreach($dr in $dateRange)
|
|
|
26 |
|
|
|
27 |
<th colspan= 2> $dr.format($dateMonthFormatter) </th>
|
|
|
28 |
#end
|
|
|
29 |
</tr>
|
|
|
30 |
<tr>
|
|
|
31 |
#foreach($dr in $dateRange)
|
|
|
32 |
<th> Qty </th>
|
|
|
33 |
<th> Val </th>
|
|
|
34 |
#end
|
|
|
35 |
</tr>
|
|
|
36 |
</thead>
|
|
|
37 |
<tbody>
|
|
|
38 |
|
|
|
39 |
#foreach($bwo in $brandWarehouseOrderMap.entrySet())
|
|
|
40 |
<tr>
|
|
|
41 |
<td> $warehouseMap.get($bwo.getKey().getWarehouseId())</td>
|
|
|
42 |
<td> $bwo.getKey().getBrand()</td>
|
|
|
43 |
<td class="currency"> $bwo.getKey().getTotal()</td>
|
|
|
44 |
#foreach($dr in $dateRange)
|
|
|
45 |
#if($bwo.getValue().get($dr))
|
|
|
46 |
<td data-date = "$dr" data-brand = "$bwo.getKey().getBrand()" data-warehouseid = "$bwo.getKey().getWarehouseId()"> $bwo.getValue().get($dr).getQty()</td>
|
| 27868 |
tejbeer |
47 |
<td data-date = "$dr" data-brand = "$bwo.getKey().getBrand()" data-warehouseid = "$bwo.getKey().getWarehouseId()"> $bwo.getValue().get($dr).getValue() </td>
|
| 27866 |
tejbeer |
48 |
#else
|
|
|
49 |
<td> - </td>
|
|
|
50 |
<td> - </td>
|
|
|
51 |
#end
|
|
|
52 |
#end
|
|
|
53 |
</tr>
|
|
|
54 |
#end
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
</tbody>
|
|
|
58 |
</table>
|
|
|
59 |
</div>
|
|
|
60 |
</div>
|
|
|
61 |
|
|
|
62 |
<div class="item-wise-container">
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
</div>
|
|
|
66 |
|
|
|
67 |
</section>
|
|
|
68 |
|
|
|
69 |
<script type="text/javascript">
|
|
|
70 |
var table = $('#billingBrandItem').DataTable( {
|
|
|
71 |
"scrollX": true,
|
|
|
72 |
"pageLength": 25,
|
|
|
73 |
"fixedColumns": {
|
|
|
74 |
leftColumns: 3
|
|
|
75 |
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
} );
|
|
|
79 |
|
|
|
80 |
$('#billingBrandItem').on('click','tbody td',function(e){
|
|
|
81 |
var cell_value = table.cell(this).data();
|
|
|
82 |
console.log(cell_value);
|
|
|
83 |
|
|
|
84 |
if(cell_value == "-"){
|
|
|
85 |
|
|
|
86 |
return false;
|
|
|
87 |
}
|
|
|
88 |
var dataDate = $(this).data('date');
|
|
|
89 |
var brand = $(this).data('brand');
|
|
|
90 |
var warehouseId = $(this).data('warehouseid');
|
|
|
91 |
console.log(cell_value);
|
|
|
92 |
console.log(dataDate);
|
|
|
93 |
console.log(warehouseId);
|
|
|
94 |
|
|
|
95 |
doGetAjaxRequestHandler(context + "/getSecondaryBillingItemByBrand?warehouseId="
|
|
|
96 |
+ warehouseId+ "&brand="+brand + "&date="+dataDate, function(response) {
|
|
|
97 |
|
|
|
98 |
$('.' + "item-wise-container").html(response);
|
|
|
99 |
console.log(response)
|
|
|
100 |
});
|
|
|
101 |
|
|
|
102 |
});
|
|
|
103 |
</script>
|