sebelum auth
parent
1fb28c33cf
commit
ca06f63ca3
|
@ -148,7 +148,6 @@
|
|||
],
|
||||
footerCallback: function(row, data, start, end, display) {
|
||||
let api = this.api();
|
||||
console.log(api.column(6).data());
|
||||
// Remove the formatting to get integer data for summation
|
||||
let intVal = function(i) {
|
||||
return typeof i === 'string' ?
|
||||
|
@ -185,7 +184,7 @@
|
|||
.reduce((a, b) => intVal(a) + intVal(b), 0);
|
||||
|
||||
// Update footer
|
||||
api.column(5).footer().innerHTML = totalPesanan + ' Pesanan';
|
||||
api.column(5).footer().innerHTML = totalPesanan + ' Item';
|
||||
api.column(6).footer().innerHTML =
|
||||
'Rp. ' + pageTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
||||
api.column(7).footer().innerHTML = diskonTotal + ' %';
|
||||
|
|
Loading…
Reference in New Issue