var totalAmount = 0; var totalQty = 0; for (var i = 0; i < data.length; i++) { totalAmount += parseFloat(data[i].TotalAmount); totalQty += parseFloat(data[i].Quantity); } $("#tqty").val(totalQty); $("#ttotal").val(totalAmount); }
"data": function (d) { d.sDate = $("#startdate").val(); d.eDate = $("#enddate").val(); d.SearvedById = $("#role").val(); return { SearvedById: d.SearvedById, sDate: d.sDate, eDate: d.eDate };
}