Subversion Repositories SmartDukaan

Rev

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