Subversion Repositories SmartDukaan

Rev

Rev 27538 | Rev 27540 | 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>
27539 tejbeer 54
						#if($warehouseId == 0)
55
						<option value="0" selected>All</option>
56
						#else 
57
							<option value="0">All</option>
58
							#end
27509 tejbeer 59
						  #foreach($wm in $warehouseMap.entrySet()))
27539 tejbeer 60
	                      #if($wm.getKey()==$warehouseId)
27529 tejbeer 61
		             		<option value="$wm.getKey()" selected>$wm.getValue()</option>
62
		             	  #else
27509 tejbeer 63
		             		<option value="$wm.getKey()">$wm.getValue()</option>
27529 tejbeer 64
		             	  #end
65
		             	  #end
27509 tejbeer 66
		             	</select>
67
	    		<span class="input-group-btn">
68
	      			<button class="btn btn-primary submit" id="warehouse-wise-stock" type="button">Go!</button>
27539 tejbeer 69
	    		</span>
27509 tejbeer 70
	          </div>
71
	          </div>
72
	         </div>
73
	        </td>
74
 
75
 
76
		</tr>
77
    </table>
78
<div class="row">
79
 
80
			<div class="col-lg-12">
81
				 <table id="warehouseBrandStock" class="table table-striped table-advance table-hover">
82
				 <thead>
83
	    			<tr>
84
	    				<th>Brand</th>
27538 tejbeer 85
	    				<th>Category</th>
27509 tejbeer 86
	    				<th>Stock Qty</th>
87
	    				<th>Stock Value</th>
27529 tejbeer 88
	    				<th>Pending Indent</th>
27509 tejbeer 89
	    			 </tr>
90
				 </thead>
91
	    			<tbody>
92
	    			    #foreach($key in $warehouseWiseBrandStock)
93
	    				<tr>
27539 tejbeer 94
	    	 		     <td>$key.getBrand()</td>
27538 tejbeer 95
	    	 		     <td>$key.getCategoryName()</td>
27509 tejbeer 96
	    	 		     <td>$key.getStockQty()</td>
97
	    	 		     <td class="currency">$key.getStockValue()</td> 
27529 tejbeer 98
	    	 		     <td>$key.getPendingIndent()</td>
27509 tejbeer 99
	    				</tr>
100
	    				 #end
101
 
102
	    		    </tbody>
103
	    		</table>
27529 tejbeer 104
		    </div>
27509 tejbeer 105
 
27529 tejbeer 106
</div>
107
 
108
</div>
109
 
110
	<div class="col-lg-8">
111
		<div id="warehouse-table">
112
			<div class="row">
113
    			<div class="col-lg-12 warehouse-brand-item-container">
114
	    		</div>
115
		    </div>
116
		</div>
117
	</div>
27509 tejbeer 118
 
119
 
120
</section>
121
<script type="text/javascript">
122
$(document).ready(function() {
123
    indentTable = $('#warehouseBrandStock').DataTable();
124
 
125
 
126
    $('#warehouseBrandStock tbody').on('click', 'tr', function () {
127
        var data = indentTable.row( this ).data();
27529 tejbeer 128
 
27539 tejbeer 129
        var warehouseId = $('#warehouseMap').val();
27529 tejbeer 130
 
131
        var brands = [];
132
        brands.push(data[0])
133
        console.log(data);
134
        console.log(brands)
27539 tejbeer 135
        doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandAndCategory?warehouseId="+warehouseId+"&brands="+brands+"&category="+data[1],
27509 tejbeer 136
			function(response) {
27529 tejbeer 137
				$('.warehouse-brand-item-container').html(response);
27509 tejbeer 138
				console.log(response)
27538 tejbeer 139
		 doGetAjaxRequestHandler(context + "/getWarehouseWiseItemStock?warehouseId="+warehouseId+"&brands="+brands+"&category="+data[1],
140
			function(response) {
141
				$('#warehosueItemStock').html(response);
142
				console.log(response)
143
 
144
		});
27509 tejbeer 145
			});
27538 tejbeer 146
 
27509 tejbeer 147
    } );
148
});
149
 
150
 
151
$(document).ready(function() {
152
$("#warehouse-wise-stock")
153
		.live(
154
			'click',
155
			function() {
27529 tejbeer 156
		var warehouseId = $('#warehouseMap').val();
27509 tejbeer 157
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandStock?warehouseId="+warehouseId,
158
			function(response) {
159
				$('#' + "main-content").html(response);
160
				console.log(response)
161
			});
162
	});
163
});
164
 
165
</script>