Subversion Repositories SmartDukaan

Rev

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

Rev 7676 Rev 9416
Line 18... Line 18...
18
        data      : 'itemId=' + itemId + '&supplierId=' + supplierId,
18
        data      : 'itemId=' + itemId + '&supplierId=' + supplierId,
19
        success   : function(response) {
19
        success   : function(response) {
20
            $(trElement).find('div#modelName').html(response.split('~')[0]);
20
            $(trElement).find('div#modelName').html(response.split('~')[0]);
21
            $(trElement).find('input[name="unitPrice"]').val(response.split('~')[1]);
21
            $(trElement).find('input[name="unitPrice"]').val(response.split('~')[1]);
22
            $(trElement).find('input[name="nlc"]').val(response.split('~')[2]);
22
            $(trElement).find('input[name="nlc"]').val(response.split('~')[2]);
-
 
23
            $(trElement).find('input[name="mrp"]').val(response.split('~')[3]);
23
        }
24
        }
24
    });
25
    });
25
}
26
}
26
 
27
 
27
function closePO(id){
28
function closePO(id){
Line 36... Line 37...
36
			alert("Error in closing PO");
37
			alert("Error in closing PO");
37
		}
38
		}
38
    });
39
    });
39
}
40
}
40
 
41
 
-
 
42
function changePOWarehouse(id){
-
 
43
	$.ajax({
-
 
44
        type      : 'GET',
-
 
45
        url       : '/inventory/purchase-order!changeWarehouseForPO',
-
 
46
        data      : 'id=' + id,
-
 
47
        success   : function(response) {
-
 
48
            window.location.href = "/inventory/purchase-order";
-
 
49
        },
-
 
50
		error	  : function(response) {
-
 
51
			alert("Error in changing PO Warehouse");
-
 
52
		}
-
 
53
    });
-
 
54
}
-
 
55
 
41
function updateTotalAmount(supplierId) {
56
function updateTotalAmount(supplierId) {
42
    var totalAmount = 0;
57
    var totalAmount = 0;
43
    var totalQuantity = 0;
58
    var totalQuantity = 0;
44
 
59
 
45
    $('div#lineitems-' + supplierId + ' table tbody>tr').each(function(index, element) {
60
    $('div#lineitems-' + supplierId + ' table tbody>tr').each(function(index, element) {