Update
This commit is contained in:
@@ -15,13 +15,36 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header border-0">
|
||||
<h2 class="card-title"><i class="fa fa-search mr-2"></i> Filter Pencarian</h2>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-card-widget="collapse" title="Collapse">
|
||||
<i class="fas fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body pt-0 pb-0">
|
||||
<div class="form-group col-1">
|
||||
<label>Tahun Anggaran</label>
|
||||
<select class="form-control form-control-sm" id="srcTA">
|
||||
@php
|
||||
$listTA = Session::get('listTA');
|
||||
foreach($listTA as $rowTA){
|
||||
echo "<option>$rowTA</option>";
|
||||
}
|
||||
@endphp
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title"><i class="fa fa-th-list mr-2"></i> Jadwal Salur</h2>
|
||||
<div class="card-tools">
|
||||
{{-- @if(auth()->user()->can('Tambah SKPP')) --}}
|
||||
{{-- <button class="btn btn-sm btn-success" onclick="location.href='{{ route('salur-dana.create') }}'"><i class="fa fa-edit"></i> Tambah Data</button> --}}
|
||||
{{-- @endif --}}
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-card-widget="collapse" title="Collapse">
|
||||
<i class="fas fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@@ -87,27 +110,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<div class="form-group">
|
||||
<label>Periode</label>
|
||||
<select class="form-control form-control-sm" id="srcTA">
|
||||
@php
|
||||
$listTA = Session::get('listTA');
|
||||
foreach($listTA as $rowTA){
|
||||
echo "<option>$rowTA</option>";
|
||||
}
|
||||
@endphp
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-11">
|
||||
<div class="form-group">
|
||||
<label>Berdasarkan Kata</label>
|
||||
<input class="form-control form-control-sm" type="text" id="src">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="dtTableJadwalBelanja" class="table table-bordered table-striped jambo_table tblClickRow" style="width:150%">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
@@ -308,7 +310,7 @@
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: function (d) {
|
||||
d.src = $("#src").val(),
|
||||
//d.src = $("#src").val(),
|
||||
d.ta = $("#srcTA").val()
|
||||
}
|
||||
},
|
||||
@@ -366,7 +368,7 @@
|
||||
let totalReal = 0;
|
||||
let Jadwalcol=3;
|
||||
$("td:eq(0)", nRow).html(index);
|
||||
$("td:eq(1)", nRow).html(aData["kode_rsk"] + " | " + aData["nama_rsk"]);
|
||||
$("td:eq(1)", nRow).html("<div class='text-wrap width-200'>" + aData["kode_rsk"] + " | " + aData["nama_rsk"] + "</div>");
|
||||
$("td:eq(2)", nRow).html(separateNumberIndo(aData["jumlah_anggaran"]));
|
||||
$.each(akb, function(i,x){
|
||||
$("td:eq("+Jadwalcol+")", nRow).html(separateNumberIndo(parseFloat(akb[i])));
|
||||
@@ -396,63 +398,62 @@
|
||||
fixedColumns: {
|
||||
left: 3,
|
||||
},
|
||||
rowGroup: {
|
||||
endRender: function ( rows, group, index ) {
|
||||
let sum = [];
|
||||
let sumReal = [];
|
||||
let total = 0;
|
||||
let totalReal = 0;
|
||||
for(let x=0;x<12;x++){
|
||||
xx = ("00"+(x+1));
|
||||
xx = xx.substring(xx.length - 2);
|
||||
sum[x] = rows.data().pluck("v_akb_"+xx).reduce( function (a, b) {
|
||||
return a + b * 1;
|
||||
}, 0);
|
||||
total += sum[x];
|
||||
// rowGroup: {
|
||||
// endRender: function ( rows, group, index ) {
|
||||
// let sum = [];
|
||||
// let sumReal = [];
|
||||
// let total = 0;
|
||||
// let totalReal = 0;
|
||||
// for(let x=0;x<12;x++){
|
||||
// xx = ("00"+(x+1));
|
||||
// xx = xx.substring(xx.length - 2);
|
||||
// sum[x] = rows.data().pluck("v_akb_"+xx).reduce( function (a, b) {
|
||||
// return a + b * 1;
|
||||
// }, 0);
|
||||
// total += sum[x];
|
||||
|
||||
sumReal[x] = rows.data().pluck("v_bku_"+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 colspan='2' 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 ) {
|
||||
},
|
||||
dataSrc: ["kode_skpd"]
|
||||
},
|
||||
// sumReal[x] = rows.data().pluck("v_bku_"+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 colspan='2' 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 ) {
|
||||
// },
|
||||
// dataSrc: ["kode_skpd"]
|
||||
// },
|
||||
scrollX: true,
|
||||
scrollY: "350px",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title"><i class="fa fa-th-list mr-2"></i> Jadwal Salur</h2>
|
||||
<div class="card-header border-0">
|
||||
<h2 class="card-title"><i class="fa fa-search mr-2"></i> Filter Pencarian</h2>
|
||||
<div class="card-tools">
|
||||
{{-- @if(auth()->user()->can('Tambah SKPP')) --}}
|
||||
{{-- <button class="btn btn-sm btn-success" onclick="location.href='{{ route('salur-dana.create') }}'"><i class="fa fa-edit"></i> Tambah Data</button> --}}
|
||||
{{-- @endif --}}
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-card-widget="collapse" title="Collapse">
|
||||
<i class="fas fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body pt-0 pb-0">
|
||||
<form id="frmJadwalSalur" action="{{ $baseUrl }}/jadwal-salurdana" method="post">
|
||||
@csrf
|
||||
<div class="row">
|
||||
@@ -43,13 +43,25 @@
|
||||
</div>
|
||||
<div class="col-11">
|
||||
<div class="form-group">
|
||||
<label for="txt_simtrad4_kotor">DBH/DAK</label>
|
||||
<label for="txt_simtrad4_kotor">DAK</label>
|
||||
<input type="hidden" name="type_dana" value="dak">
|
||||
<select id="txt_id_sps" name="id_sps" class="form-control sps_search" required></select>
|
||||
<select id="txt_id_sps" name="id_sps" class="form-control form-control-sm" required></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title"><i class="fa fa-th-list mr-2"></i> Jadwal Salur</h2>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-card-widget="collapse" title="Collapse">
|
||||
<i class="fas fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="dtTableJadwalPendapatan" class="table table-bordered table-striped jambo_table tblClickRow" style="width:150%">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
@@ -112,27 +124,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<div class="form-group">
|
||||
<label>Periode</label>
|
||||
<select class="form-control form-control-sm" id="srcTA">
|
||||
@php
|
||||
$listTA = Session::get('listTA');
|
||||
foreach($listTA as $rowTA){
|
||||
echo "<option>$rowTA</option>";
|
||||
}
|
||||
@endphp
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-11">
|
||||
<div class="form-group">
|
||||
<label>Berdasarkan Kata</label>
|
||||
<input class="form-control form-control-sm" type="text" id="src">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="dtTableJadwalBelanja" class="table table-bordered table-striped jambo_table tblClickRow" style="width:150%">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
@@ -216,7 +207,9 @@
|
||||
});
|
||||
|
||||
$("#srcTA").on("change",function(e){
|
||||
dtTableSalur.draw();
|
||||
dtTable.draw();
|
||||
optionDAK();
|
||||
});
|
||||
|
||||
var dtTableSalur = $('#dtTableJadwalPendapatan').DataTable( {
|
||||
@@ -410,32 +403,24 @@
|
||||
],
|
||||
});
|
||||
|
||||
$('#txt_id_sps').select2({
|
||||
placeholder: 'Pilih DBH / DAK',
|
||||
allowClear: true,
|
||||
ajax: {
|
||||
url: '{{ $baseUrl }}/item-search-sps?ta='+$("#srcTA").val(),
|
||||
optionDAK = () =>{
|
||||
$.ajax({
|
||||
url: '{{ $baseUrl }}/item-search-sps?ta='+$("#srcTA").val()+'&jenis=dak',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.name,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
success: function (data) {
|
||||
$('#txt_id_sps').empty();
|
||||
$('#txt_id_sps').append($('<option>',{value:"",text:""}));
|
||||
$.map(data, function (item) {
|
||||
$('#txt_id_sps').append($('<option>', {
|
||||
value: item.id,
|
||||
text : item.name
|
||||
}));
|
||||
})
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$('#txt_id_sps').on('select2:select', function (e) {
|
||||
dtTableSalur.draw();
|
||||
})
|
||||
|
||||
$('#txt_id_sps').on('select2:clear', function (e) {
|
||||
$('#txt_id_sps').on('change', function (e) {
|
||||
dtTableSalur.draw();
|
||||
})
|
||||
|
||||
@@ -445,13 +430,13 @@
|
||||
"ordering": false,
|
||||
"autoWidth": false,
|
||||
"ajax": {
|
||||
url: "{{ $baseUrl }}/jadwal-salurdana/cht/datatable",
|
||||
url: "{{ $baseUrl }}/jadwal-salurdana/dak/datatable",
|
||||
type: "POST",
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: function (d) {
|
||||
d.src = $("#src").val(),
|
||||
// d.src = $("#src").val(),
|
||||
d.ta = $("#srcTA").val()
|
||||
}
|
||||
},
|
||||
@@ -596,6 +581,8 @@
|
||||
// },
|
||||
scrollX: true,
|
||||
});
|
||||
|
||||
optionDAK();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user