Data Kontrak
This commit is contained in:
@@ -214,7 +214,7 @@
|
||||
"columnDefs": [
|
||||
//{ className: "td-nowrap", "targets": [ 1 ] }
|
||||
],
|
||||
"dom": "<\"top\" <\"row\"<\"col-md-6\"><\"col-md-6 text-right\">>>rt<\"bottom\" <\"row\"<\"col-md-6\"i><\"col-md-6\"p>> ><\"clear\">",
|
||||
"dom": "<\"top\" <\"row\"<\"col-md-6\"><\"col-md-6 text-right\">>>rt<\"bottom\" <\"row\"<\"col-md-6\"><\"col-md-6\">> ><\"clear\">",
|
||||
"lengthMenu": [
|
||||
[ 50, 75, 100 ],
|
||||
[ "50", "75", "100" ]
|
||||
@@ -292,71 +292,6 @@
|
||||
fixedColumns: {
|
||||
left: 2,
|
||||
},
|
||||
rowGroup: {
|
||||
endRender: function ( rows, group, index ) {
|
||||
let sum = [];
|
||||
let sumReal = [];
|
||||
let total = 0;
|
||||
let totalReal = 0;
|
||||
for(let x=0;x<12;x++){
|
||||
xx = x+1;
|
||||
sum[x] = rows.data().pluck("spsbulan"+xx).reduce( function (a, b) {
|
||||
return a + b * 1;
|
||||
}, 0);
|
||||
total += sum[x];
|
||||
|
||||
sumReal[x] = rows.data().pluck("real"+xx).reduce( function (a, b) {
|
||||
return a + b * 1;
|
||||
}, 0);
|
||||
totalReal += sumReal[x];
|
||||
}
|
||||
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(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>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[1]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[2]) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[2]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[3]) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[3]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[4]) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[4]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[5]) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[5]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[6]) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[6]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[7]) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[7]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[8]) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[8]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[9]) +"</strong></td>" )
|
||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[9]) +"</strong></td>" )
|
||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[10]) +"</strong></td>" )
|
||||
.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 ) {
|
||||
// let group1 = rows.data().pluck("GROUP1");
|
||||
// let group2 = rows.data().pluck("GROUP2");
|
||||
|
||||
// let groupNumber = index == 0 ? group1[0] : group2[0];
|
||||
// if (index == 0){
|
||||
// return $("<tr/>")
|
||||
// .append("<td colspan=5><a href=\'/akun/index/detail/?acc="+groupNumber.split(".").join("_")+"\'>" + groupNumber + ". " + group + "</a></td>")
|
||||
// }else{
|
||||
// return $("<tr/>")
|
||||
// .append("<td colspan=5> <a href=\'/akun/index/detail/?acc="+groupNumber.split(".").join("_")+"\'><strong>" + groupNumber + ". " + group + "</strong></a></td>")
|
||||
// }
|
||||
},
|
||||
dataSrc: ["groupall", "kodegrup"]
|
||||
},
|
||||
scrollX:true,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user