Subversion Repositories SmartDukaan

Rev

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

Rev 28036 Rev 28053
Line 6... Line 6...
6
		<table
6
		<table
7
			class="table table-striped table-advance table-hover partner-planning-details">
7
			class="table table-striped table-advance table-hover partner-planning-details">
8
			<thead>
8
			<thead>
9
				<tr>
9
				<tr>
10
					<th>Warehouse</th>
10
					<th>Warehouse</th>
-
 
11
					<th>Category</th>
-
 
12
 
11
					<th>Partner Name</th>
13
					<th>Partner Name</th>
12
					<th>Stock</th>
14
					<th>Stock</th>
13
					<th>Sale</th>
15
					<th>Sale</th>
-
 
16
					<th>Warehouse Stock</th>
14
 
17
 
15
				</tr>
18
				</tr>
16
			</thead>
19
			</thead>
17
			<tbody>
20
			<tbody>
18
				#foreach($keyvalue in $inStock.entrySet())
21
				#foreach($keyvalue in $inStock.entrySet())
19
				<tr>
22
				<tr>
20
					<td>$warehouseMap.get($keyvalue.getValue().getWarehouseId())</td>
23
					<td>$warehouseMap.get($keyvalue.getValue().getWarehouseId())</td>
-
 
24
					<td>$fofoIdPartnerTypeMap.get($keyvalue.getKey())</td>
-
 
25
 
21
					<td>$customRetailers.get($keyvalue.getKey()).getBusinessName()</td>
26
					<td>$customRetailers.get($keyvalue.getKey()).getBusinessName()</td>
22
					<td class="instockItem"
27
					<td class="instockItem"
23
						data-fofoid="$keyvalue.getValue().getFofoId()" data-toggle="modal"
28
						data-fofoid="$keyvalue.getValue().getFofoId()" data-toggle="modal"
24
						data-target="#inStockItemModel">$keyvalue.getValue().getQty()</td>
29
						data-target="#inStockItemModel">$keyvalue.getValue().getQty()</td>
25
					#if($fofoSale.get($keyvalue.getKey()))
30
					#if($fofoSale.get($keyvalue.getKey()))
26
					<td class="inSaleItem"
31
					<td class="inSaleItem"
27
						data-fofoid="$keyvalue.getValue().getFofoId()" data-toggle="modal"
32
						data-fofoid="$keyvalue.getValue().getFofoId()" data-toggle="modal"
28
						data-target="#inSaleItemModel">$fofoSale.get($keyvalue.getKey()).getQty()</td>
33
						data-target="#inSaleItemModel">$fofoSale.get($keyvalue.getKey()).getQty()</td>
29
					#else
34
					#else
30
					<td>0</td> #end
35
					<td>0</td> #end
-
 
36
					#if($warehouseStocks.get($keyvalue.getValue().getWarehouseId()))
-
 
37
					<td class="warehouseStockItem"
-
 
38
						data-warehouseid="$keyvalue.getValue().getWarehouseId()"
-
 
39
						data-catalogid="$keyvalue.getValue().getWarehouseId()"
-
 
40
						data-toggle="modal" data-target="#warehouseStockItemModel">$warehouseStocks.get($keyvalue.getValue().getWarehouseId()).getQty()</td>
-
 
41
					#else
-
 
42
					<td>0</td> #end
-
 
43
 
-
 
44
 
31
				</tr>
45
				</tr>
32
				#end
46
				#end
33
 
47
 
34
			</tbody>
48
			</tbody>
35
		</table>
49
		</table>
Line 40... Line 54...
40
		<table
54
		<table
41
			class="table table-striped table-advance table-hover partner-planning-details">
55
			class="table table-striped table-advance table-hover partner-planning-details">
42
			<thead>
56
			<thead>
43
				<tr>
57
				<tr>
44
					<th>Warehouse</th>
58
					<th>Warehouse</th>
-
 
59
					<th>Category</th>
-
 
60
 
45
					<th>Partner Name</th>
61
					<th>Partner Name</th>
46
					<th>Item</th>
62
					<th>Item</th>
47
					<th>Stock</th>
63
					<th>Stock</th>
48
					<th>Sale</th>
64
					<th>Sale</th>
-
 
65
					<th>Warehouse Stock</th>
49
 
66
 
50
				</tr>
67
				</tr>
51
			</thead>
68
			</thead>
52
			<tbody>
69
			<tbody>
53
				#foreach($keyvalue in $inStockItemMap.entrySet())
70
				#foreach($keyvalue in $inStockItemMap.entrySet())
54
				<tr>
71
				<tr>
55
					<td>$warehouseMap.get($keyvalue.getValue().getWarehouseId())</td>
