Subversion Repositories SmartDukaan

Rev

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

Rev 9832 Rev 9925
Line 25... Line 25...
25
    });
25
    });
26
}
26
}
27
 
27
 
28
function closePO(id){
28
function closePO(id){
29
	$.ajax({
29
	$.ajax({
30
        type      : 'GET',
30
        type      : 'POST',
31
        url       : '/inventory/purchase-order!closePO',
31
        url       : '/inventory/purchase-order!closePO',
32
        data      : 'id=' + id,
32
        data      : 'id=' + id,
33
        success   : function(response) {
33
        success   : function(response) {
34
            window.location.href = "/inventory/purchase-order";
34
            window.location.href = "/inventory/purchase-order";
35
        },
35
        },
Line 37... Line 37...
37
			alert("Error in closing PO");
37
			alert("Error in closing PO");
38
		}
38
		}
39
    });
39
    });
40
}
40
}
41
 
41
 
-
 
42
function openPO(id){
-
 
43
	$.ajax({
-
 
44
        type      : 'POST',
-
 
45
        url       : '/inventory/purchase-order!openPO',
-
 
46
        data      : 'id=' + id,
-
 
47
        success   : function(response) {
-
 
48
            window.location.href = "/inventory/purchase-order/"+id;
-
 
49
        },
-
 
50
		error	  : function(response) {
-
 
51
			alert("Error in opening PO");
-
 
52
		}
-
 
53
    });
-
 
54
}
-
 
55
 
-
 
56
 
42
function changePOWarehouse(id){
57
/**function changePOWarehouse(id){
43
	$.ajax({
58
	$.ajax({
44
        type      : 'GET',
59
        type      : 'GET',
45
        url       : '/inventory/purchase-order!changeWarehouseForPO',
60
        url       : '/inventory/purchase-order!changeWarehouseForPO',
46
        data      : 'id=' + id + "&warehouseId="
61
        data      : 'id=' + id + "&warehouseId="
47
        success   : function(response) {
62
        success   : function(response) {
Line 49... Line 64...
49
        },
64
        },
50
		error	  : function(response) {
65
		error	  : function(response) {
51
			alert("Error in changing PO Warehouse");
66
			alert("Error in changing PO Warehouse");
52
		}
67
		}
53
    });
68
    });
54
}
69
}*/
55
 
70
 
56
function updateTotalAmount(supplierId) {
71
function updateTotalAmount(supplierId) {
57
    var totalAmount = 0;
72
    var totalAmount = 0;
58
    var totalQuantity = 0;
73
    var totalQuantity = 0;
59
 
74