Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
27509 tejbeer 1
<section>
2
 
3
 
4
<!--<style>
5
	.table-striped > tbody > tr:nth-child(odd) > td{
6
  		background: white;
7
  		background-color: white;
8
	}
9
	.table-striped > tbody > tr:nth-child(even) > td{
10
  		background: white;
11
  		background-color:white;
12
	}
13
	.table-striped > tbody > tr:hover > td,
14
	.table-striped > tbody > tr:hover {
15
		background-color: #e98c8f;
16
	  	color:white;
17
	}
18
	.btn:hover{
19
  		color: grey;
20
  		text-decoration: none;
21
	}
22
	.btn-primary:hover{
23
  		color: grey;
24
  		text-decoration: none;
25
	}
26
	.sale-details{
27
		cursor:pointer;
28
	}
29
</style>-->
30
<script type="text/javascript">
31
 
27540 tejbeer 32
          $('#warehouseMap').multiselect({
33
    		includeSelectAllOption: true,
34
        		multiple:true,
35
        		maxHeight: 200,
36
        		buttonWidth: '180px',
37
        		numberDisplayed: 1,
38
        	nonSelectedText: 'Warehouse',
39
        	nSelectedText: ' - Warehouse Selected',
40
        	allSelectedText: 'All Warehouse Selected',
41
        	enableFiltering: true,
42
	        enableCaseInsensitiveFiltering : true
43
        });
27509 tejbeer 44
	</script>
45
<section class="wrapper">
46
	<div class="row">
47
		<div class="col-lg-12">
48
			<h3 class="page-header"><i class="icon_document_alt"></i>Details</h3>
49
			<ol class="breadcrumb">
50
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
51
				<li><i class="icon_document_alt"></i>Warehouse Brand Stock  Detail</li>					  	
52
			</ol>
53
		</div>
54
	</div>
55
 
27529 tejbeer 56
<div class="col-lg-4">
27509 tejbeer 57
 	<table style="Width:100%; margin:15px">
58
		<tr>
27529 tejbeer 59
			<td  style="Width:40%; float:left">
27509 tejbeer 60
		     <div class = "row">
61
		       <div class="col-lg-12">
62
			    <div class="input-group">
27540 tejbeer 63
		    		<select class="form-control input-sm" id = "warehouseMap" name="warehouseMap" placeholder="Warehouse"  multiple=multiple>
27529 tejbeer 64
						<option value="" disabled selected>Warehouse</option>
27540 tejbeer 65
				        #if($warehouseId.contains(0))
66
							<option value="0" selected>All</option>
67
							#else 
27539 tejbeer 68
							<option value="0">All</option>
69
							#end
27540 tejbeer 70
							#foreach($wm in $warehouseMap.entrySet())
71
							#if($warehouseId.contains($wm.getKey()))					 
72
				               <option value="$wm.getKey()" selected>$wm.getValue()</option>
27529 tejbeer 73
		             	  #else
27509 tejbeer 74
		             		<option value="$wm.getKey()">$wm.getValue()</option>
27529 tejbeer 75
		             	  #end
76
		             	  #end
27509 tejbeer 77
		             	</select>
78
	    		<span class="input-group-btn">
79
	      			<button class="btn btn-primary submit" id="warehouse-wise-stock" type="button">Go!</button>
27539 tejbeer 80
	    		</span>
27509 tejbeer 81
	          </div>
82
	          </div>
83
	         </div>
84
	        </td>
85
 
86
 
87
		</tr>
88
    </table>
89
<div class="row">
90
 
91
			<div class="col-lg-12">
92
				 <table id="warehouseBrandStock" class="table table-striped table-advance table-hover">
93
				 <thead>
94
	    			<tr>
95
	    				<th>Brand</th>
27538 tejbeer 96
	    				<th>Category</th>
27509 tejbeer 97
	    				<th>Stock Qty</th>
98
	    				<th>Stock Value</th>
27529 tejbeer 99
	    				<th>Pending Indent</th>
27509 tejbeer 100
	    			 </tr>
101
				 </thead>
102
	    			<tbody>
103
	    			    #foreach($key in $warehouseWiseBrandStock)
104
	    				<tr>
27539 tejbeer 105
	    	 		     <td>$key.getBrand()</td>
27538 tejbeer 106
	    	 		     <td>$key.getCategoryName()</td>
27509 tejbeer 107
	    	 		     <td>$key.getStockQty()</td>
108
	    	 		     <td class="currency">$key.getStockValue()</td> 
27529 tejbeer 109
	    	 		     <td>$key.getPendingIndent()</td>
27509 tejbeer 110
	    				</tr>
111
	    				 #end
112
 
113
	    		    </tbody>
114
	    		</table>
27529 tejbeer 115
		    </div>
27509 tejbeer 116
 
27529 tejbeer 117
</div>
118
 
119
</div>
120
 
121
	<div class="col-lg-8">
122
		<div id="warehouse-table">
123
			<div class="row">
124
    			<div class="col-lg-12 warehouse-brand-item-container">
125
	    		</div>
126
		    </div>
127
		</div>
128
	</div>
27509 tejbeer 129
 
130
 
131
</section>
132
<script type="text/javascript">
133
$(document).ready(function() {
134
    indentTable = $('#warehouseBrandStock').DataTable();
135
 
136
 
137
    $('#warehouseBrandStock tbody').on('click', 'tr', function () {
138
        var data = indentTable.row( this ).data();
27529 tejbeer 139
 
27539 tejbeer 140
        var warehouseId = $('#warehouseMap').val();
27529 tejbeer 141
 
142
        var brands = [];
143
        brands.push(data[0])
144
        console.log(data);
145
        console.log(brands)
27539 tejbeer 146
        doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandAndCategory?warehouseId="+warehouseId+"&brands="+brands+"&category="+data[1],
27509 tejbeer 147
			function(response) {
27529 tejbeer 148
				$('.warehouse-brand-item-container').html(response);
27509 tejbeer 149
				console.log(response)
27538 tejbeer 150
		 doGetAjaxRequestHandler(context + "/getWarehouseWiseItemStock?warehouseId="+warehouseId+"&brands="+brands+"&category="+data[1],
151
			function(response) {
152
				$('#warehosueItemStock').html(response);
153
				console.log(response)
154
 
155
		});
27509 tejbeer 156
			});
27538 tejbeer 157
 
27509 tejbeer 158
    } );
159
});
160
 
161
 
162
$(document).ready(function() {
163
$("#warehouse-wise-stock")
164
		.live(
165
			'click',
166
			function() {
27529 tejbeer 167
		var warehouseId = $('#warehouseMap').val();
27509 tejbeer 168
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandStock?warehouseId="+warehouseId,
169
			function(response) {
170
				$('#' + "main-content").html(response);
171
				console.log(response)
172
			});
173
	});
174
});
175
 
176
</script>