I have a datatable having values
EPF value
123 100
123 10
123 700
143 40
143 30
145 40
I want the datatable as
EPF value
123 100
123 10
123 700
total 810
143 40
143 30
total 70
145 40
total 40
What I have tried:
function medical_claim_list_tables() {
medical_claim_list_table = js('#medical_claim_list_table').DataTable({
"destroy": true,
"processing": true,
"serverSide": true,
"scrollX": false,
language: {
searchPlaceholder: "EPF No"
},
"ajax": {
"url": site_url + "/Finance_balance_log_c/get_finance_balance_log",
"type": "POST"
},
"columns": [
{"data": "emp_no"},
{"data": "name_short"},
{"data": "claim_type"},
{"data": "claim_type_balance"}
],
"lengthMenu": [[99999999], ["All"]],
"createdRow": function (data, type, full, meta) {
if(full['emp_no'])
if (data[3].replace(/[\$,]/g, '') * 1 > 150000) {
js('td', row).eq(5).addClass('highlight');
}
}