Update
This commit is contained in:
@@ -83,6 +83,8 @@
|
||||
<tr class="headings">
|
||||
<th rowspan=2>No</th>
|
||||
<th rowspan=2>Nama Rekening</th>
|
||||
<th colspan=2 class="text-right">Jumlah</th>
|
||||
<th rowspan=2 class="text-right">Sisa</th>
|
||||
<th colspan=2 class="text-right">Jan</th>
|
||||
<th colspan=2 class="text-right">Feb</th>
|
||||
<th colspan=2 class="text-right">Mar</th>
|
||||
@@ -95,7 +97,6 @@
|
||||
<th colspan=2 class="text-right">Okt</th>
|
||||
<th colspan=2 class="text-right">Nov</th>
|
||||
<th colspan=2 class="text-right">Des</th>
|
||||
<th colspan=2 class="text-right">Jumlah</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jadwal</td>
|
||||
@@ -446,6 +447,9 @@
|
||||
"columns": [
|
||||
{ "data": null},
|
||||
{ "data": "kode_rekening", "width": "400px" },
|
||||
{ "data": null, "className":"text-right " },
|
||||
{ "data": null, "className":"text-right text-success" },
|
||||
{ "data": null, "className":"text-right text-primary" },
|
||||
{ "data": "spsbulan1", "className":"text-right" },
|
||||
{ "data": null, "className":"text-right text-success" },
|
||||
{ "data": "spsbulan2", "className":"text-right" },
|
||||
@@ -470,9 +474,6 @@
|
||||
{ "data": null, "className":"text-right text-success" },
|
||||
{ "data": "spsbulan12", "className":"text-right" },
|
||||
{ "data": null, "className":"text-right text-success" },
|
||||
{ "data": null, "className":"text-right " },
|
||||
{ "data": null, "className":"text-right text-success" },
|
||||
//{ "data": null },
|
||||
],
|
||||
"rowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull, oSettings) {
|
||||
let info = dtTableSalur.page.info();
|
||||
@@ -485,7 +486,7 @@
|
||||
|
||||
let total = 0;
|
||||
let totalReal = 0;
|
||||
let Jadwalcol=0;
|
||||
let Jadwalcol=3;
|
||||
$("td:eq(0)", nRow).html(index);
|
||||
$("td:eq(1)", nRow).html(aData["kode_rekening"] + " | " + aData["nama_rekening"]);
|
||||
$.each(sps, function(i,x){
|
||||
@@ -495,8 +496,9 @@
|
||||
total+=parseFloat(sps[i]);
|
||||
totalReal+=parseFloat(real[i]);
|
||||
})
|
||||
$("td:eq(26)", nRow).html(separateNumberIndo(total));
|
||||
$("td:eq(27)", nRow).html(separateNumberIndo(totalReal));
|
||||
$("td:eq(2)", nRow).html(separateNumberIndo(total));
|
||||
$("td:eq(3)", nRow).html(separateNumberIndo(totalReal));
|
||||
$("td:eq(4)", nRow).html(separateNumberIndo(aData["sisa"]));
|
||||
|
||||
return nRow;
|
||||
},
|
||||
@@ -521,6 +523,7 @@
|
||||
let sumReal = [];
|
||||
let total = 0;
|
||||
let totalReal = 0;
|
||||
let totalSisa = 0;
|
||||
for(let x=0;x<12;x++){
|
||||
xx = x+1;
|
||||
sum[x] = rows.data().pluck("spsbulan"+xx).reduce( function (a, b) {
|
||||
@@ -531,13 +534,21 @@
|
||||
sumReal[x] = rows.data().pluck("real"+xx).reduce( function (a, b) {
|
||||
return a + b * 1;
|
||||
}, 0);
|
||||
totalReal += sumReal[x];
|
||||
totalReal += sumReal[x];
|
||||
|
||||
}
|
||||
totalSisa = rows.data().pluck("sisa").reduce( function (a, b) {
|
||||
return a + b * 1;
|
||||
}, 0);
|
||||
|
||||
let textmuted = index == 1 ? "text-muted":"";
|
||||
let labelGroup = index == 1 ?"JUMLAH | " + group : "TOTAL";
|
||||
return $("<tr/>")
|
||||
.append( "<td></td>")
|
||||
.append( "<td class=\'text-left " + textmuted +"\'><strong>"+labelGroup+"</strong></td>")
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(total) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(totalReal) +"</strong></td>" )
|
||||
.append( "<td class='text-primary text-right'><strong>"+ separateNumberIndo(totalSisa) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[0]) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[0]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[1]) +"</strong></td>" )
|
||||
@@ -562,8 +573,6 @@
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[10]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[11]) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[11]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(total) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(totalReal) +"</strong></td>" )
|
||||
},
|
||||
startRender: function ( rows, group, index ) {
|
||||
},
|
||||
@@ -624,6 +633,10 @@
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#dtTableJadwalPendapatan').on( 'draw.dt', function () {
|
||||
$($.fn.dataTable.tables(true)).DataTable().columns.adjust();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user