Click here to Skip to main content
15,920,383 members

Comments by Member 13751016 (Top 12 by date)

Member 13751016 2-Dec-22 3:29am View    
//here is delete button

//here is the script for unit_price * quantity=total_price // this code work fine
function CalculateTotal(ele) {
var unit_price = $(ele).closest('tr').find('.unit_price').val();
var quantity = $(ele).closest('tr').find('.quantity').val();
unit_price = unit_price == '' ? 0 : unit_price;
quantity = quantity == '' ? 0 : quantity;

if (!isNaN(unit_price) && !isNaN(quantity)) {
var total_price = parseFloat(unit_price) * parseFloat(quantity);
$(ele).closest('tr').find('.total_price').val(total_price.toFixed(2));
}
CalculateGrandTotal();
}
//here is the script for total_price display in sub_total at footer //this code is also work fine
function CalculateGrandTotal() {
total = 0;
$(".total_price").each(function () {
total += parseInt($(this).val());
});
$("#sub_total").val(total.toFixed(2));
}
my question is when delete remove table subtract(-) from sub total
Member 13751016 25-Dec-20 0:34am View    
then how ? please help!!
Member 13751016 21-Jun-20 13:07pm View    
but where i correction? please help!
Member 13751016 9-Apr-20 12:29pm View    
improved
Member 13751016 25-Feb-20 3:09am View    
hellow can you help me for this problem?
https://www.codeproject.com/Questions/5260455/How-I-can-get-grand-total-output-when-h-s-tax-adde?cmt=1038048#cmt1038048