Subversion Repositories SmartDukaan

Rev

Rev 27540 | Rev 27550 | 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
 
27541 tejbeer 32
 
27509 tejbeer 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">
27541 tejbeer 52
		    		<select class="form-control input-sm" id = "warehouseMap" name="warehouseMap" placeholder="Warehouse">
27529 tejbeer 53
						<option value="" disabled selected>Warehouse</option>
27541 tejbeer 54
						#if($warehouseId == 0)
55
						<option value="0" selected>All</option>
56
						#else 
27539 tejbeer 57
							<option value="0">All</option>
58
							#end
27541 tejbeer 59
						  #foreach($wm in $warehouseMap.entrySet()))
60
	                      #if($wm.getKey()==$warehouseId)
61
		             		<option value="$wm.getKey()" selected>$wm.getValue()</option>
27529 tejbeer 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>
27541 tejbeer 89
	    				<th>Tertiary</th>
27509 tejbeer 90
	    			 </tr>
91
				 </thead>
92
	    			<tbody>
93
	    			    #foreach($key in $warehouseWiseBrandStock)
94
	    				<tr>
27539 tejbeer 95
	    	 		     <td>$key.getBrand()</td>
27538 tejbeer 96
	    	 		     <td>$key.getCategoryName()</td>
27509 tejbeer 97
	    	 		     <td>$key.getStockQty()</td>
98
	    	 		     <td class="currency">$key.getStockValue()</td> 
27529 tejbeer 99
	    	 		     <td>$key.getPendingIndent()</td>
27541 tejbeer 100
	    	 		     <td>$key.getTertiary()</td>
27509 tejbeer 101
	    				</tr>
102
	    				 #end
103
 
104
	    		    </tbody>
105
	    		</table>
27529 tejbeer 106
		    </div>
27509 tejbeer 107
 
27529 tejbeer 108
</div>
109
 
110
</div>
111
 
112
	<div class="col-lg-8">
113
		<div id="warehouse-table">
114
			<div class="row">
115
    			<div class="col-lg-12 warehouse-brand-item-container">
116
	    		</div>
117
		    </div>
118
		</div>
119
	</div>
27509 tejbeer 120
 
121
 
122
</section>
123
<script type="text/javascript">
124
$(document).ready(function() {
125
    indentTable = $('#warehouseBrandStock').DataTable();
126
 
127
 
128
    $('#warehouseBrandStock tbody').on('click', 'tr', function () {
129
        var data = indentTable.row( this ).data();
27529 tejbeer 130
 
27539 tejbeer 131
        var warehouseId = $('#warehouseMap').val();
27529 tejbeer 132
 
133
        var brands = [];
134
        brands.push(data[0])
135
        console.log(data);
136
        console.log(brands)
27539 tejbeer 137
        doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandAndCategory?warehouseId="+warehouseId+"&brands="+brands+"&category="+data[1],
27509 tejbeer 138
			function(response) {
27529 tejbeer 139
				$('.warehouse-brand-item-container').html(response);
27509 tejbeer 140
				console.log(response)
27538 tejbeer 141
		 doGetAjaxRequestHandler(context + "/getWarehouseWiseItemStock?warehouseId="+warehouseId+"&brands="+brands+"&category="+data[1],
142
			function(response) {
143
				$('#warehosueItemStock').html(response);
144
				console.log(response)
145
 
146
		});
27509 tejbeer 147
			});
27538 tejbeer 148
 
27509 tejbeer 149
    } );
150
});
151
 
152
 
153
$(document).ready(function() {
154
$("#warehouse-wise-stock")
155
		.live(
156
			'click',
157
			function() {
27529 tejbeer 158
		var warehouseId = $('#warehouseMap').val();
27509 tejbeer 159
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandStock?warehouseId="+warehouseId,
160
			function(response) {
161
				$('#' + "main-content").html(response);
162
				console.log(response)
163
			});
164
	});
165
});
166
 
167
</script>