Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
9761 amar.kumar 1
$(function() {
2
	$(function() {
3
		heldInventoryTable = $('#held-inventory-table').dataTable({
4
			"sPaginationType": "full_numbers",
5
        	"aaSorting" : [ [ 9, 'desc' ] ],
6
        	"iDisplayLength" : 50,
7
        	"sDom" : 'T<"clear">lfrtip',
8
        	"oTableTools" : {
9
            	"sSwfPath" : "swf/copy_cvs_xls_pdf.swf"
10
        	},
11
    	});
12
	});
13
 
14
	$('#transfer-lot-receive-button').live('click', function() {
15
		var transferLotId = $(this).attr('transferLotId');
16
		$('#transfer-lot-updation-box').show();
17
		$('#update-transfer-lot').attr('transferLotId',transferLotId);
18
		$.colorbox({
19
			inline : true,
20
	        width : "325px",
21
	        height : "125px",
22
	        opacity : "0.30",
23
	        overlayClose :	true,
24
	        escKey :	true,
25
	        href : "#transfer-lot-updation-box",
26
	        onClosed : function() {
27
	            $("#transfer-lot-updation-box").hide();
28
	            $('#update-transfer-lot').removeAttr('transferLotId');
29
	        }
30
		});
31
	});
32
 
33
 
34
	$('#update-transfer-lot').live('click', function () {
35
		$.ajax({
36
			type : "POST",
37
			url : "/inventory/transfer-lot!markTransferLotAsReceived",
38
			data : "id="+$(this).attr('transferLotId')+"&remoteTransferRefNumber="+$('#transfer-lot-reference-number').val(),
39
			success : function(response) {
40
				alert("Successfully marked Transfer Lot as Recieved");
41
			},
42
			error : function(response) {
43
				alert("Error in marking Transfer Lot as Recieved");
44
			}
45
 
46
		});
47
	});
48
	$('#show-transfer-lot-items').live('click', function() {
49
		$.ajax({
50
			type : "GET",
51
			url : "/inventory/transfer-lot!getTransferLotItems?id="+$(this).attr('transferLotId'),
52
			success : function(response) {
53
				$.colorbox({
54
					inline : true,
55
			        width : "400px",
56
			        height : "500px",
57
			        opacity : "0.30",
58
			        overlayClose :	true,
59
			        escKey :	true,
60
			        href : $(response),
61
			        onClosed : function() {
62
			            //TODO
63
			        }
64
				});
65
			},
66
			error : function(response) {
67
				alert("Error in fetching Transfer Lot Items");
68
			}
69
		});
70
	});
71
 
72
});