var discount_amount = parseFloat($('#amtdelivary').val());
var other_discount = parseFloat($('#othdis').val());
calculate_total_amount=Math.round(sub_total1 + tax_amount +discount_amount-other_discount);
$('#fnltot').val(calculate_total_amount);
When I keep the other_discount text field empty, its showing a NaN. If the text field is 0 its functioning accurately but when the field is set to empty, its resulting in NaN.
if(isNaN(other_discount)){
other_discount=0;
}
I tired these but its not working.