Subversion Repositories SmartDukaan

Rev

Rev 27509 | Rev 27538 | 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>
80
	    				<th>Stock Qty</th>
81
	    				<th>Stock Value</th>
27529 tejbeer 82
	    				<th>Pending Indent</th>
27509 tejbeer 83
	    			 </tr>
84
				 </thead>
85
	    			<tbody>
86
	    			    #foreach($key in $warehouseWiseBrandStock)
87
	    				<tr>
27529 tejbeer 88
	    	 		     <td data-warehouse-id="$key.getWarehouseId()">$key.getBrand()</td>
27509 tejbeer 89
	    	 		     <td>$key.getStockQty()</td>
90
	    	 		     <td class="currency">$key.getStockValue()</td> 
27529 tejbeer 91
	    	 		     <td>$key.getPendingIndent()</td>
27509 tejbeer 92
	    				</tr>
93
	    				 #end
94
 
95
	    		    </tbody>
96
	    		</table>
27529 tejbeer 97
		    </div>
27509 tejbeer 98
 
27529 tejbeer 99
</div>
100
 
101
</div>
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>
109
		</div>
110
	</div>
27509 tejbeer 111
 
112
 
113
</section>
114
<script type="text/javascript">
115
$(document).ready(function() {
116
    indentTable = $('#warehouseBrandStock').DataTable();
117
 
118
 
119
    $('#warehouseBrandStock tbody').on('click', 'tr', function () {
120
        var data = indentTable.row( this ).data();
27529 tejbeer 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)
128
        doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandItemStock?warehouseId="+warehouseId+"&brands="+brands,
27509 tejbeer 129
			function(response) {
27529 tejbeer 130
				$('.warehouse-brand-item-container').html(response);
27509 tejbeer 131
				console.log(response)
132
			});
133
    } );
134
});
135
 
136
 
137
$(document).ready(function() {
138
$("#warehouse-wise-stock")
139
		.live(
140
			'click',
141
			function() {
27529 tejbeer 142
		var warehouseId = $('#warehouseMap').val();
27509 tejbeer 143
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandStock?warehouseId="+warehouseId,
144
			function(response) {
145
				$('#' + "main-content").html(response);
146
				console.log(response)
147
			});
148
	});
149
});
150
 
151
</script>