skip to Main Content

get total of a dynamically loaded table's column – Jquery ajax

I am loading a table with the following jquery function get_sales(customer_id,from_date,to_date){ $.ajax({ type: 'POST', url: 'ajax/sale_pl.php', data:{customer_id:customer_id,from_date:from_date,to_date:to_date}, dataType:"json", success: function(response){ //console.log(response); for(i=0; i<response.length; i++) { $('#tdata').append('<tr>'+ '<td><a href="view_invoice.php?id='+response[i].invoice_id+'">'+response[i].invoice_id+'</a></td>'+ '<td>'+response[i].order_date+'</td>'+ '<td><h6 class="mb-1">'+response[i].product_name+'</h6></td>'+ '<td><h6 class="text-muted">'+response[i].product_code+'</h6></td>'+ '<td>'+response[i].sold_qty+'</td>'+ '<td>'+response[i].buy_price+'</td>'+ '<td>'+response[i].sell_price+'</td>'+ '<td>'+response[i].discount+'</td>'+ '<td>'+response[i].cost_price+'</td>'+ '<td>'+response[i].sold_price+'</td>'+ '<td…

VIEW QUESTION
Back To Top
Search