Perbaikan Selisih Beta 1.0 dan Export
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
<!-- Tabel Data Rubrik -->
|
||||
<div class="row">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered w-100" id="rubrikTable">
|
||||
<table class="table table-striped table-bordered w-100 dt-styled" id="rubrikTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID Rubrik</th>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered w-100" id="kategoriTable">
|
||||
<table class="table table-striped table-bordered w-100 dt-styled" id="kategoriTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
])
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered w-100" id="syaratTable">
|
||||
<table class="table table-striped table-bordered w-100 dt-styled" id="syaratTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#p1-selisih tbody td.nama-col {
|
||||
#p1-selisih tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#p1-selisih tbody td.nama-col .fw-semibold {
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
#detailSelisihP1Modal .bg-tosca {
|
||||
background-color: #b2f2e5 !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
@@ -68,27 +68,33 @@
|
||||
'description' => 'Berikut adalah daftar perhitungan P1 untuk setiap pegawai',
|
||||
'actionButton' => '
|
||||
<a href="#" class="btn btn-sm btn-outline-success export"><i class="uil-file-download-alt"></i> Export Excel</a>
|
||||
<a href="#" class="btn btn-sm btn-outline-success export-selisih d-none"><i class="uil-file-download-alt"></i> Export Excel</a>
|
||||
<a href="#" class="btn btn-sm btn-outline-success export-selisih"><i class="uil-file-download-alt"></i> Export Excel</a>
|
||||
'
|
||||
])
|
||||
|
||||
<!-- Filter Section -->
|
||||
<div class='d-flex gap-2 mb-3'>
|
||||
<select name="jenis_pegawai" id="jenis_pegawai" class="form-select select2"
|
||||
data-placeholder="Pilih Jenis Pegawai">
|
||||
<option value=""></option>
|
||||
<option value="dosen">Dosen</option>
|
||||
@if (!$team || !isset($team->unit_kerja_id) || $team->unit_kerja_id === null || $team->unit_kerja_id === 0)
|
||||
<option value="jtt-univ">Dosen Dengan Jabatan Tugas Tambahan Tingkat Universitas</option>
|
||||
@endif
|
||||
<option value="jtt">
|
||||
Dosen Dengan Jabatan Tugas Tambahan
|
||||
<div class="d-flex flex-column gap-1">
|
||||
<select name="jenis_pegawai" id="jenis_pegawai" class="form-select select2"
|
||||
data-placeholder="Pilih Jenis Pegawai">
|
||||
<option value=""></option>
|
||||
<option value="dosen">Dosen</option>
|
||||
@if (!$team || !isset($team->unit_kerja_id) || $team->unit_kerja_id === null || $team->unit_kerja_id === 0)
|
||||
Tingkat Fakultas
|
||||
<option value="jtt-univ">Dosen Dengan Jabatan Tugas Tambahan Tingkat Universitas</option>
|
||||
@endif
|
||||
</option>
|
||||
<option value="tendik">Tendik</option>
|
||||
</select>
|
||||
<option value="jtt">
|
||||
Dosen Dengan Jabatan Tugas Tambahan
|
||||
@if (!$team || !isset($team->unit_kerja_id) || $team->unit_kerja_id === null || $team->unit_kerja_id === 0)
|
||||
Tingkat Fakultas
|
||||
@endif
|
||||
</option>
|
||||
<option value="tendik">Tendik</option>
|
||||
</select>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="include_pppk_2025">
|
||||
<label class="form-check-label" for="include_pppk_2025">PPPK 2025</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!$team || !isset($team->unit_kerja_id) || $team->unit_kerja_id === null || $team->unit_kerja_id === 0)
|
||||
<select name="unit_kerja" id="unit_kerja" class="form-select select2"
|
||||
@@ -164,13 +170,23 @@
|
||||
|
||||
<!-- Selisih Tab -->
|
||||
<div class="tab-pane fade" id="selisih-tab-pane" role="tabpanel" tabindex="0">
|
||||
<div class="d-flex gap-2 mb-3">
|
||||
<select name="jenis_selisih" id="jenis_selisih" class="form-select select2"
|
||||
data-placeholder="Pilih Jenis Selisih" style="max-width: 250px;">
|
||||
<option value=""></option>
|
||||
<option value="kekurangan">Kekurangan</option>
|
||||
<option value="kelebihan">Kelebihan</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered w-100 dt-styled" id="p1-selisih">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pegawai</th>
|
||||
<th>Unit Kerja</th>
|
||||
<th>Keterangan</th>
|
||||
<th class="text-center">Selisih Bruto</th>
|
||||
<th class="text-center">Selisih Pajak</th>
|
||||
<th class="text-center">Selisih Netto</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -185,11 +201,11 @@
|
||||
|
||||
<!-- Modal Detail Selisih P1 -->
|
||||
<div class="modal fade" id="detailSelisihP1Modal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="modal-header bg-primary text-white">
|
||||
<h5 class="modal-title">Detail Selisih P1</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h6 class="fw-bold mb-2">Informasi Pegawai</h6>
|
||||
@@ -201,31 +217,8 @@
|
||||
<tr><th>Jenis Pegawai</th><td id="detail-selisih-jenis">-</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h6 class="fw-bold mb-2">P1 Lama</h6>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<tbody>
|
||||
<tr><th width="35%">Jabatan Fungsional</th><td id="detail-p1-lama-jafung">-</td></tr>
|
||||
<tr><th>Jabatan Tugas Tambahan</th><td id="detail-p1-lama-jtt">-</td></tr>
|
||||
<tr><th>Bruto</th><td id="detail-p1-lama-bruto">-</td></tr>
|
||||
<tr><th>Netto</th><td id="detail-p1-lama-netto">-</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h6 class="fw-bold mb-2">P1 Baru</h6>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<tbody>
|
||||
<tr><th width="35%">Jabatan Fungsional</th><td id="detail-p1-baru-jafung">-</td></tr>
|
||||
<tr><th>Jabatan Tugas Tambahan</th><td id="detail-p1-baru-jtt">-</td></tr>
|
||||
<tr><th>Bruto</th><td id="detail-p1-baru-bruto">-</td></tr>
|
||||
<tr><th>Netto</th><td id="detail-p1-baru-netto">-</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h6 class="fw-bold mb-2">Selisih</h6>
|
||||
<table class="table table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr><th width="35%">Selisih Bruto</th><td id="detail-selisih-bruto">-</td></tr>
|
||||
<tr><th>Selisih Netto</th><td id="detail-selisih-netto">-</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h6 class="fw-bold mb-2">Riwayat Pembayaran</h6>
|
||||
<div id="detail-riwayat-container"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
||||
@@ -242,6 +235,9 @@
|
||||
var table, tableSelisih;
|
||||
var hideUnitKerja = {{ ($team && isset($team->unit_kerja_id) && $team->unit_kerja_id >= 1 && $team->unit_kerja_id <= 9) ? 'true' : 'false' }};
|
||||
|
||||
// Tab Main aktif secara default, jadi sembunyikan tombol export Selisih di awal
|
||||
$('a.export-selisih').hide();
|
||||
|
||||
function renderRupiah(data) {
|
||||
if (!data) {
|
||||
return '<div class="d-flex justify-content-between gap-1 nominal-cell"><span>Rp.</span><span>0,00</span></div>';
|
||||
@@ -266,6 +262,22 @@
|
||||
'"></i> ' + jenis.toUpperCase() + '</small>';
|
||||
}
|
||||
|
||||
function renderJenisSelisihBadge(jenis) {
|
||||
if (jenis && jenis.indexOf('Kekurangan') !== -1) {
|
||||
return '<span class="text-danger fw-semibold">' + jenis + '</span>';
|
||||
}
|
||||
if (jenis && jenis.indexOf('Kelebihan') !== -1) {
|
||||
return '<span class="text-warning fw-semibold">' + jenis + '</span>';
|
||||
}
|
||||
return '<span class="text-muted">-</span>';
|
||||
}
|
||||
|
||||
function renderKeteranganCell(jenisSelisih) {
|
||||
return '<div class="d-flex flex-column gap-1 align-items-start">' +
|
||||
'<div><span class="text-muted small me-1">Selisih:</span>' + renderJenisSelisihBadge(jenisSelisih) + '</div>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
// Toggle export buttons berdasarkan tab aktif
|
||||
$('#p1Tabs button[data-bs-toggle="tab"]').on('shown.bs.tab', function(e) {
|
||||
var isMain = $(e.target).attr('id') === 'main-tab';
|
||||
@@ -287,6 +299,7 @@
|
||||
d.jenis_pegawai = $('select#jenis_pegawai').val();
|
||||
d.tahun = $('select#tahun').val();
|
||||
d.bulan = $('select#bulan').val();
|
||||
d.include_pppk_2025 = $('#include_pppk_2025').is(':checked') ? 1 : 0;
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
@@ -339,11 +352,16 @@
|
||||
});
|
||||
|
||||
// Reload tabel saat filter berubah
|
||||
$('select#jenis_pegawai, select#unit_kerja, select#tahun, select#bulan').on('change', function() {
|
||||
$('select#jenis_pegawai, select#unit_kerja, select#tahun, select#bulan, #include_pppk_2025').on('change', function() {
|
||||
table.ajax.reload();
|
||||
tableSelisih.ajax.reload();
|
||||
});
|
||||
|
||||
// Filter Jenis Selisih hanya berlaku untuk tabel Selisih
|
||||
$('select#jenis_selisih').on('change', function() {
|
||||
tableSelisih.ajax.reload();
|
||||
});
|
||||
|
||||
$('a.export').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var button = $(this);
|
||||
@@ -367,11 +385,14 @@
|
||||
data: { _token: '{{ csrf_token() }}', nip: $('#userId').val(), nama: $('#username').val(), tahun: tahun, bulan: bulan, jenis_pegawai: jenisPegawai, unit_kerja: unitKerja, status: 'success', message: 'Export Excel berhasil' },
|
||||
});
|
||||
|
||||
var includePppk2025 = $('#include_pppk_2025').is(':checked') ? 1 : 0;
|
||||
|
||||
var exportUrl = "{{ route('remunerasi.p1.export') }}"
|
||||
+ '?tahun=' + encodeURIComponent(tahun)
|
||||
+ '&bulan=' + encodeURIComponent(bulan)
|
||||
+ '&jenis_pegawai=' + encodeURIComponent(jenisPegawai)
|
||||
+ '&unit_kerja=' + encodeURIComponent(unitKerja);
|
||||
+ '&unit_kerja=' + encodeURIComponent(unitKerja)
|
||||
+ '&include_pppk_2025=' + encodeURIComponent(includePppk2025);
|
||||
|
||||
fetch(exportUrl)
|
||||
.then(function(response) {
|
||||
@@ -418,6 +439,8 @@
|
||||
d.jenis_pegawai = $('select#jenis_pegawai').val();
|
||||
d.tahun = $('select#tahun').val();
|
||||
d.bulan = $('select#bulan').val();
|
||||
d.jenis_selisih = $('select#jenis_selisih').val();
|
||||
d.include_pppk_2025 = $('#include_pppk_2025').is(':checked') ? 1 : 0;
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
@@ -444,11 +467,22 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'selisih_bruto', name: 'selisih_bruto', orderable: false, searchable: false, width: '13%',
|
||||
data: 'jenis_selisih', name: 'jenis_selisih', orderable: false, searchable: false, width: '18%',
|
||||
render: function(data, type, row) {
|
||||
if (type !== 'display') { return data; }
|
||||
return renderKeteranganCell(row.jenis_selisih);
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'selisih_bruto', name: 'selisih_bruto', orderable: false, searchable: false, width: '11%',
|
||||
render: function(data) { return renderRupiah(data); }
|
||||
},
|
||||
{
|
||||
data: 'selisih_netto', name: 'selisih_netto', orderable: false, searchable: false, width: '13%',
|
||||
data: 'selisih_pajak', name: 'selisih_pajak', orderable: false, searchable: false, width: '11%',
|
||||
render: function(data) { return renderRupiah(data); }
|
||||
},
|
||||
{
|
||||
data: 'selisih_netto', name: 'selisih_netto', orderable: false, searchable: false, width: '11%',
|
||||
render: function(data) { return renderRupiah(data); }
|
||||
},
|
||||
{ data: 'detail', name: 'detail', visible: false, orderable: false, searchable: false }
|
||||
@@ -457,7 +491,7 @@
|
||||
language: { processing: "<div class='spinner'></div> Sedang Memuat..." }
|
||||
});
|
||||
|
||||
$('#p1-selisih tbody').on('click', 'td.nama-col', function() {
|
||||
$('#p1-selisih tbody').on('click', 'tr', function() {
|
||||
var row = tableSelisih.row($(this).closest('tr')).data();
|
||||
if (!row) { return; }
|
||||
|
||||
@@ -468,16 +502,91 @@
|
||||
$('#detail-selisih-nip').text(row.nip || '-');
|
||||
$('#detail-selisih-unit').text(row.nama_unit || '-');
|
||||
$('#detail-selisih-jenis').text(row.jenis_pegawai || '-');
|
||||
$('#detail-p1-lama-jafung').text(detail.p1_lama_jafung || '-');
|
||||
$('#detail-p1-lama-jtt').text(detail.p1_lama_jtt || '-');
|
||||
$('#detail-p1-lama-bruto').text(detail.p1_lama_bruto || '-');
|
||||
$('#detail-p1-lama-netto').text(detail.p1_lama_netto || '-');
|
||||
$('#detail-p1-baru-jafung').text(detail.p1_baru_jafung || '-');
|
||||
$('#detail-p1-baru-jtt').text(detail.p1_baru_jtt || '-');
|
||||
$('#detail-p1-baru-bruto').text(detail.p1_baru_bruto || '-');
|
||||
$('#detail-p1-baru-netto').text(detail.p1_baru_netto || '-');
|
||||
$('#detail-selisih-bruto').text(detail.selisih_bruto || '-');
|
||||
$('#detail-selisih-netto').text(detail.selisih_netto || '-');
|
||||
|
||||
var riwayat = detail.riwayat || [];
|
||||
var container = $('#detail-riwayat-container').empty();
|
||||
|
||||
if (!riwayat.length) {
|
||||
container.append('<p class="text-muted fst-italic mb-0">Tidak ada riwayat pembayaran.</p>');
|
||||
} else {
|
||||
riwayat.forEach(function(item, idx) {
|
||||
var block = $(
|
||||
'<div class="border rounded-3 p-3 mb-4">' +
|
||||
'<div class="fw-bold mb-3">Index ' + (idx + 1) + '</div>' +
|
||||
'<div class="card mb-2 border border-danger border-2">' +
|
||||
'<div class="card-header bg-danger text-white fw-bold py-1">P1 yang Dibayarkan</div>' +
|
||||
'<table class="table table-sm table-bordered mb-0">' +
|
||||
'<tbody>' +
|
||||
'<tr><th width="35%">Jabatan Fungsional</th><td class="detail-riwayat-lama-jafung">-</td></tr>' +
|
||||
'<tr><th>Jabatan Tugas Tambahan</th><td class="detail-riwayat-lama-jtt">-</td></tr>' +
|
||||
'<tr><th>Status Pegawai</th><td class="detail-riwayat-lama-status-pegawai">-</td></tr>' +
|
||||
'<tr><th>Golongan</th><td class="detail-riwayat-lama-golongan">-</td></tr>' +
|
||||
'<tr><th>Bruto</th><td class="detail-riwayat-lama-bruto">-</td></tr>' +
|
||||
'<tr><th>Pajak</th><td class="detail-riwayat-lama-pajak">-</td></tr>' +
|
||||
'<tr><th>Netto</th><td class="detail-riwayat-lama-netto">-</td></tr>' +
|
||||
'</tbody>' +
|
||||
'</table>' +
|
||||
'</div>' +
|
||||
'<div class="card mb-2 border border-primary border-2">' +
|
||||
'<div class="card-header bg-primary text-white fw-bold py-1">P1 yang seharusnya Dibayarkan</div>' +
|
||||
'<table class="table table-sm table-bordered mb-0">' +
|
||||
'<tbody>' +
|
||||
'<tr><th width="35%">Jabatan Fungsional</th><td class="detail-riwayat-baru-jafung">-</td></tr>' +
|
||||
'<tr><th>Jabatan Tugas Tambahan</th><td class="detail-riwayat-baru-jtt">-</td></tr>' +
|
||||
'<tr><th>Status Pegawai</th><td class="detail-riwayat-baru-status-pegawai">-</td></tr>' +
|
||||
'<tr><th>Golongan</th><td class="detail-riwayat-baru-golongan">-</td></tr>' +
|
||||
'<tr><th>Bruto</th><td class="detail-riwayat-baru-bruto">-</td></tr>' +
|
||||
'<tr><th>Pajak</th><td class="detail-riwayat-baru-pajak">-</td></tr>' +
|
||||
'<tr><th>Netto</th><td class="detail-riwayat-baru-netto">-</td></tr>' +
|
||||
'</tbody>' +
|
||||
'</table>' +
|
||||
'</div>' +
|
||||
'<div class="fw-bold mb-2">P1 Selisih</div>' +
|
||||
'<table class="table table-sm table-bordered mb-0">' +
|
||||
'<tbody>' +
|
||||
'<tr><th width="35%">Keterangan</th><td class="detail-riwayat-keterangan">-</td></tr>' +
|
||||
'<tr><th>Selisih Bruto</th><td class="detail-riwayat-selisih-bruto">-</td></tr>' +
|
||||
'<tr><th>Selisih Pajak</th><td class="detail-riwayat-selisih-pajak">-</td></tr>' +
|
||||
'<tr><th>Selisih Netto</th><td class="detail-riwayat-selisih-netto">-</td></tr>' +
|
||||
'</tbody>' +
|
||||
'</table>' +
|
||||
'</div>'
|
||||
);
|
||||
|
||||
var p1Lama = item.p1_lama || {};
|
||||
var p1Baru = item.p1_baru || {};
|
||||
|
||||
block.find('.detail-riwayat-lama-jafung').text(p1Lama.jafung || '-');
|
||||
block.find('.detail-riwayat-lama-jtt').text(p1Lama.jtt || '-');
|
||||
block.find('.detail-riwayat-lama-status-pegawai').text((p1Lama.status_pegawai || '-').toUpperCase());
|
||||
block.find('.detail-riwayat-lama-golongan').text(p1Lama.golongan || '-');
|
||||
block.find('.detail-riwayat-lama-bruto').text(p1Lama.bruto || '-');
|
||||
block.find('.detail-riwayat-lama-pajak').text(p1Lama.pajak || '-');
|
||||
block.find('.detail-riwayat-lama-netto').text(p1Lama.netto || '-');
|
||||
block.find('.detail-riwayat-baru-jafung').text(p1Baru.jafung || '-');
|
||||
block.find('.detail-riwayat-baru-jtt').text(p1Baru.jtt || '-');
|
||||
block.find('.detail-riwayat-baru-status-pegawai').text((p1Baru.status_pegawai || '-').toUpperCase());
|
||||
block.find('.detail-riwayat-baru-golongan').text(p1Baru.golongan || '-');
|
||||
block.find('.detail-riwayat-baru-bruto').text(p1Baru.bruto || '-');
|
||||
block.find('.detail-riwayat-baru-pajak').text(p1Baru.pajak || '-');
|
||||
block.find('.detail-riwayat-baru-netto').text(p1Baru.netto || '-');
|
||||
|
||||
['jafung', 'jtt', 'status_pegawai', 'golongan', 'bruto', 'pajak', 'netto'].forEach(function(field) {
|
||||
var lamaVal = p1Lama[field] || '-';
|
||||
var baruVal = p1Baru[field] || '-';
|
||||
if (lamaVal !== baruVal) {
|
||||
block.find('.detail-riwayat-baru-' + field.replace('_', '-')).addClass('bg-tosca');
|
||||
}
|
||||
});
|
||||
|
||||
block.find('.detail-riwayat-keterangan').html(renderJenisSelisihBadge(item.keterangan));
|
||||
block.find('.detail-riwayat-selisih-bruto').text(item.selisih_bruto || '-');
|
||||
block.find('.detail-riwayat-selisih-pajak').text(item.selisih_pajak || '-');
|
||||
block.find('.detail-riwayat-selisih-netto').text(item.selisih_netto || '-');
|
||||
|
||||
container.append(block);
|
||||
});
|
||||
}
|
||||
|
||||
new bootstrap.Modal(document.getElementById('detailSelisihP1Modal')).show();
|
||||
});
|
||||
@@ -505,11 +614,14 @@
|
||||
data: { _token: '{{ csrf_token() }}', nip: $('#userId').val(), nama: $('#username').val(), tahun: tahun, bulan: bulan, jenis_pegawai: jenisPegawai, unit_kerja: unitKerja, status: 'success', message: 'Export Excel Selisih berhasil' },
|
||||
});
|
||||
|
||||
var includePppk2025 = $('#include_pppk_2025').is(':checked') ? 1 : 0;
|
||||
|
||||
var exportUrl = "{{ route('remunerasi.p1.export-selisih') }}"
|
||||
+ '?tahun=' + encodeURIComponent(tahun)
|
||||
+ '&bulan=' + encodeURIComponent(bulan)
|
||||
+ '&jenis_pegawai=' + encodeURIComponent(jenisPegawai)
|
||||
+ '&unit_kerja=' + encodeURIComponent(unitKerja);
|
||||
+ '&unit_kerja=' + encodeURIComponent(unitKerja)
|
||||
+ '&include_pppk_2025=' + encodeURIComponent(includePppk2025);
|
||||
|
||||
fetch(exportUrl)
|
||||
.then(function(response) {
|
||||
|
||||
@@ -59,34 +59,39 @@
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.step-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
padding: 0.6rem 0.75rem;
|
||||
border-left: 3px solid #0d6efd;
|
||||
background-color: #f8f9ff;
|
||||
border-radius: 0 6px 6px 0;
|
||||
margin-bottom: 0.4rem;
|
||||
font-size: 0.85rem;
|
||||
color: #212529;
|
||||
.formula-steps {
|
||||
list-style: disc;
|
||||
padding-left: 18px;
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.step-item .step-badge {
|
||||
flex-shrink: 0;
|
||||
color: #0d6efd;
|
||||
font-size: 1rem;
|
||||
.formula-result {
|
||||
color: #1565c0 !important;
|
||||
font-weight: 700;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.step-item code {
|
||||
background: none;
|
||||
padding: 0;
|
||||
font-size: 0.83rem;
|
||||
color: #1a1a2e;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
word-break: break-word;
|
||||
.formula-section-box {
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 6px;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.formula-section-box:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.formula-label {
|
||||
color: #0f766e;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.formula-number {
|
||||
color: #b45309;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
@@ -200,6 +205,14 @@
|
||||
<!-- Selisih Tab Pane -->
|
||||
<div class="tab-pane fade" id="selisih-tab-pane" role="tabpanel" aria-labelledby="selisih-tab"
|
||||
tabindex="0">
|
||||
<div class="d-flex gap-2 mb-3">
|
||||
<select name="jenis_selisih" id="jenis_selisih" class="form-select select2"
|
||||
data-placeholder="Pilih Jenis Selisih" style="max-width: 250px;">
|
||||
<option value=""></option>
|
||||
<option value="kekurangan">Kekurangan</option>
|
||||
<option value="kelebihan">Kelebihan</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- Tabel Data Selisih -->
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered w-100 dt-styled" id="r13-selisih">
|
||||
@@ -207,9 +220,10 @@
|
||||
<tr>
|
||||
<th>Pegawai</th>
|
||||
<th>Unit Kerja</th>
|
||||
<th class="text-center">R13</th>
|
||||
<th class="text-center">Pajak</th>
|
||||
<th class="text-center">Total</th>
|
||||
<th>Keterangan</th>
|
||||
<th class="text-center">Selisih Bruto</th>
|
||||
<th class="text-center">Selisih Pajak</th>
|
||||
<th class="text-center">Selisih Netto</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -225,9 +239,9 @@
|
||||
<div class="modal fade" id="detailR13Modal" tabindex="-1" aria-labelledby="detailR13ModalLabel" aria-hidden="true" data-bs-backdrop="static">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="modal-header bg-primary text-white">
|
||||
<h5 class="modal-title" id="detailR13ModalLabel">Detail R13 Pegawai</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- Info Pegawai -->
|
||||
@@ -318,6 +332,75 @@
|
||||
return '<div class="d-flex justify-content-between gap-1 nominal-cell"><span>Rp.</span><span>' + number + '</span></div>';
|
||||
}
|
||||
|
||||
function escapeHtml(str) {
|
||||
return String(str)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
|
||||
function renderFormulaStepHtml(step) {
|
||||
var text = String(step);
|
||||
var colonIdx = text.indexOf(':');
|
||||
var label = null;
|
||||
var rest = text;
|
||||
|
||||
if (colonIdx > -1) {
|
||||
label = text.slice(0, colonIdx);
|
||||
rest = text.slice(colonIdx + 1);
|
||||
}
|
||||
|
||||
var restHtml = escapeHtml(rest).replace(/-?\d+(?:[.,]\d+)?/g, '<span class="formula-number">$&</span>');
|
||||
|
||||
if (label !== null) {
|
||||
return '<span class="formula-label">' + escapeHtml(label) + '</span>:' + restHtml;
|
||||
}
|
||||
|
||||
return restHtml;
|
||||
}
|
||||
|
||||
function renderFormulaSteps(container, steps) {
|
||||
container.empty();
|
||||
|
||||
if (!steps.length) {
|
||||
container.append('<p class="text-muted fst-italic mb-0">Tidak ada langkah perhitungan.</p>');
|
||||
return;
|
||||
}
|
||||
|
||||
var groups = [];
|
||||
var currentGroup = [];
|
||||
|
||||
steps.forEach(function(step, index) {
|
||||
if (!step || !String(step).trim()) {
|
||||
if (currentGroup.length) {
|
||||
groups.push(currentGroup);
|
||||
currentGroup = [];
|
||||
}
|
||||
return;
|
||||
}
|
||||
currentGroup.push({ step: step, isLast: index === steps.length - 1 });
|
||||
});
|
||||
if (currentGroup.length) {
|
||||
groups.push(currentGroup);
|
||||
}
|
||||
|
||||
groups.forEach(function(group) {
|
||||
var box = $('<div class="formula-section-box"></div>');
|
||||
var ul = $('<ul class="formula-steps"></ul>');
|
||||
group.forEach(function(item) {
|
||||
var li;
|
||||
if (item.isLast) {
|
||||
li = $('<li class="formula-result"></li>').text(item.step);
|
||||
} else {
|
||||
li = $('<li></li>').html(renderFormulaStepHtml(item.step));
|
||||
}
|
||||
ul.append(li);
|
||||
});
|
||||
box.append(ul);
|
||||
container.append(box);
|
||||
});
|
||||
}
|
||||
|
||||
function renderJenisPegawaiTag(jenis) {
|
||||
var config = {
|
||||
'Dosen': { color: 'var(--ct-primary)', rgb: 'var(--ct-primary-rgb)', icon: 'uil-user-graduate' },
|
||||
@@ -343,6 +426,16 @@
|
||||
'</div>';
|
||||
}
|
||||
|
||||
function renderJenisSelisihBadge(jenis) {
|
||||
if (jenis === 'Kekurangan') {
|
||||
return '<span class="text-danger fw-semibold">Kekurangan</span>';
|
||||
}
|
||||
if (jenis === 'Kelebihan') {
|
||||
return '<span class="text-warning fw-semibold">Kelebihan</span>';
|
||||
}
|
||||
return '<span class="text-muted">-</span>';
|
||||
}
|
||||
|
||||
// Toggle export buttons based on active tab
|
||||
$('#r13Tabs button[data-bs-toggle="tab"]').on('shown.bs.tab', function(e) {
|
||||
if ($(e.target).attr('id') === 'main-tab') {
|
||||
@@ -462,65 +555,7 @@
|
||||
$('#detail-r13-p2').text(formatRupiah(r13P2.harga_r13_p2));
|
||||
$('#detail-r13-p2-pajak').text(formatRupiah(r13P2.harga_r13_p2_setelah_pajak));
|
||||
|
||||
var stepsList = $('#detail-steps').empty();
|
||||
var steps = detail.steps || [];
|
||||
if (steps.length > 0) {
|
||||
steps.forEach(function(step) {
|
||||
stepsList.append(
|
||||
'<div class="step-item">' +
|
||||
'<span class="step-badge">►</span>' +
|
||||
'<code>' + step + '</code>' +
|
||||
'</div>'
|
||||
);
|
||||
});
|
||||
} else {
|
||||
stepsList.append('<p class="text-muted fst-italic mb-0">Tidak ada langkah perhitungan.</p>');
|
||||
}
|
||||
|
||||
$('#detailR13Modal').modal('show');
|
||||
});
|
||||
|
||||
// Klik row selisih untuk buka detail modal
|
||||
$('#r13-selisih tbody').on('click', 'tr', function() {
|
||||
var rowData = tableSelisih.row(this).data();
|
||||
if (!rowData) {
|
||||
return;
|
||||
}
|
||||
|
||||
var detail = typeof rowData.detail === 'string' ? JSON.parse(rowData.detail) : rowData.detail;
|
||||
|
||||
$('#detail-nama').text(rowData.nama || '-');
|
||||
$('#detail-nip').text(rowData.nip || '-');
|
||||
$('#detail-unit').text(rowData.nama_unit || '-');
|
||||
$('#detail-jafung').text(detail.jabatan_fungsional || '-');
|
||||
$('#detail-jtt').text(detail.jabatan_tugas_tambahan || '-');
|
||||
$('#detail-golongan').text(detail.golongan || '-');
|
||||
$('#detail-status-pegawai').text(detail.status_pegawai ? detail.status_pegawai.toUpperCase() : '-');
|
||||
$('#detail-faktor').text(detail.faktor || '-');
|
||||
$('#detail-poin-p2').text(detail.poin_p2 || '-');
|
||||
|
||||
var r13P1 = detail.r13_p1 || {};
|
||||
$('#detail-r13-p1').text(formatRupiah(r13P1.harga_r13_p1));
|
||||
$('#detail-r13-p1-pajak').text(formatRupiah(r13P1.harga_r13_p1_setelah_pajak));
|
||||
|
||||
var r13P2 = detail.r13_p2 || {};
|
||||
$('#detail-r13-p2').text(formatRupiah(r13P2.harga_r13_p2));
|
||||
$('#detail-r13-p2-pajak').text(formatRupiah(r13P2.harga_r13_p2_setelah_pajak));
|
||||
|
||||
var stepsList = $('#detail-steps').empty();
|
||||
var steps = detail.steps || [];
|
||||
if (steps.length > 0) {
|
||||
steps.forEach(function(step) {
|
||||
stepsList.append(
|
||||
'<div class="step-item">' +
|
||||
'<span class="step-badge">►</span>' +
|
||||
'<code>' + step + '</code>' +
|
||||
'</div>'
|
||||
);
|
||||
});
|
||||
} else {
|
||||
stepsList.append('<p class="text-muted fst-italic mb-0">Tidak ada langkah perhitungan.</p>');
|
||||
}
|
||||
renderFormulaSteps($('#detail-steps'), detail.steps || []);
|
||||
|
||||
$('#detailR13Modal').modal('show');
|
||||
});
|
||||
@@ -537,6 +572,7 @@
|
||||
@endif
|
||||
d.jenis_pegawai = $('select#jenis_pegawai').val();
|
||||
d.tahun = $('select#tahun').val();
|
||||
d.jenis_selisih = $('select#jenis_selisih').val();
|
||||
}
|
||||
},
|
||||
columns: [{
|
||||
@@ -560,6 +596,17 @@
|
||||
return data;
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'jenis_selisih',
|
||||
name: 'jenis_selisih',
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
width: '12%',
|
||||
render: function(data, type) {
|
||||
if (type !== 'display') { return data; }
|
||||
return renderJenisSelisihBadge(data);
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'selisih_r13_formatted',
|
||||
name: 'selisih_r13_formatted',
|
||||
@@ -592,12 +639,49 @@
|
||||
scrollX: true
|
||||
});
|
||||
|
||||
// Klik row selisih untuk buka detail modal
|
||||
$('#r13-selisih tbody').on('click', 'tr', function() {
|
||||
var rowData = tableSelisih.row(this).data();
|
||||
if (!rowData) {
|
||||
return;
|
||||
}
|
||||
|
||||
var detail = typeof rowData.detail === 'string' ? JSON.parse(rowData.detail) : rowData.detail;
|
||||
|
||||
$('#detail-nama').text(rowData.nama || '-');
|
||||
$('#detail-nip').text(rowData.nip || '-');
|
||||
$('#detail-unit').text(rowData.nama_unit || '-');
|
||||
$('#detail-jafung').text(detail.jabatan_fungsional || '-');
|
||||
$('#detail-jtt').text(detail.jabatan_tugas_tambahan || '-');
|
||||
$('#detail-golongan').text(detail.golongan || '-');
|
||||
$('#detail-status-pegawai').text(detail.status_pegawai ? detail.status_pegawai.toUpperCase() : '-');
|
||||
$('#detail-faktor').text(detail.faktor || '-');
|
||||
$('#detail-poin-p2').text(detail.poin_p2 || '-');
|
||||
|
||||
var r13P1 = detail.r13_p1 || {};
|
||||
$('#detail-r13-p1').text(formatRupiah(r13P1.harga_r13_p1));
|
||||
$('#detail-r13-p1-pajak').text(formatRupiah(r13P1.harga_r13_p1_setelah_pajak));
|
||||
|
||||
var r13P2 = detail.r13_p2 || {};
|
||||
$('#detail-r13-p2').text(formatRupiah(r13P2.harga_r13_p2));
|
||||
$('#detail-r13-p2-pajak').text(formatRupiah(r13P2.harga_r13_p2_setelah_pajak));
|
||||
|
||||
renderFormulaSteps($('#detail-steps'), detail.steps || []);
|
||||
|
||||
$('#detailR13Modal').modal('show');
|
||||
});
|
||||
|
||||
// Reload kedua tabel saat dropdown berubah
|
||||
$('select#jenis_pegawai, select#unit_kerja, select#tahun').on('change', function() {
|
||||
table.ajax.reload();
|
||||
tableSelisih.ajax.reload();
|
||||
});
|
||||
|
||||
// Filter Jenis Selisih hanya berlaku untuk tabel Selisih
|
||||
$('select#jenis_selisih').on('change', function() {
|
||||
tableSelisih.ajax.reload();
|
||||
});
|
||||
|
||||
// Export Main
|
||||
$('a.export').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -72,34 +72,39 @@
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.step-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
padding: 0.6rem 0.75rem;
|
||||
border-left: 3px solid #0d6efd;
|
||||
background-color: #f8f9ff;
|
||||
border-radius: 0 6px 6px 0;
|
||||
margin-bottom: 0.4rem;
|
||||
font-size: 0.85rem;
|
||||
color: #212529;
|
||||
.formula-steps {
|
||||
list-style: disc;
|
||||
padding-left: 18px;
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.step-item .step-badge {
|
||||
flex-shrink: 0;
|
||||
color: #0d6efd;
|
||||
font-size: 1rem;
|
||||
.formula-result {
|
||||
color: #1565c0 !important;
|
||||
font-weight: 700;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.step-item code {
|
||||
background: none;
|
||||
padding: 0;
|
||||
font-size: 0.83rem;
|
||||
color: #1a1a2e;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
word-break: break-word;
|
||||
.formula-section-box {
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 6px;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.formula-section-box:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.formula-label {
|
||||
color: #0f766e;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.formula-number {
|
||||
color: #b45309;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
@@ -213,6 +218,14 @@
|
||||
<!-- Selisih Tab Pane -->
|
||||
<div class="tab-pane fade" id="selisih-tab-pane" role="tabpanel" aria-labelledby="selisih-tab"
|
||||
tabindex="0">
|
||||
<div class="d-flex gap-2 mb-3">
|
||||
<select name="jenis_selisih" id="jenis_selisih" class="form-select select2"
|
||||
data-placeholder="Pilih Jenis Selisih" style="max-width: 250px;">
|
||||
<option value=""></option>
|
||||
<option value="kekurangan">Kekurangan</option>
|
||||
<option value="kelebihan">Kelebihan</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- Tabel Data Selisih -->
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered w-100 dt-styled" id="thr-selisih">
|
||||
@@ -220,9 +233,10 @@
|
||||
<tr>
|
||||
<th>Pegawai</th>
|
||||
<th>Unit Kerja</th>
|
||||
<th class="text-center">THR</th>
|
||||
<th class="text-center">Pajak</th>
|
||||
<th class="text-center">Total</th>
|
||||
<th>Keterangan</th>
|
||||
<th class="text-center">Selisih Bruto</th>
|
||||
<th class="text-center">Selisih Pajak</th>
|
||||
<th class="text-center">Selisih Netto</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -238,9 +252,9 @@
|
||||
<div class="modal fade" id="detailThrModal" tabindex="-1" aria-labelledby="detailThrModalLabel" aria-hidden="true" data-bs-backdrop="static">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="modal-header bg-primary text-white">
|
||||
<h5 class="modal-title" id="detailThrModalLabel">Detail THR Pegawai</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- Info Pegawai -->
|
||||
@@ -331,6 +345,75 @@
|
||||
return '<div class="d-flex justify-content-between gap-1 nominal-cell"><span>Rp.</span><span>' + number + '</span></div>';
|
||||
}
|
||||
|
||||
function escapeHtml(str) {
|
||||
return String(str)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
|
||||
function renderFormulaStepHtml(step) {
|
||||
var text = String(step);
|
||||
var colonIdx = text.indexOf(':');
|
||||
var label = null;
|
||||
var rest = text;
|
||||
|
||||
if (colonIdx > -1) {
|
||||
label = text.slice(0, colonIdx);
|
||||
rest = text.slice(colonIdx + 1);
|
||||
}
|
||||
|
||||
var restHtml = escapeHtml(rest).replace(/-?\d+(?:[.,]\d+)?/g, '<span class="formula-number">$&</span>');
|
||||
|
||||
if (label !== null) {
|
||||
return '<span class="formula-label">' + escapeHtml(label) + '</span>:' + restHtml;
|
||||
}
|
||||
|
||||
return restHtml;
|
||||
}
|
||||
|
||||
function renderFormulaSteps(container, steps) {
|
||||
container.empty();
|
||||
|
||||
if (!steps.length) {
|
||||
container.append('<p class="text-muted fst-italic mb-0">Tidak ada langkah perhitungan.</p>');
|
||||
return;
|
||||
}
|
||||
|
||||
var groups = [];
|
||||
var currentGroup = [];
|
||||
|
||||
steps.forEach(function(step, index) {
|
||||
if (!step || !String(step).trim()) {
|
||||
if (currentGroup.length) {
|
||||
groups.push(currentGroup);
|
||||
currentGroup = [];
|
||||
}
|
||||
return;
|
||||
}
|
||||
currentGroup.push({ step: step, isLast: index === steps.length - 1 });
|
||||
});
|
||||
if (currentGroup.length) {
|
||||
groups.push(currentGroup);
|
||||
}
|
||||
|
||||
groups.forEach(function(group) {
|
||||
var box = $('<div class="formula-section-box"></div>');
|
||||
var ul = $('<ul class="formula-steps"></ul>');
|
||||
group.forEach(function(item) {
|
||||
var li;
|
||||
if (item.isLast) {
|
||||
li = $('<li class="formula-result"></li>').text(item.step);
|
||||
} else {
|
||||
li = $('<li></li>').html(renderFormulaStepHtml(item.step));
|
||||
}
|
||||
ul.append(li);
|
||||
});
|
||||
box.append(ul);
|
||||
container.append(box);
|
||||
});
|
||||
}
|
||||
|
||||
function renderJenisPegawaiTag(jenis) {
|
||||
var config = {
|
||||
'Dosen': { color: 'var(--ct-primary)', rgb: 'var(--ct-primary-rgb)', icon: 'uil-user-graduate' },
|
||||
@@ -356,6 +439,16 @@
|
||||
'</div>';
|
||||
}
|
||||
|
||||
function renderJenisSelisihBadge(jenis) {
|
||||
if (jenis === 'Kekurangan') {
|
||||
return '<span class="text-danger fw-semibold">Kekurangan</span>';
|
||||
}
|
||||
if (jenis === 'Kelebihan') {
|
||||
return '<span class="text-warning fw-semibold">Kelebihan</span>';
|
||||
}
|
||||
return '<span class="text-muted">-</span>';
|
||||
}
|
||||
|
||||
// Toggle export buttons based on active tab
|
||||
$('#thrTabs button[data-bs-toggle="tab"]').on('shown.bs.tab', function(e) {
|
||||
if ($(e.target).attr('id') === 'main-tab') {
|
||||
@@ -475,20 +568,7 @@
|
||||
$('#detail-thr-p2').text(formatRupiah(thrP2.harga_thr_p2));
|
||||
$('#detail-thr-p2-pajak').text(formatRupiah(thrP2.harga_thr_p2_setelah_pajak));
|
||||
|
||||
var stepsList = $('#detail-steps').empty();
|
||||
var steps = detail.steps || [];
|
||||
if (steps.length > 0) {
|
||||
steps.forEach(function(step, index) {
|
||||
stepsList.append(
|
||||
'<div class="step-item">' +
|
||||
'<span class="step-badge">►</span>' +
|
||||
'<code>' + step + '</code>' +
|
||||
'</div>'
|
||||
);
|
||||
});
|
||||
} else {
|
||||
stepsList.append('<p class="text-muted fst-italic mb-0">Tidak ada langkah perhitungan.</p>');
|
||||
}
|
||||
renderFormulaSteps($('#detail-steps'), detail.steps || []);
|
||||
|
||||
$('#detailThrModal').modal('show');
|
||||
});
|
||||
@@ -505,6 +585,7 @@
|
||||
@endif
|
||||
d.jenis_pegawai = $('select#jenis_pegawai').val();
|
||||
d.tahun = $('select#tahun').val();
|
||||
d.jenis_selisih = $('select#jenis_selisih').val();
|
||||
}
|
||||
},
|
||||
columns: [{
|
||||
@@ -528,6 +609,17 @@
|
||||
return data;
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'jenis_selisih',
|
||||
name: 'jenis_selisih',
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
width: '12%',
|
||||
render: function(data, type) {
|
||||
if (type !== 'display') { return data; }
|
||||
return renderJenisSelisihBadge(data);
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'selisih_thr_formatted',
|
||||
name: 'selisih_thr_formatted',
|
||||
@@ -587,20 +679,7 @@
|
||||
$('#detail-thr-p2').text(formatRupiah(thrP2.harga_thr_p2));
|
||||
$('#detail-thr-p2-pajak').text(formatRupiah(thrP2.harga_thr_p2_setelah_pajak));
|
||||
|
||||
var stepsList = $('#detail-steps').empty();
|
||||
var steps = detail.steps || [];
|
||||
if (steps.length > 0) {
|
||||
steps.forEach(function(step, index) {
|
||||
stepsList.append(
|
||||
'<div class="step-item">' +
|
||||
'<span class="step-badge">►</span>' +
|
||||
'<code>' + step + '</code>' +
|
||||
'</div>'
|
||||
);
|
||||
});
|
||||
} else {
|
||||
stepsList.append('<p class="text-muted fst-italic mb-0">Tidak ada langkah perhitungan.</p>');
|
||||
}
|
||||
renderFormulaSteps($('#detail-steps'), detail.steps || []);
|
||||
|
||||
$('#detailThrModal').modal('show');
|
||||
});
|
||||
@@ -611,6 +690,11 @@
|
||||
tableSelisih.ajax.reload();
|
||||
});
|
||||
|
||||
// Filter Jenis Selisih hanya berlaku untuk tabel Selisih
|
||||
$('select#jenis_selisih').on('change', function() {
|
||||
tableSelisih.ajax.reload();
|
||||
});
|
||||
|
||||
// Export Main
|
||||
$('a.export').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user