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>
85
	    			    <th>LMTD</th>
86
	    			    <th>LMTD Qty</th>
87
	    				<th>MTD</th>
88
	    				<th>MTD Qty</th>
89
	    			 </tr>
90
				 </thead>
91
	    			<tbody>
92
	    			    #foreach($sales in $warehouseBrandPartnerSales)
93
	    				<tr>
94
	    	 		     <td>$sales.getBrand()</td>
95
	    	 		      <td class="currency">$sales.getLmtd()</td>
96
	    	 		      <td>$sales.getLmtdQty()</td>
97
	    	 		      <td class="currency">$sales.getMtd()</td>
98
	    	 		      <td>$sales.getMtdQty()</td>
99
	    				</tr>
100
	    				 #end
101
 
102
	    		    </tbody>
103
	    		</table>
104
		    </div>
105
 
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-sale-container">
114
	    		</div>
115
		    </div>
116
		</div>
117
	</div>
118
 
119
 
120
</section>
121
<script type="text/javascript">
122
$(document).ready(function() {
123
	 $('#warehousePartnerBrandSale thead tr').clone(true).appendTo( '#warehousePartnerBrandSale thead' );
124
	    $('#warehousePartnerBrandSale thead tr:eq(1) th').each( function (i) {
125
	        var title = $(this).text();
126
	        $(this).html( '<input type="text" style = "width:60%;" placeholder="Search '+title+'" />' );
127
 
128
	        $( 'input', this ).on( 'keyup change', function () {
129
	            if ( table.column(i).search() !== this.value ) {
130
	                table
131
	                    .column(i)
132
	                    .search( this.value )
133
	                    .draw();
134
	            }
135
	        });
136
	    })
137
	  var table = $('#warehousePartnerBrandSale').DataTable( {
138
	        orderCellsTop: true,
139
	        fixedHeader: true
140
	    });
141
 
142
 
143
     $('#warehousePartnerBrandSale tbody').on('click', 'tr', function () {
144
        var data = table.row( this ).data();
145
 
146
        var warehouseId = $('#warehouseMap').val();
147
 
148
    	 doGetAjaxRequestHandler(context + "/getWarehouseBrandWiseItemSale?warehouseId="+warehouseId+"&brand="+data[0],
149
			function(response) {
150
				$('.warehouse-brand-item-sale-container').html(response);
151
				console.log(response)
152
 
153
		});
154
 
155
 
156
    });
157
 
158
});
159
 
160
 
161
$(document).ready(function() {
162
$("#warehouse-partner-brand-sale")
163
		.live(
164
			'click',
165
			function() {
166
		var warehouseId = $('#warehouseMap').val();
167
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandPartnerSale?warehouseId="+warehouseId,
168
			function(response) {
169
				$('#' + "main-content").html(response);
170
				console.log(response)
171
			});
172
	});
173
});
174
 
175
</script>