Subversion Repositories SmartDukaan

Rev

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

Rev 27529 Rev 27538
Line 28... Line 28...
28
	}
28
	}
29
</style>-->
29
</style>-->
30
 
30
 
31
<script>
31
<script>
32
    $(function(){
32
    $(function(){
-
 
33
   
33
	    
34
	    
34
		$("select.criteria-brands").chosen({no_results_text: "Oops, nothing found!"}); 
35
		$("select.criteria-brands").chosen({no_results_text: "Oops, nothing found!"}); 
-
 
36
		$("select.criteria-warehouse").chosen({no_results_text: "Oops, nothing found!"}); 
-
 
37
		
35
		
38
		
36
	});
39
	});
-
 
40
	
-
 
41
	     $('#brand').multiselect({
-
 
42
    		includeSelectAllOption: true,
-
 
43
        		multiple:true,
-
 
44
        		maxHeight: 200,
-
 
45
        		buttonWidth: '180px',
-
 
46
        		numberDisplayed: 1,
-
 
47
        	nonSelectedText: 'Brands',
-
 
48
        	nSelectedText: ' - Brand Selected',
-
 
49
        	allSelectedText: 'All Brands Selected',
-
 
50
        	enableFiltering: true,
-
 
51
	        enableCaseInsensitiveFiltering : true
-
 
52
        });
-
 
53
        
-
 
54
             $('#warehouse').multiselect({
-
 
55
    		includeSelectAllOption: true,
-
 
56
        		multiple:true,
-
 
57
        		maxHeight: 200,
-
 
58
        		buttonWidth: '180px',
-
 
59
        		numberDisplayed: 1,
-
 
60
        	nonSelectedText: 'Warehouse',
-
 
61
        	nSelectedText: ' - Warehouse Selected',
-
 
62
        	allSelectedText: 'All Warehouse Selected',
-
 
63
        	enableFiltering: true,
-
 
64
	        enableCaseInsensitiveFiltering : true
-
 
65
        });
-
 
66
        
37
</script>
67
</script>
38
 
68
 
39
<section class="wrapper">
69
<section class="wrapper">
40
 
70
 
41
 
71
 
42
 
72
 
43
 
73
 
44
 
74
 
45
    	<div class="row">
75
    	<div class="row">
46
    	  <div class="col-lg-2">
76
  		<div class="col-lg-2 form-group">
47
			 <select  multiple="multiple" name="brands" id="brands" data-placeholder="Choose Brands" class="chosen-select criteria-brands">
77
						<select class="form-control input-sm" id = "brand" name="brand" placeholder="Brand" multiple=multiple>
-
 
78
						<option value="" disabled selected>Brands</option>
48
				#foreach ($brand in $brands)	
79
						#foreach($brand in $brands)
49
				#if($selectedBrand.contains($brand))						 
80
							#if($selectedBrand.contains($brand))						 
50
					<option value="$brand" selected>$brand</option>
81
				              	<option value="$brand" selected>$brand</option>
51
					#else
82
				             #else
52
					<option value="$brand" >$brand</option>
83
		             		<option value="$brand">$brand</option>
53
					#end
84
		             		#end
54
			    #end
85
		             		#end
55
			</select>
86
		             	</select>
56
	      </div>
87
					</div>
57
	      	
88
	      
-
 
89
	     
-
 
90
				<div class="col-lg-2 form-group">
-
 
91
						<select class="form-control input-sm" id = "warehouse" name="warehouse" placeholder="Warehouse" multiple=multiple>
-
 
92
						<option value="" disabled selected>Warehouse</option>
-
 
93
							#foreach($warehouse in $warehouseMap.entrySet())
-
 
94
							#if($selectedWarehouse.contains($warehouse.getKey()))					 
-
 
95
				              	<option value="$warehouse.getKey()" selected>$warehouse.getValue()</option>
-
 
96
				              	#else
-
 
97
		             		<option value="$warehouse.getKey()">$warehouse.getValue()</option>
