Subversion Repositories SmartDukaan

Rev

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

Rev 28020 Rev 28032
Line 17... Line 17...
17
			<tbody>
17
			<tbody>
18
				#foreach($keyvalue in $inStock.entrySet())
18
				#foreach($keyvalue in $inStock.entrySet())
19
				<tr>
19
				<tr>
20
					<td>$warehouseMap.get($keyvalue.getValue().getWarehouseId())</td>
20
					<td>$warehouseMap.get($keyvalue.getValue().getWarehouseId())</td>
21
					<td>$customRetailers.get($keyvalue.getKey()).getBusinessName()</td>
21
					<td>$customRetailers.get($keyvalue.getKey()).getBusinessName()</td>
-
 
22
					<td class="instockItem"
-
 
23
						data-fofoid="$keyvalue.getValue().getFofoId()" data-toggle="modal"
22
					<td>$keyvalue.getValue().getQty()</td>
24
						data-target="#inStockItemModel">$keyvalue.getValue().getQty()</td>
23
					#if($fofoSale.get($keyvalue.getKey()))
25
					#if($fofoSale.get($keyvalue.getKey()))
-
 
26
					<td class="inSaleItem"
-
 
27
						data-fofoid="$keyvalue.getValue().getFofoId()" data-toggle="modal"
24
					<td>$fofoSale.get($keyvalue.getKey()).getQty()</td> #else
28
						data-target="#inSaleItemModel">$fofoSale.get($keyvalue.getKey()).getQty()</td>
-
 
29
					#else
25
					<td>0</td> #end
30
					<td>0</td> #end
26
				</tr>
31
				</tr>
27
				#end
32
				#end
28
 
33
 
29
			</tbody>
34
			</tbody>
Line 66... Line 71...
66
 
71
 
67
	#end
72
	#end
68
</div>
73
</div>
69
 
74
 
70
 
75
 
-
 
76
<div id="inStockItemModel" class="modal" role="dialog">
-
 
77
	<div class="modal-dialog">
-
 
78
		<div class="modal-content"></div>
-
 
79
	</div>
-
 
80
</div>
-
 
81
 
-
 
82
 
-
 
83
<div id="inSaleItemModel" class="modal" role="dialog">
-
 
84
	<div class="modal-dialog">
-
 
85
		<div class="modal-content"></div>
-
 
86
	</div>
-
 
87
</div>
71
<script type="text/javascript">
88
<script type="text/javascript">
72
	$(document).ready(
89
	$(document).ready(
73
			function() {
90
			function() {
74
 
91
 
75
				$('.partner-planning-details thead tr').clone(true).appendTo(
92
				$('.partner-planning-details thead tr').clone(true).appendTo(
Line 91... Line 108...
91
 
108
 
92
					"lengthMenu" : [ 10, 25, 50, 75, 100, 250 ],
109
					"lengthMenu" : [ 10, 25, 50, 75, 100, 250 ],
93
					"pageLength" : 250,
110
					"pageLength" : 250,
94
				});
111
				});
95
			});
112
			});
-
 
113
 
-
 
114
	$('.partner-planning-details').on(
-
 
115
			'click',
-
 
116
			'.instockItem',
-
 
117
			function() {
-
 
118
				var fofoId = $(this).data('fofoid');
-
 
119
				var catalogIds = $('.criteria-item-catalogids').val();
-
 
120
				console.log(catalogIds);
-
 
121
 
-
 
122
				doGetAjaxRequestHandler(context
-
 
123
						+ "/getInStockItembyFofoId?fofoId=" + fofoId
-
 
124
						+ "&catalogItemIds=" + catalogIds, function(response) {
-
 
125
					console.log(response)
-
 
126
					$('#inStockItemModel .modal-content').html(response);
-
 
127
 
-
 
128
				});
-
 
129
			});
-
 
130
 
-
 
131
	$('.partner-planning-details').on(
-
 
132
			'click',
-
 
133
			'.inSaleItem',
-
 
134
			function() {
-
 
135
				var fofoId = $(this).data('fofoid');
-
 
136
				var catalogIds = $('.criteria-item-catalogids').val();
-
 
137
				console.log(catalogIds);
-
 
138
 
-
 
139
				doGetAjaxRequestHandler(context
-
 
140
						+ "/getSaleItembyCatalogFofoId?fofoId=" + fofoId
-
 
141
						+ "&catalogItemIds=" + catalogIds + "&date="
-
 
142
						+ startDate, function(response) {
-
 
143
					console.log(response)
-
 
144
					$('#inSaleItemModel .modal-content').html(response);
-
 
145
 
-
 
146
				});
-
 
147
			});
96
</script>
148
</script>
97
149