Subversion Repositories SmartDukaan

Rev

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

Rev 23347 Rev 23434
Line 48... Line 48...
48
		if (!insuranceAmount){
48
		if (!insuranceAmount){
49
			insuranceAmount = 0;
49
			insuranceAmount = 0;
50
		}else{
50
		}else{
51
			insuranceAmount = parseFloat(insuranceAmount);
51
			insuranceAmount = parseFloat(insuranceAmount);
52
		}
52
		}
-
 
53
		console.log("insuranceAmount : "+insuranceAmount);
-
 
54
		
-
 
55
		var quantity = parseFloat($(el).find('.unitPrice').attr('quantity'));
-
 
56
		if(isNaN(quantity)){
-
 
57
			quantity = 0;
-
 
58
		}
-
 
59
		console.log("quantity : "+quantity);
53
		
60
		
54
		var qty = parseFloat($(el).find('.unitPrice').attr('quantity'));
-
 
55
		var unitPrice = parseFloat($(el).find('.unitPrice').val());
61
		var unitPrice = parseFloat($(el).find('.unitPrice').val());
-
 
62
		if(isNaN(unitPrice)){
-
 
63
			unitPrice = 0;
-
 
64
		}
-
 
65
		console.log("unitPrice : "+unitPrice);
56
		
66
		
57
		var discountAmount =  parseFloat($(el).find('.discountAmount').val());
67
		var discountAmount =  parseFloat($(el).find('.discountAmount').val());
58
		if(isNaN(discountAmount)){
68
		if(isNaN(discountAmount)){
59
			discountAmount = 0;
69
			discountAmount = 0.0;
60
		}
70
		}
61
 
71
 
62
		rowTotal = unitPrice*qty + insuranceAmount - discountAmount; 
72
		rowTotal = unitPrice * quantity + insuranceAmount - discountAmount; 
63
		$tr.find('.totalPrice').val(rowTotal);
73
		$tr.find('.totalPrice').val(rowTotal);
64
		netPayableAmount += rowTotal;
74
		netPayableAmount += rowTotal;
65
	});
75
	});
66
	$('#cd').find('input.netPayableAmount').val(netPayableAmount);
76
	$('#cd').find('input.netPayableAmount').val(netPayableAmount);
67
}
77
}