Subversion Repositories SmartDukaan

Rev

Rev 27756 | Rev 27852 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27756 Rev 27835
Line 134... Line 134...
134
                    .column(i)
134
                    .column(i)
135
                    .search( this.value )
135
                    .search( this.value )
136
                    .draw();
136
                    .draw();
137
            }
137
            }
138
        } );
138
        } );
139
    } )
139
    });
140
    var table = $('#warehouseBrandStock').DataTable( {
140
    var table = $('#warehouseBrandStock').DataTable( {
-
 
141
    	retrieve: true,
141
        orderCellsTop: true,
142
        orderCellsTop: true,
142
        fixedHeader: true
143
        fixedHeader: true
143
    } );
144
    });
144
    
145
    
-
 
146
    $("#warehouse-wise-stock").click(function() {
-
 
147
		var warehouseId = $('#warehouseMap').val();
-
 
148
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandStock?warehouseId="+warehouseId,
-
 
149
			function(response) {
-
 
150
				$('#' + "main-content").html(response);
-
 
151
				console.log(response)
-
 
152
			});
-
 
153
	});
145
    
154
    
146
    $('#warehouseBrandStock tbody').on('click', 'tr', function () {
155
    $('#warehouseBrandStock tbody tr').click(function () {
147
        var data = table.row( this ).data();
156
        var data = table.row( this ).data();
148
        
-
 
149
        var warehouseId = $('#warehouseMap').val();
157
        var warehouseId = $('#warehouseMap').val();
150
						
-
 
151
        var brands = [];
158
        var brands = [];
152
        brands.push(data[0])
159
        brands.push(data[0])
153
        console.log(data);
160
        console.log(data);
154
        console.log(brands)
161
        console.log(brands)
155
        doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandAndCategory?warehouseId="+warehouseId+"&brands="+brands+"&category="+data[1],
162
        doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandAndCategory?warehouseId="+warehouseId+"&brands="+brands+"&category="+data[1], function(response) {
156
			function(response) {
-
 
157
				$('.warehouse-brand-item-container').html(response);
163
			$('.warehouse-brand-item-container').html(response);
158
				console.log(response)
164
			console.log(response)
159
		 doGetAjaxRequestHandler(context + "/getWarehouseWiseItemStock?warehouseId="+warehouseId+"&brands="+brands+"&category="+data[1],
165
			doGetAjaxRequestHandler(context + "/getWarehouseWiseItemStock?warehouseId="+warehouseId+"&brands="+brands+"&category="+data[1], function(response) {
160
			function(response) {
-
 
161
				$('#warehosueItemStock').html(response);
166
					$('#warehosueItemStock').html(response);
162
				console.log(response)
167
					console.log(response)
163
			
-
 
164
		});
-
 
165
			});
168
			});
-
 
169
		});
166
 
170
 
167
    } );
171
    });
168
});
-
 
169
 
-
 
170
 
-
 
171
$(document).ready(function() {
-
 
172
$(document).on('click', "#warehouse-wise-stock",
-
 
173
			function() {
-
 
174
		var warehouseId = $('#warehouseMap').val();
-
 
175
          doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandStock?warehouseId="+warehouseId,
-
 
176
			function(response) {
-
 
177
				$('#' + "main-content").html(response);
-
 
178
				console.log(response)
-
 
179
			});
-
 
180
	});
-
 
181
});
172
});
182
 
173
 
183
</script>
174
</script>
184
175