Subversion Repositories SmartDukaan

Rev

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

Rev 10218 Rev 10864
Line 18... Line 18...
18
	            document.location.reload(true);
18
	            document.location.reload(true);
19
	        }
19
	        }
20
	    });
20
	    });
21
	});
21
	});
22
	
22
	
-
 
23
	$('.detailPurchaseReturn').live('click', function(){
-
 
24
		purchaseReturnId = $(this).attr('id');
-
 
25
		$.ajax({
-
 
26
	        type : "GET",
-
 
27
	        url : "/inventory/purchase-return!getItemDetailsForPurchaseReturn?purchaseReturnId="+purchaseReturnId,
-
 
28
	        success : function(response) {
-
 
29
	        	$.colorbox({
-
 
30
					inline : true,
-
 
31
			        width : "500px",
-
 
32
			        height : "500px",
-
 
33
			        overlayClose :	true,
-
 
34
			        escKey :	true,
-
 
35
			        href : $(response),
-
 
36
			        onClosed : function() {
-
 
37
			            //TODO
-
 
38
			        }
-
 
39
				});
-
 
40
	        },
-
 
41
	        error : function(response) {
-
 
42
				alert("Error in fetching Purchase Return Items");
-
 
43
			}			
-
 
44
	    });
-
 
45
	});
-
 
46
	
-
 
47
	$('#create-purchase-return').live('submit', function() {
-
 
48
		createPurchaseReturnJS($(this).serialize());
-
 
49
    	return false;
-
 
50
	});
-
 
51
	
23
	$(function() {
52
	$(function() {
24
		purchaseReturn = $('#purchase-return-table').dataTable({
53
		purchaseReturn = $('#purchase-return-table').dataTable({
25
			"sPaginationType": "full_numbers",
54
			"sPaginationType": "full_numbers",
26
            "aaSorting" : [ [ 1, 'desc' ] ],
55
            "aaSorting" : [ [ 1, 'desc' ] ],
27
            "bAutoWidth": true,
56
            "bAutoWidth": true,
Line 30... Line 59...
30
            "oTableTools" : {
59
            "oTableTools" : {
31
                "sSwfPath" : "swf/copy_cvs_xls_pdf.swf"
60
                "sSwfPath" : "swf/copy_cvs_xls_pdf.swf"
32
            },
61
            },
33
        });
62
        });
34
	});
63
	});
35
});
-
 
36
64
});
-
 
65
 
-
 
66
 
-
 
67
function createPurchaseReturnJS(params){
-
 
68
	$.ajax({
-
 
69
        type : 'POST',
-
 
70
        url : '/inventory/purchase-return!createPurchaseReturn',
-
 
71
        data      : params,
-
 
72
        success : function(response) {
-
 
73
        	alert(response);
-
 
74
        	document.location.href = '/inventory/purchase-return' ;
-
 
75
        },
-
 
76
        error : function() {
-
 
77
        	alert('Some Error occurred at Server End');
-
 
78
        	document.location.href = '/inventory/purchase-return';
-
 
79
        }
-
 
80
    });
-
 
81
}
-
 
82
37
83