-
 
98
		             		#end
-
 
99
		             		#end
-
 
100
		             	</select>
-
 
101
					</div>
-
 
102
 
-
 
103
	      		<div class="col-lg-2 form-group">
-
 
104
						<select class="form-control input-sm" id = "categoryName" name="categoryName" placeholder="categoryName">
-
 
105
						<option value="" disabled selected>Category Name</option>
-
 
106
							#foreach($category in $listCategory)
-
 
107
		             		<option value="$category">$category</option>
-
 
108
		             		#end
-
 
109
		             	</select>           
-
 
110
					</div>
-
 
111
		
58
	      <div class="col-lg-2">
112
	      <div class="col-lg-2">
59
			<input class="btn btn-primary brandWiseSearch"  type="button" value="submit">	
113
			<input class="btn btn-primary brandWiseSearch"  type="button" value="submit">	
60
		  </div>
114
		  </div>
61
	      
115
	      
62
		</div>
116
		</div>
63
 
117
 
64
        <div class="row">
-
 
65
			<div class="col-lg-12">
-
 
66
				 <table id="warehouseBrandItemStock" class="table table-striped table-advance table-hover">
-
 
67
				 <thead>
-
 
68
	    			<tr>
-
 
69
	    				<th>Item</th>
-
 
70
	    				<th>Unit Price</th>
-
 
71
	    				<th>Stock Qty</th>
-
 
72
	    				<th>Stock Value</th>
-
 
73
	    				<th>Pending Indent</th>
-
 
74
	    			 </tr>
-
 
75
				 </thead>
-
 
76
	    			<tbody>
-
 
77
	    			    #foreach($key in $warehouseWiseItemStock)
118
        <div class="row" id="warehosueItemStock">
78
	    				<tr>
-
 
79
	    	 		     <td>$key.getBrand() $key.getModelName() $key.getModelNumber() $key.getColor()</td>
-
 
80
	    	 		     <td>$key.getUnitPrice()</td>
-
 
81
	    	 		     <td>$key.getStockQty()</td>
-
 
82
	    	 		     <td class="currency">$key.getStockValue()</td> 
-
 
83
	    	 		      <td>$key.getPendingIndent()</td>
-
 
84
	    				</tr>
-
 
85
	    				 #end
-
 
86
	    				
-
 
87
	    		    </tbody>
-
 
88
	    		</table>
-
 
89
			</div>
119
 
90
		</div>
120
		</div>
91
					
121
					
92
 
122
 
93
</section>
123
</section>
94
<script type="text/javascript">
124
<script type="text/javascript">
95
$(document).ready(function() {
-
 
96
    indentable = $('#warehouseBrandItemStock').DataTable();
-
 
97
});
-
 
98
 
125
 
99
$(document).ready(function() {
126
$(document).ready(function() {
100
$(".brandWiseSearch")
127
$(".brandWiseSearch")
101
		.live(
128
		.live(
102
			'click',
129
			'click',
103
			function() {
130
			function() {
-
 
131
	
-
 
132
    var brands = $('#brand').val();
104
	var warehouseId = $warehouseId;
133
    var category = $('#categoryName').val();
105
    var brands = $('#brands').val();
134
    var warehouseId = $('#warehouse').val();
106
    
-
 
107
    	if (brands == null) {
135
    	if (brands == null) {
108
					alert("select the brand");
136
					alert("select the brand");
109
					return  false
137
					return  false
110
				}
138
				}
111
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandItemStock?warehouseId="+warehouseId+"&brands="+brands,
139
          doGetAjaxRequestHandler(context + "/getWarehouseWiseItemStock?warehouseId="+warehouseId+"&brands="+brands+"&category="+category,
112
			function(response) {
140
			function(response) {
113
				$('.warehouse-brand-item-container').html(response);
141
				$('#warehosueItemStock').html(response);
114
				console.log(response)
142
				console.log(response)
115
			
143
			
116
			});
144
			});
117
	});
145
	});
118
});
146
});