72
					<td>$warehouseMap.get($keyvalue.getValue().getWarehouseId())</td>
-
 
73
					<td>$fofoIdPartnerTypeMap.get($keyvalue.getKey().getFofoId())</td>
56
 
74
 
57
					<td>$customRetailers.get($keyvalue.getKey().getFofoId()).getBusinessName()</td>
75
					<td>$customRetailers.get($keyvalue.getKey().getFofoId()).getBusinessName()</td>
58
					<td>$keyvalue.getValue().getBrand()
76
					<td>$keyvalue.getValue().getBrand()
59
						$keyvalue.getValue().getModelName()
77
						$keyvalue.getValue().getModelName()
60
						$keyvalue.getValue().getModelNumber()</td>
78
						$keyvalue.getValue().getModelNumber()</td>
61
					<td>$keyvalue.getValue().getQty()</td>
79
					<td>$keyvalue.getValue().getQty()</td>
62
					#if($fofoSaleItem.get($keyvalue.getKey()))
80
					#if($fofoSaleItem.get($keyvalue.getKey()))
63
					<td>$fofoSaleItem.get($keyvalue.getKey()).getQty()</td> #else
81
					<td>$fofoSaleItem.get($keyvalue.getKey()).getQty()</td> #else
64
					<td>0</td> #end
82
					<td>0</td> #end
-
 
83
 
-
 
84
 
-
 
85
					<td>$keyvalue.getValue().getWarehouseQty()</td>
-
 
86
 
65
				</tr>
87
				</tr>
66
				#end
88
				#end
67
 
89
 
68
			</tbody>
90
			</tbody>
69
		</table>
91
		</table>
Line 83... Line 105...
83
<div id="inSaleItemModel" class="modal" role="dialog">
105
<div id="inSaleItemModel" class="modal" role="dialog">
84
	<div class="modal-dialog">
106
	<div class="modal-dialog">
85
		<div class="modal-content"></div>
107
		<div class="modal-content"></div>
86
	</div>
108
	</div>
87
</div>
109
</div>
-
 
110
 
-
 
111
<div id="warehouseStockItemModel" class="modal" role="dialog">
-
 
112
	<div class="modal-dialog">
-
 
113
		<div class="modal-content"></div>
-
 
114
	</div>
-
 
115
</div>
88
<script type="text/javascript">
116
<script type="text/javascript">
89
	$(document).ready(
117
	$(document).ready(
90
			function() {
118
			function() {
91
 
119
 
92
				$('.partner-planning-details thead tr').clone(true).appendTo(
120
				$('.partner-planning-details thead tr').clone(true).appendTo(
Line 132... Line 160...
132
 
160
 
133
	$('.partner-planning-details').on(
161
	$('.partner-planning-details').on(
134
			'click',
162
			'click',
135
			'.inSaleItem',
163
			'.inSaleItem',
136
			function() {
164
			function() {
137
				var fofoId = $(this).data('fofoid');
165
				var warehouseId = $(this).data('fofoid');
138
				var catalogIds = $('.criteria-item-catalogids').val();
166
				var catalogIds = $('.criteria-item-catalogids').val();
139
				console.log(catalogIds);
167
				console.log(catalogIds);
140
 
168
 
141
				doGetAjaxRequestHandler(context
169
				doGetAjaxRequestHandler(context
142
						+ "/getSaleItembyCatalogFofoId?fofoId=" + fofoId
170
						+ "/getSaleItembyCatalogFofoId?fofoId=" + fofoId
Line 145... Line 173...
145
					console.log(response)
173
					console.log(response)
146
					$('#inSaleItemModel .modal-content').html(response);
174
					$('#inSaleItemModel .modal-content').html(response);
147
 
175
 
148
				});
176
				});
149
			});
177
			});
-
 
178
 
-
 
179
	$('.partner-planning-details').on(
-
 
180
			'click',
-
 
181
			'.warehouseStockItem',
-
 
182
			function() {
-
 
183
				var warehouseId = $(this).data('warehouseid');
-
 
184
				var catalogIds = $('.criteria-item-catalogids').val();
-
 
185
				console.log(catalogIds);
-
 
186
 
-
 
187
				doGetAjaxRequestHandler(context
-
 
188
						+ "/getWarehouseStockItem?warehouseId=" + warehouseId
-
 
189
						+ "&catalogItemIds=" + catalogIds,
-
 
190
						function(response) {
-
 
191
							console.log(response)
-
 
192
							$('#warehouseStockItemModel .modal-content').html(
-
 
193
									response);
-
 
194
 
-
 
195
						});
-
 
196
			});
150
</script>
197
</script>
151
198