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 40... Line 40...
40
				<li><i class="icon_document_alt"></i>Warehouse Brand Stock  Detail</li>					  	
40
				<li><i class="icon_document_alt"></i>Warehouse Brand Stock  Detail</li>					  	
41
			</ol>
41
			</ol>
42
		</div>
42
		</div>
43
	</div>
43
	</div>
44
 
44
 
-
 
45
<div class="col-lg-4">
45
 	<table style="Width:100%; margin:15px">
46
 	<table style="Width:100%; margin:15px">
46
		<tr>
47
		<tr>
47
			<td  style="Width:20%; float:left">
48
			<td  style="Width:40%; float:left">
48
		     <div class = "row">
49
		     <div class = "row">
49
		       <div class="col-lg-12">
50
		       <div class="col-lg-12">
50
			    <div class="input-group">
51
			    <div class="input-group">
51
		    			<select class="form-control input-sm" id = "warehouseMap" name="warehouseMap" placeholder="Warehouse">
52
		    		<select class="form-control input-sm" id = "warehouseMap" name="warehouseMap" placeholder="Warehouse">
52
							<option value="" disabled selected>Warehouse</option>
53
						<option value="" disabled selected>Warehouse</option>
53
						  #foreach($wm in $warehouseMap.entrySet()))
54
						  #foreach($wm in $warehouseMap.entrySet()))
-
 
55
	                      #if($warehouseWiseBrandStock.get(0).getWarehouseId()== $wm.getKey())
-
 
56
		             		<option value="$wm.getKey()" selected>$wm.getValue()</option>
54
	
57
		             	  #else
55
		             		<option value="$wm.getKey()">$wm.getValue()</option>
58
		             		<option value="$wm.getKey()">$wm.getValue()</option>
-
 
59
		             	  #end
56
		             		#end
60
		             	  #end
57
		             	</select>
61
		             	</select>
58
	    		<span class="input-group-btn">
62
	    		<span class="input-group-btn">
59
	      			<button class="btn btn-primary submit" id="warehouse-wise-stock" type="button">Go!</button>
63
	      			<button class="btn btn-primary submit" id="warehouse-wise-stock" type="button">Go!</button>
60
	    		</span>
64
	    		</spa    mnn>
61
	          </div>
65
	          </div>
62
	          </div>
66
	          </div>
63
	         </div>
67
	         </div>
64
	        </td>
68
	        </td>
65
	   
69
	   
Line 70... Line 74...
70
					
74
					
71
			<div class="col-lg-12">
75
			<div class="col-lg-12">
72
				 <table id="warehouseBrandStock" class="table table-striped table-advance table-hover">
76
				 <table id="warehouseBrandStock" class="table table-striped table-advance table-hover">
73
				 <thead>
77
				 <thead>
74
	    			<tr>
78
	    			<tr>
75
	    			    <th>Warehouse Id</th>
-
 
76
	    				<th>Warehouse Name</th>
-
 
77
	    				<th>Brand</th>
79
	    				<th>Brand</th>
78
	    				<th>Stock Qty</th>
80
	    				<th>Stock Qty</th>
79
	    				<th>Stock Value</th>
81
	    				<th>Stock Value</th>
-
 
82
	    				<th>Pending Indent</th>
80
	    			 </tr>
83
	    			 </tr>
81
				 </thead>
84
				 </thead>
82
	    			<tbody>
85
	    			<tbody>
83
	    			    #foreach($key in $warehouseWiseBrandStock)
86
	    			    #foreach($key in $warehouseWiseBrandStock)
84
	    				<tr>
87
	    				<tr>
85
	    				 <td>$key.getWarehouseId()</td>
-
 
86
	    	 		     <td>$warehouseMap.get($key.getWarehouseId())</td>
88
	    	 		     <td data-warehouse-id="$key.getWarehouseId()">$key.getBrand()</td>
87
	    	 		     <td>$key.getBrand()</td>
-
 
88
	    	 		     <td>$key.getStockQty()</td>
89
	    	 		     <td>$key.getStockQty()</td>
89
	    	 		     <td class="currency">$key.getStockValue()</td> 
90
	    	 		     <td class="currency">$key.getStockValue()</td> 
-
 
91
	    	 		     <td>$key.getPendingIndent()</td>
90
	    				</tr>
92
	    				</tr>
91
	    				 #end
93
	    				 #end
92
	    				
94
	    				
93
	    		    </tbody>
95
	    		    </tbody>
94
	    		</table>
96
	    		</table>
95
						</div>
97
		    </div>
96
						
98
						
-
 
99
</div>
-
 
100
 
-
 
101
</div>
97
			
102
 
-
 
103
	<div class="col-lg-8">
-
 
104
		<div id="warehouse-table">
-
 
105
			<div class="row">
-
 
106
    			<div class="col-lg-12 warehouse-brand-item-container">
-
 
107
	    		</div>
-
 
108
		    </div>
98
			</div>
109
		</div>
-
 
110
	</div>
99
					
111
					
100
 
112
 
101
</section>
113
</section>
102
<script type="text/javascript">
114
<script type="text/javascript">
103
$(document).ready(function() {
115
$(document).ready(function() {
104
    indentTable = $('#warehouseBrandStock').DataTable();
116
    indentTable = $('#warehouseBrandStock').DataTable();
105
    
117
    
106
    
118
    
107
    $('#warehouseBrandStock tbody').on('click', 'tr', function () {
119
    $('#warehouseBrandStock tbody').on('click', 'tr', function () {
108
        var data = indentTable.row( this ).data();
120
        var data = indentTable.row( this ).data();
-
 
121
        
-
 
122
        		var warehouseId =  $warehouseWiseBrandStock.get(0).getWarehouseId();
-
 
123
						
-
 
124
        var brands = [];
-
 
125
        brands.push(data[0])
-
 
126
        console.log(data);
-
 
127
        console.log(brands)
109
        doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandItemStock?warehouseId="+data[0]+"&brand="+data[2],
128
        doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandItemStock?warehouseId="+warehouseId+"&brands="+brands,
110
			function(response) {
129
			function(response) {
111
				$('#' + "main-content").html(response);
130
				$('.warehouse-brand-item-container').html(response);
112
				console.log(response)
131
				console.log(response)
113
			});
132
			});
114
    } );
133
    } );
115
});
134
});
116
 
135
 
Line 118... Line 137...
118
$(document).ready(function() {
137
$(document).ready(function() {
119
$("#warehouse-wise-stock")
138
$("#warehouse-wise-stock")
120
		.live(
139
		.live(
121
			'click',
140
			'click',
122
			function() {
141
			function() {
123
		var warehouseId = 	$('#warehouseMap').val();
142
		var warehouseId = $('#warehouseMap').val();
124
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandStock?warehouseId="+warehouseId,
143
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandStock?warehouseId="+warehouseId,
125
			function(response) {
144
			function(response) {
126
				$('#' + "main-content").html(response);
145
				$('#' + "main-content").html(response);
127
				console.log(response)
146
				console.log(response)
128
			});
147
			});