You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

405 lines
19 KiB

<!-- <style>
.table-bordered td {
word-break: break-word;
}
</style> -->
<?php
$tahun2 = date('Y');
$rentang_tahun = range($tahun2, 2022);
$hariini = date('d-m-y');
?>
<div class="main-content">
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 mb-2">
<div class="card">
<div class="card-header">
<h3>Pilih :</h3>
<div class="card-header-right">
<ul class="list-unstyled card-option">
<li><i class="ik ik-chevron-left action-toggle"></i></li>
<li><i class="ik ik-minus minimize-card"></i></li>
<li><i class="ik ik-x close-card"></i></li>
</ul>
</div>
</div>
<div class="card-body">
<form class="form-sample" action="<?php base_url('Kanwil/index') ?>" method="get">
<?php if (session('tpkantor') == 'KPDJP') {
$disabledslct = "";
} else {
$disabledslct = "disabled";
}
if (session('tpkantor') == 'KPP') {
$disableslckpp = "disabled";
} else {
$disableslckpp = "";
}
?>
<div class="row row-cols-1 row-cols-md-2">
<div class="col-md-6 col-sm-12">
<label class="my-1 mr-2">Kanwil </label>
<select class="custom-select my-1 mr-sm-2" id="kwl" name="kwl" <?php echo $disabledslct ?>>
<?php
foreach ($selkwl as $row) {
if ($row->KODE == $kwlx) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option value=\"" . $row->KODE . "\" " . $sel . ">" . $row->KODE . " - " . $row->NAMA . "</option>";
}
?>
</select>
<label class="my-1 mr-2">KPP </label>
<select class="custom-select my-1 mr-sm-2" id="kpp" name="kpp" <?php echo $disableslckpp ?>>
</select>
<label class="my-1 mr-2">Seksi </label>
<select class="custom-select my-1 mr-sm-2" id="seksi" name="seksi">
</select>
<label class="my-1 mr-2">AR </label>
<select class="custom-select my-1 mr-sm-2" id="nip" name="nip">
</select>
</div>
<div class="col-md-6 col-sm-12">
<label class="my-1 mr-2">MAP </label>
<select class="custom-select my-1 mr-sm-2" id="kdmap" name="kdmap">
<?php
foreach ($selmap as $map) {
if ($map->KD_MAP == $mapx) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option value=\"" . $map->KD_MAP . "\" " . $sel . ">" . $map->KD_MAP . "-" . $map->NM_MAP . "</option>";
}
?>
</select>
<label class="my-1 mr-2">KJS </label>
<select class="custom-select my-1 mr-sm-2" id="kjs" name="kjs">
<option value="SEMUA">Semua</option>
<?php
foreach ($selkjs as $kjs) {
if ($kjs->KJS == $kjsx) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option value=\"" . $kjs->KJS . "\" " . $sel . ">" . $kjs->KJS . "</option>";
}
?>
</select>
<label class="my-1 mr-2">Tahun </label>
<select class="custom-select my-1 mr-sm-2" id="tahun" name="tahun">
<?php
foreach ($rentang_tahun as $tahun) {
if ($tahun == $tahunx) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option value=\"" . $tahun . "\" " . $sel . ">" . $tahun . "</option>";
}
?>
</select>
<button type="submit" class="btn btn-primary btn-lg active mt-5 float-right">Proses</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
<h3>Pengawasan Pembayaran Masa</h3>
<div class="card-header-right">
<ul class="list-unstyled card-option">
<li><i class="ik ik-chevron-left action-toggle"></i></li>
<li><i class="ik ik-minus minimize-card"></i></li>
<li><i class="ik ik-x close-card"></i></li>
</ul>
</div>
</div>
<div class="card-body">
<table class="table table-hover table-striped table-bordered tablesorter" id="tableppm">
<thead class='thead-dark'>
<tr class="table-active">
<th class="text-center">#</th>
<th class="text-center">NPWP</th>
<th class="text-center">Nama WP</th>
<th class="text-center">Januari</th>
<th class="text-center">Februari</th>
<th class="text-center">Maret</th>
<th class="text-center">April</th>
<th class="text-center">Mei</th>
<th class="text-center">Juni</th>
<th class="text-center">Juli</th>
<th class="text-center">Agustus</th>
<th class="text-center">September</th>
<th class="text-center">Oktober</th>
<th class="text-center">Nopember</th>
<th class="text-center">Desember</th>
<th class="text-center"><b>Jumlah</b></th>
</tr>
</thead>
<tbody>
<?php
$jumlah = 0;
foreach ($datppm as $row) {
if ($row['JAN'] == 0) {
$mkjan = "bg-danger text-white";
} else {
$mkjan = "";
}
if ($row['FEB'] == 0) {
$mkfeb = "bg-danger text-white";
} else {
$mkfeb = "";
}
if ($row['MAR'] == 0) {
$mkmar = "bg-danger text-white";
} else {
$mkmar = "";
}
if ($row['APR'] == 0) {
$mkapr = "bg-danger text-white";
} else {
$mkapr = "";
}
if ($row['MEI'] == 0) {
$mkmei = "bg-danger text-white";
} else {
$mkmei = "";
}
if ($row['JUN'] == 0) {
$mkjun = "bg-danger text-white";
} else {
$mkjun = "";
}
if ($row['JUL'] == 0) {
$mkjul = "bg-danger text-white";
} else {
$mkjul = "";
}
if ($row['AGU'] == 0) {
$mkagu = "bg-danger text-white";
} else {
$mkagu = "";
}
if ($row['SEP'] == 0) {
$mksep = "bg-danger text-white";
} else {
$mksep = "";
}
if ($row['OKT'] == 0) {
$mkokt = "bg-danger text-white";
} else {
$mkokt = "";
}
if ($row['NOP'] == 0) {
$mknop = "bg-danger text-white";
} else {
$mknop = "";
}
if ($row['DES'] == 0) {
$mkdes = "bg-danger text-white";
} else {
$mkdes = "";
}
$jumlah = $row['JAN'] + $row['FEB'] + $row['MAR'] + $row['APR'] + $row['MEI'] + $row['JUN'] + $row['JUL'] + $row['AGU'] + $row['SEP'] + $row['OKT'] + $row['NOP'] + $row['DES'];
?>
<tr>
<td class="text-center"><?= $nomor++ ?></td>
<td class="text-center"><?= $row['NPWP'] ?></td>
<td class="text-left"><?= $row['NAMA'] ?></td>
<td class="text-right <?= $mkjan ?>"><?= number_format($row['JAN'], 0, ',', '.') ?></td>
<td class="text-right <?= $mkfeb ?>"><?= number_format($row['FEB'], 0, ',', '.') ?></td>
<td class="text-right <?= $mkmar ?>"><?= number_format($row['MAR'], 0, ',', '.') ?></td>
<td class="text-right <?= $mkapr ?>"><?= number_format($row['APR'], 0, ',', '.') ?></td>
<td class="text-right <?= $mkmei ?>"><?= number_format($row['MEI'], 0, ',', '.') ?></td>
<td class="text-right <?= $mkjun ?>"><?= number_format($row['JUN'], 0, ',', '.') ?></td>
<td class="text-right <?= $mkjul ?>"><?= number_format($row['JUL'], 0, ',', '.') ?></td>
<td class="text-right <?= $mkagu ?>"><?= number_format($row['AGU'], 0, ',', '.') ?></td>
<td class="text-right <?= $mksep ?>"><?= number_format($row['SEP'], 0, ',', '.') ?></td>
<td class="text-right <?= $mkokt ?>"><?= number_format($row['OKT'], 0, ',', '.') ?></td>
<td class="text-right <?= $mknop ?>"><?= number_format($row['NOP'], 0, ',', '.') ?></td>
<td class="text-right <?= $mkdes ?>"><?= number_format($row['DES'], 0, ',', '.') ?></td>
<td class="text-right"><b><?= number_format($jumlah, 0, ',', '.') ?></b></td>
</tr>
<?php } ?>
</tbody>
</table>
<?= $pager->links('ppm', 'bootstrapag') ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo view('inc/js.php') ?>
<script>
$(document).ready(function() {
$('#kwl').change(function() {
if (kwl == '' || kwl == 'SEMUA') {
$('#kpp').attr('disabled', true);
} else {
$('#kpp').attr('disabled', false);
}
var kwl = $('#kwl').val();
var kpp = $('#kpp').val();
if (kwl != '') {
$.ajax({
url: "<?php echo base_url('/ref/getKPP'); ?>",
method: "POST",
data: {
kwl: kwl
},
dataType: "JSON",
success: function(data) {
$('select[name="kpp"]').empty();
$('select[name="kpp"]').append('<option value="SEMUA">Semua</option>');
$.each(data, function(key, value) {
$('select[name="kpp"]').append('<option value="' + value.KD_KPP + '">' + value.NM_KANTOR + '</option>');
});
<?php
if ($kppx != '') { ?>
$('#kpp').val('<?php echo $kppx ?>').change();
$('#seksi').change();
<?php } ?>
}
});
} else {
$('#kpp').val('');
}
});
<?php
if ($kwlx != '') { ?>
$('#kwl').val('<?php echo $kwlx ?>').change();
<?php } ?>
$('#kpp').change(function() {
var kpp = $('#kpp').val();
if (kpp == '' || kpp == 'SEMUA') {
$('#seksi').attr('disabled', true);
} else {
$('#seksi').attr('disabled', false);
}
if (seksi != '') {
$.ajax({
url: "<?php echo base_url('/ref/getSeksi'); ?>",
method: "POST",
data: {
kpp: kpp,
},
dataType: "JSON",
success: function(datas) {
$('select[name="seksi"]').empty();
$('select[name="seksi"]').append('<option value="SEMUA">Semua</option>');
$.each(datas, function(key, value) {
$('select[name="seksi"]').append('<option value="' + value.KODESIE + '">' + value.SEKSI + ' - ' + value.NAMA + '</option>');
});
<?php
if ($seksix != '') { ?>
$('#seksi').val('<?php echo $seksix ?>').change();
$('#nip').change();
<?php } ?>
}
});
} else {
$('#seksi').val('');
}
});
<?php
if ($kppx != '') { ?>
$('#kpp').change();
<?php } ?>
$('#seksi').change(function() {
var kpp = $('#kpp').val();
var seksi = $('#seksi').val();
var nip = $('#nip').val()
if (seksi == '' || seksi == 'SEMUA') {
$('#nip').attr('disabled', true);
} else {
$('#nip').attr('disabled', false);
}
if (seksi != '') {
$.ajax({
url: "<?php echo base_url('/ref/getAR'); ?>",
method: "POST",
data: {
kpp: kpp,
seksi: seksi
},
dataType: "JSON",
success: function(datas) {
$('select[name="nip"]').empty();
$('select[name="nip"]').append('<option value="SEMUA">Semua</option>');
$.each(datas, function(key, value) {
$('select[name="nip"]').append('<option value="' + value.NIP + '">' + value.NIP + ' - ' + value.NAMA + '</option>');
});
<?php
if ($nipx != '') { ?>
$('#nip').val('<?php echo $nipx ?>').change();
<?php } ?>
}
});
} else {
$('#nip').val('');
}
});
<?php
if ($seksix != '') { ?>
$('#seksi').change();
<?php } ?>
});
</script>