Forum Moderators: open
function recalcTotals(){
var subtotal = 0.00;
// get each item line cost and calculate subtotal.
$('#workorder-form #sa-table-1 tbody tr').each(function (){
if($(this+' input[name="wi-Cost"]').val() != ''){
$(this+' input[name="wi-Cost"]').val(parseFloat($(this+' input[name="wi-UnitPrice"]').val()) * parseFloat($(this+' input[name="wi-QTY"]').val()));
subtotal += parseFloat($(this+' input[name="wi-Cost"]').val());
}
});
function recalcTotals(){
var subtotal = 0.00;
// get each item line cost and calculate subtotal.
$('#workorder-form #sa-table-1 tbody tr').each(function (){
if($(this).find('input[name="wi-Cost"]').val() != ''){
$(this).find('input[name="wi-Cost"]').val(parseFloat($(this).find('input[name="wi-UnitPrice"]').val()) * parseFloat($(this).find('input[name="wi-QTY"]').val()));
subtotal += parseFloat($(this).find('input[name="wi-Cost"]').val());
}
});