Subversion Repositories SmartDukaan

Rev

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

Rev 27509 Rev 27529
Line 26... Line 26...
26
	.sale-details{
26
	.sale-details{
27
		cursor:pointer;
27
		cursor:pointer;
28
	}
28
	}
29
</style>-->
29
</style>-->
30
 
30
 
-
 
31
<script>
-
 
32
    $(function(){
-
 
33
	    
-
 
34
		$("select.criteria-brands").chosen({no_results_text: "Oops, nothing found!"}); 
-
 
35
		
-
 
36
	});
-
 
37
</script>
-
 
38
 
31
<section class="wrapper">
39
<section class="wrapper">
32
	<div class="row">
-
 
33
		<div class="col-lg-12">
-
 
34
			<h3 class="page-header"><i class="icon_document_alt"></i>Details</h3>
-
 
35
			<ol class="breadcrumb">
-
 
36
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
-
 
37
				<li><i class="icon_document_alt"></i>Warehouse Brand Item Stock  Detail</li>					  	
-
 
38
			</ol>
-
 
39
		</div>
-
 
40
	</div>
-
 
41
 
40
 
42
 
-
 
43
 	<div class = "row">
-
 
44
			<div class="col-lg-2 form-group">
-
 
45
				<select class="form-control input-sm" id = "warehouseMap" name="warehouseMap" placeholder="Warehouse">
-
 
46
					<option value="" disabled selected>Warehouse</option>
-
 
47
						#foreach($wm in $warehouseMap.entrySet()))
-
 
48
	                    	<option value="$wm.getKey()">$wm.getValue()</option>
-
 
49
		             	#end
-
 
50
		          </select>
-
 
51
			</div>
-
 
52
			
-
 
53
			<div class="col-lg-2 form-group">
-
 
54
			   <select class="form-control input-sm" id = "brand" name="brand" placeholder="Brands">
-
 
55
				  <option value="" disabled selected>Brands</option>
-
 
56
					#foreach($brand in $brands))
-
 
57
	                    <option value="$brand">$brand</option>
-
 
58
		             #end
-
 
59
		       </select>
-
 
60
            </div>		             	
-
 
61
		            
-
 
62
		     <div class="col-lg-2">
-
 
63
				<input class="btn btn-primary search-warehousewise-item"  type="button" value="Submit">	
-
 
64
			  </div>
-
 
65
		
-
 
66
		</div>
-
 
67
 
-
 
68
 
41
 
69
 
42
 
-
 
43
 
-
 
44
 
-
 
45
    	<div class="row">
-
 
46
    	  <div class="col-lg-2">
-
 
47
			 <select  multiple="multiple" name="brands" id="brands" data-placeholder="Choose Brands" class="chosen-select criteria-brands">
-
 
48
				#foreach ($brand in $brands)	
-
 
49
				#if($selectedBrand.contains($brand))						 
-
 
50
					<option value="$brand" selected>$brand</option>
-
 
51
					#else
-
 
52
					<option value="$brand" >$brand</option>
-
 
53
					#end
-
 
54
			    #end
-
 
55
			</select>
-
 
56
	      </div>
-
 
57
	      	
-
 
58
	      <div class="col-lg-2">
-
 
59
			<input class="btn btn-primary brandWiseSearch"  type="button" value="submit">	
-
 
60
		  </div>
-
 
61
	      
-
 
62
		</div>
-
 
63
 
70
        <div class="row">
64
        <div class="row">
71
			<div class="col-lg-12">
65
			<div class="col-lg-12">
72
				 <table id="warehouseBrandItemStock" class="table table-striped table-advance table-hover">
66
				 <table id="warehouseBrandItemStock" class="table table-striped table-advance table-hover">
73
				 <thead>
67
				 <thead>
74
	    			<tr>
68
	    			<tr>
75
	    				<th>Warehouse Name</th>
-
 
76
	    				<th>Item</th>
69
	    				<th>Item</th>
-
 
70
	    				<th>Unit Price</th>
77
	    				<th>Stock Qty</th>
71
	    				<th>Stock Qty</th>
78
	    				<th>Stock Value</th>
72
	    				<th>Stock Value</th>
-
 
73
	    				<th>Pending Indent</th>
79
	    			 </tr>
74
	    			 </tr>
80
				 </thead>
75
				 </thead>
81
	    			<tbody>
76
	    			<tbody>
82
	    			    #foreach($key in $warehouseWiseItemStock)
77
	    			    #foreach($key in $warehouseWiseItemStock)
83
	    				<tr>
78
	    				<tr>
84
	    	 		     <td>$warehouseMap.get($key.getWarehouseId())</td>
-
 
85
	    	 		     <td>$key.getBrand() $key.getModelName() $key.getModelNumber() $key.getColor()</td>
79
	    	 		     <td>$key.getBrand() $key.getModelName() $key.getModelNumber() $key.getColor()</td>
-
 
80
	    	 		     <td>$key.getUnitPrice()</td>
86
	    	 		     <td>$key.getStockQty()</td>
81
	    	 		     <td>$key.getStockQty()</td>
87
	    	 		     <td class="currency">$key.getStockValue()</td> 
82
	    	 		     <td class="currency">$key.getStockValue()</td> 
-
 
83
	    	 		      <td>$key.getPendingIndent()</td>
88
	    				</tr>
84
	    				</tr>
89
	    				 #end
85
	    				 #end
90
	    				
86
	    				
91
	    		    </tbody>
87
	    		    </tbody>
92
	    		</table>
88
	    		</table>
Line 95... Line 91...
95
					
91
					
96
 
92
 
97
</section>
93
</section>
98
<script type="text/javascript">
94
<script type="text/javascript">
99
$(document).ready(function() {
95
$(document).ready(function() {
100
    indentTable = $('#warehouseBrandItemStock').DataTable();
96
    indentable = $('#warehouseBrandItemStock').DataTable();
101
});
97
});
102
 
98
 
103
$(document).ready(function() {
99
$(document).ready(function() {
104
$(".search-warehousewise-item")
100
$(".brandWiseSearch")
105
		.live(
101
		.live(
106
			'click',
102
			'click',
107
			function() {
103
			function() {
108
		var warehouseId = $('#warehouseMap').val();
104
	var warehouseId = $warehouseId;
109
			var brand = $('#brand').val();
105
    var brands = $('#brands').val();
110
			
-
 
111
			
-
 
112
			if (warehouseId === "" && brand === "") {
-
 
113
				alert("Field can't be empty");
-
 
114
				return;
-
 
115
			}
106
    
116
 
-
 
117
			if (warehouseId === "") {
-
 
118
				alert("Please Select the Warehouse");
-
 
119
				return;
-
 
120
			}
-
 
121
			if (brand === "") {
107
    	if (brands == null) {
122
				alert("Please Select the Brand");
108
					alert("select the brand");
123
				return;
109
					return  false
124
			}
110
				}
125
         doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandItemStock?warehouseId="+warehouseId+"&brand="+brand,
111
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandItemStock?warehouseId="+warehouseId+"&brands="+brands,
126
			function(response) {
112
			function(response) {
127
				$('#' + "main-content").html(response);
113
				$('.warehouse-brand-item-container').html(response);
128
				console.log(response)
114
				console.log(response)
-
 
115
			
129
			});
116
			});
-
 
117
	});
130
});
118
});
131
});
119
 
132
</script>
120
</script>
133
121