Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
28005 tejbeer 1
<div class="row">
2
 
3
 
4
	#if(!$inStock.isEmpty())
5
	<div class="col-lg-6">
6
		<table
7
			class="table table-striped table-advance table-hover partner-planning-details">
8
			<thead>
9
				<tr>
28020 tejbeer 10
					<th>Warehouse</th>
28005 tejbeer 11
					<th>Partner Name</th>
12
					<th>Stock</th>
13
					<th>Sale</th>
14
 
15
				</tr>
16
			</thead>
17
			<tbody>
18
				#foreach($keyvalue in $inStock.entrySet())
19
				<tr>
28020 tejbeer 20
					<td>$warehouseMap.get($keyvalue.getValue().getWarehouseId())</td>
28005 tejbeer 21
					<td>$customRetailers.get($keyvalue.getKey()).getBusinessName()</td>
28020 tejbeer 22
					<td>$keyvalue.getValue().getQty()</td>
28005 tejbeer 23
					#if($fofoSale.get($keyvalue.getKey()))
28020 tejbeer 24
					<td>$fofoSale.get($keyvalue.getKey()).getQty()</td> #else
28005 tejbeer 25
					<td>0</td> #end
26
				</tr>
27
				#end
28
 
29
			</tbody>
30
		</table>
31
	</div>
32
	#else
33
 
34
	<div class="col-lg-6">
35
		<table
36
			class="table table-striped table-advance table-hover partner-planning-details">
37
			<thead>
38
				<tr>
28020 tejbeer 39
					<th>Warehouse</th>
28005 tejbeer 40
					<th>Partner Name</th>
41
					<th>Item</th>
42
					<th>Stock</th>
43
					<th>Sale</th>
44
 
45
				</tr>
46
			</thead>
47
			<tbody>
48
				#foreach($keyvalue in $inStockItemMap.entrySet())
49
				<tr>
28020 tejbeer 50
					<td>$warehouseMap.get($keyvalue.getValue().getWarehouseId())</td>
51
 
28005 tejbeer 52
					<td>$customRetailers.get($keyvalue.getKey().getFofoId()).getBusinessName()</td>
53
					<td>$keyvalue.getValue().getBrand()
54
						$keyvalue.getValue().getModelName()
55
						$keyvalue.getValue().getModelNumber()</td>
56
					<td>$keyvalue.getValue().getQty()</td>
57
					#if($fofoSaleItem.get($keyvalue.getKey()))
58
					<td>$fofoSaleItem.get($keyvalue.getKey()).getQty()</td> #else
59
					<td>0</td> #end
60
				</tr>
61
				#end
62
 
63
			</tbody>
64
		</table>
65
	</div>
66
 
67
	#end
68
</div>
69
 
70
 
71
<script type="text/javascript">
28020 tejbeer 72
	$(document).ready(
73
			function() {
74
 
75
				$('.partner-planning-details thead tr').clone(true).appendTo(
76
						'.partner-planning-details thead');
77
				$('.partner-planning-details thead tr:eq(1) th').each(
78
						function(i) {
79
							var title = $(this).text();
80
							$(this).html(
81
									'<input type="text" style = "width:60%;" placeholder="Search '
82
											+ title + '" />');
83
 
84
							$('input', this).on('keyup change', function() {
85
								if (table.column(i).search() !== this.value) {
86
									table.column(i).search(this.value).draw();
87
								}
88
							});
89
						});
90
				var table = $('.partner-planning-details').DataTable({
91
 
92
					"lengthMenu" : [ 10, 25, 50, 75, 100, 250 ],
93
					"pageLength" : 250,
94
				});
95
			});
28005 tejbeer 96
</script>