Subversion Repositories SmartDukaan

Rev

Rev 28272 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28272 Rev 30027
Line 24... Line 24...
24
				$('.partnerByBrandsLimit').html(response);
24
				$('.partnerByBrandsLimit').html(response);
25
			});
25
			});
26
	
26
	
27
	});
27
	});
28
	
28
	
-
 
29
	
-
 
30
	$(document).on('click', '.set-stock-limit', function() { 
-
 
31
		
-
 
32
		
-
 
33
		 var brands = $(this).data('brand');
-
 
34
	        var stockLimit= $("form#brand-limit-container input[name=stockLimit]").val();      
-
 
35
	        console.log(stockLimit);
-
 
36
	     doPostAjaxRequestHandler(context + "/setBrandWiseStockLimit?brands=" + brands + "&stockLimit=" + stockLimit, 
-
 
37
				function(response) {
-
 
38
					$('.partnerByBrandsLimit').html(response);
-
 
39
				});
-
 
40
		
-
 
41
		});
-
 
42
	
29
$(document).on('click', '.limit_update_submit', function() { 	
43
$(document).on('click', '.limit_update_submit', function() { 	
30
     var row = $(this).closest("tr");
44
     var row = $(this).closest("tr");
31
 
45
 
32
     var fofoId = $(this).data('id');
46
     var fofoId = $(this).data('id');
-
 
47
  
-
 
48
      var limit = $(row).find("td:eq(3) input[type='text']").val();
-
 
49
      var minStockLimit = $(row).find("td:eq(5) input[type='text']").val();
33
      var limit = $(row).find("input").val();      
50
     	var preLimit = $(row).find("td:eq(2)").text();
-
 
51
     	var preStockLimit = $(row).find("td:eq(4)").text();
34
 
52
 
35
       var brand = $(this).data('brand');
53
       var brand = $(this).data('brand');
-
 
54
       
-
 
55
       console.log(minStockLimit);
-
 
56
       console.log(limit);
36
 
57
 
37
  doPostAjaxRequestHandler(context + "/setUpdateLimit?brand=" + brand + "&limit=" + limit + "&fofoId=" + fofoId, 
58
  doPostAjaxRequestHandler(context + "/setUpdateLimit?brand=" + brand + "&limit=" + limit + "&fofoId=" + fofoId + "&minStockLimit=" + minStockLimit + "&preLimit=" + preLimit + "&preStockLimit=" + preStockLimit,  
38
			function(response) {
59
			function(response) {
39
				row.html(response);
60
				row.html(response);
40
			});
61
			});
41
 
62
 
42
	});
63
	});