Subversion Repositories SmartDukaan

Rev

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

Rev 4754 Rev 7410
Line 21... Line 21...
21
            $(trElement).find('input[name="unitPrice"]').val(response.split('~')[1]);
21
            $(trElement).find('input[name="unitPrice"]').val(response.split('~')[1]);
22
        }
22
        }
23
    });
23
    });
24
}
24
}
25
 
25
 
-
 
26
function closePO(id){
-
 
27
	$.ajax({
-
 
28
        type      : 'GET',
-
 
29
        url       : '/inventory/purchase-order!closePO',
-
 
30
        data      : 'id=' + id,
-
 
31
        success   : function(response) {
-
 
32
            window.location.href = "/inventory/purchase-order";
-
 
33
        },
-
 
34
		error	  : function(response) {
-
 
35
			alert("Error in closing PO");
-
 
36
		}
-
 
37
    });
-
 
38
}
-
 
39
 
26
function updateTotalAmount(supplierId) {
40
function updateTotalAmount(supplierId) {
27
    var totalAmount = 0;
41
    var totalAmount = 0;
28
    var totalQuantity = 0;
42
    var totalQuantity = 0;
29
 
43
 
30
    $('div#lineitems-' + supplierId + ' table tbody>tr').each(function(index, element) {
44
    $('div#lineitems-' + supplierId + ' table tbody>tr').each(function(index, element) {