Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
27556 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
 
45
<div class="col-lg-4">
46
 	<table style="Width:100%; margin:15px">
47
		<tr>
48
			<td  style="Width:40%; float:left">
49
		     <div class = "row">
50
		       <div class="col-lg-12">
51
			    <div class="input-group">
52
		    		<select class="form-control input-sm" id = "warehouseMap" name="warehouseMap" placeholder="Warehouse">
53
						<option value="" disabled selected>Warehouse</option>
54
						#if($warehouseId == 0)
55
						<option value="0" selected>All</option>
56
						#else 
57
							<option value="0">All</option>
58
							#end
59
						  #foreach($wm in $warehouseMap.entrySet()))
60
	                      #if($wm.getKey()==$warehouseId)
61
		             		<option value="$wm.getKey()" selected>$wm.getValue()</option>
62
		             	  #else
63
		             		<option value="$wm.getKey()">$wm.getValue()</option>
64
		             	  #end
65
		             	  #end
66
		             	</select>
67
	    		<span class="input-group-btn">
68
	      			<button class="btn btn-primary submit" id="warehouse-partner-brand-sale" type="button">Go!</button>
69
	    		</span>
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="warehousePartnerBrandSale" class="table table-striped table-advance table-hover">
82
				 <thead>
83
	    			<tr>
84
	    				<th>Brand</th>
27574 tejbeer 85
	    			    <th>LMS</th>
86
	    			    <th>LMS Qty</th>
27556 tejbeer 87
	    			    <th>LMTD</th>
88
	    			    <th>LMTD Qty</th>
89
	    				<th>MTD</th>
90
	    				<th>MTD Qty</th>
91
	    			 </tr>
92
				 </thead>
93
	    			<tbody>
94
	    			    #foreach($sales in $warehouseBrandPartnerSales)
95
	    				<tr>
96
	    	 		     <td>$sales.getBrand()</td>
27574 tejbeer 97
	    	 		      <td class="currency">$sales.getLms()</td>
98
	    	 		      <td>$sales.getLmsQty()</td>
27556 tejbeer 99
	    	 		      <td class="currency">$sales.getLmtd()</td>
100
	    	 		      <td>$sales.getLmtdQty()</td>
101
	    	 		      <td class="currency">$sales.getMtd()</td>
102
	    	 		      <td>$sales.getMtdQty()</td>
103
	    				</tr>
104
	    				 #end
105
 
106
	    		    </tbody>
107
	    		</table>
108
		    </div>
109
 
110
</div>
111
 
112
</div>
113
 
114
	<div class="col-lg-8">
115
		<div id="warehouse-table">
116
			<div class="row">
117
    			<div class="col-lg-12 warehouse-brand-item-sale-container">
118
	    		</div>
119
		    </div>
120
		</div>
121
	</div>
122
 
123
 
124
</section>
125
<script type="text/javascript">
126
$(document).ready(function() {
127
	 $('#warehousePartnerBrandSale thead tr').clone(true).appendTo( '#warehousePartnerBrandSale thead' );
128
	    $('#warehousePartnerBrandSale thead tr:eq(1) th').each( function (i) {
129
	        var title = $(this).text();
130
	        $(this).html( '<input type="text" style = "width:60%;" placeholder="Search '+title+'" />' );
131
 
132
	        $( 'input', this ).on( 'keyup change', function () {
133
	            if ( table.column(i).search() !== this.value ) {
134
	                table
135
	                    .column(i)
136
	                    .search( this.value )
137
	                    .draw();
138
	            }
139
	        });
140
	    })
141
	  var table = $('#warehousePartnerBrandSale').DataTable( {
142
	        orderCellsTop: true,
143
	        fixedHeader: true
144
	    });
145
 
146
 
147
     $('#warehousePartnerBrandSale tbody').on('click', 'tr', function () {
148
        var data = table.row( this ).data();
149
 
150
        var warehouseId = $('#warehouseMap').val();
151
 
152
    	 doGetAjaxRequestHandler(context + "/getWarehouseBrandWiseItemSale?warehouseId="+warehouseId+"&brand="+data[0],
153
			function(response) {
154
				$('.warehouse-brand-item-sale-container').html(response);
155
				console.log(response)
156
 
157
		});
158
 
159
 
160
    });
161
 
162
});
163
 
164
 
165
$(document).ready(function() {
166
$("#warehouse-partner-brand-sale")
167
		.live(
168
			'click',
169
			function() {
170
		var warehouseId = $('#warehouseMap').val();
171
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandPartnerSale?warehouseId="+warehouseId,
172
			function(response) {
173
				$('#' + "main-content").html(response);
174
				console.log(response)
175
			});
176
	});
177
});
178
 
179
</script>