Rincian DAU
This commit is contained in:
@@ -20,11 +20,15 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="custom-tabs-four-detail-tab" data-toggle="pill" href="#custom-tabs-four-detail" role="tab" aria-controls="custom-tabs-four-detail" aria-selected="false">RINCIAN</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="custom-tabs-four-dau-tab" data-toggle="pill" href="#custom-tabs-four-dau" role="tab" aria-controls="custom-tabs-four-dau" aria-selected="false">REALISASI DAU</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content pt-2" id="custom-tabs-four-tabContent">
|
||||
<div class="tab-pane fade active show" id="custom-tabs-four-home" role="tabpanel" aria-labelledby="custom-tabs-four-home-tab">
|
||||
<div class="col-6">
|
||||
<div class="row">
|
||||
<div class="col-12"><h5>Semester 1</h5></div>
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label label-align" for="sk">Jumlah Realisasi</label>
|
||||
@@ -54,6 +58,7 @@
|
||||
<div class="tab-pane fade" id="custom-tabs-four-profile" role="tabpanel" aria-labelledby="custom-tabs-four-profile-tab">
|
||||
<div class="col-6">
|
||||
<div class="row">
|
||||
<div class="col-12"><h5>Semester 2</h5></div>
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label label-align" for="sk">Jumlah Realisasi</label>
|
||||
@@ -110,49 +115,45 @@
|
||||
<?php if (Auth::user()->can("Input Realisasi DBH Realisasi Belanja")){ ?>
|
||||
<a class="modalButton btn btn-success mb-2" title="Input Rincian" href="{{ url('/realisasi-belanja/'.$BelanjaRealisasi->id.'/inputRealisasi?type=rinci&redirect_link=/realisasi-belanja/'.$BelanjaRealisasi->id.'/submit') }}"><i class="fa fa-paper-plane"></i> Input Rincian</a>
|
||||
<?php } ?>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="custom-tabs-four-dau" role="tabpanel" aria-labelledby="custom-tabs-four-dau-tab">
|
||||
<div id="detail_dau">
|
||||
<h5>Detail DAU</h5>
|
||||
<form method="POST" id="frmDAU" action="{{ url('/realisasi-belanja/'.$BelanjaRealisasi->id.'/realisasi-dau') }}">
|
||||
@csrf
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
@csrf
|
||||
<h5 class="float-left">Detail DAU</h5>
|
||||
<h6 class="float-right"><span class="text-muted">Total Realisasi :</span><strong>{{ number_format($totalRealisasi) }}</strong></h6>
|
||||
<input type="hidden" id="totalRealisasi" value="{{ $totalRealisasi }}">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Uraian</th>
|
||||
<th>Anggaran</th>
|
||||
<th>Volume</th>
|
||||
<th>Satuan</th>
|
||||
<th>Realisasi</th>
|
||||
<th>Volume Realisasi</th>
|
||||
<th>Satuan Realisasi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($BelanjaRealisasiRinciDau as $k=>$rinciDau){ ?>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Uraian</th>
|
||||
<th>Anggaran</th>
|
||||
<th>Volume</th>
|
||||
<th>Satuan</th>
|
||||
<th>Realisasi</th>
|
||||
<th>Volume Realisasi</th>
|
||||
<th>Satuan Realisasi</th>
|
||||
<td>{{ ($k+1) }}</td>
|
||||
<td>{{ $rinciDau->deskripsi }}</td>
|
||||
<td>{{ separateNumberIndo($rinciDau->jml_anggaran) }}<input class="input_dau_anggaran" type="hidden" value="{{ $rinciDau->jml_anggaran }}"></td>
|
||||
<td>{{ $rinciDau->volume_satuan }}</td>
|
||||
<td>{{ $rinciDau->unit_satuan }}</td>
|
||||
<td>
|
||||
<input type="hidden" name="dau[id][]" value="{{ $rinciDau->id }}">
|
||||
<input type="text" class="form-control form-control-sm number-separator-indo input_dau input_dau_realisasi" name="dau[realisasi][]" value="{{ separateNumberIndo($rinciDau->jml_realisasi) }}">
|
||||
</td>
|
||||
<td><input type="number" class="form-control form-control-sm input_dau" name="dau[volume_realisasi][]" value="{{ $rinciDau->volume_satuan_realisasi }}"></td>
|
||||
<td><input name="dau[unit_realisasi][]" class="form-control form-control-sm input_dau" required placeholder="Unit Realisasi" readonly value="{{ $rinciDau->unit_satuan }}"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($BelanjaRealisasiRinciDau as $k=>$rinciDau){ ?>
|
||||
<tr>
|
||||
<td>{{ ($k+1) }}</td>
|
||||
<td>{{ $rinciDau->deskripsi }}</td>
|
||||
<td>{{ separateNumberIndo($rinciDau->jml_anggaran) }}<input class="input_dau_anggaran" type="hidden" value="{{ $rinciDau->jml_anggaran }}"></td>
|
||||
<td>{{ $rinciDau->volume_satuan }}</td>
|
||||
<td>{{ $rinciDau->unit_satuan }}</td>
|
||||
<td>
|
||||
<input type="hidden" name="dau[id][]" value="{{ $rinciDau->id }}">
|
||||
<input type="text" class="form-control form-control-sm number-separator-indo input_dau input_dau_realisasi" name="dau[realisasi][]" value="{{ separateNumberIndo($rinciDau->jml_realisasi) }}">
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" class="form-control form-control-sm input_dau" name="dau[volume_realisasi][]" value="{{ $rinciDau->volume_satuan_realisasi }}"></td>
|
||||
<td>
|
||||
<select name="dau[unit_realisasi][]" class="form-control form-control-sm input_dau" required placeholder="Unit Realisasi">
|
||||
<?php foreach($unitSatuan as $satuan){ ?>
|
||||
<option value="{{ $satuan->nama_satuan }}" {{ $rinciDau->unit_satuan_realisasi == $satuan->nama_satuan?"selected":"" }}>{{ $satuan->nama_satuan }}</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<button id="btnSimpanDau" type="button" class="btn btn-success"><i class="fa fa-save"></i> Simpan Data</button>
|
||||
</div>
|
||||
@@ -166,6 +167,8 @@
|
||||
$(document).on("click","#btnSimpanDau",function(){
|
||||
let cancel = false;
|
||||
let msg="";
|
||||
let totalRealisasi = $("#totalRealisasi").val();
|
||||
|
||||
for(let x=0;x<$(".input_dau").length;x++){
|
||||
if ($($(".input_dau")[x]).val()==""){
|
||||
cancel = true;
|
||||
@@ -173,11 +176,23 @@
|
||||
}
|
||||
}
|
||||
|
||||
let currentRealisasi = 0;
|
||||
for(let x=0;x<$(".input_dau_realisasi").length;x++){
|
||||
if ($($(".input_dau_anggaran")[x]).val()<parseFloat(replaceValue($($(".input_dau_realisasi")[x]).val()))){
|
||||
msg = "Jumlah Perincian tidak sama atau kurang dengan Anggaran!";
|
||||
msg = "Jumlah Realisasi melebihi Anggaran!";
|
||||
cancel = true;
|
||||
}
|
||||
currentRealisasi += parseFloat(replaceValue($($(".input_dau_realisasi")[x]).val()));
|
||||
}
|
||||
|
||||
if (totalRealisasi > 0){
|
||||
if (currentRealisasi!=totalRealisasi){
|
||||
msg = "Jumlah Realisasi yang Diinput tidak sesuai!";
|
||||
cancel = true;
|
||||
}
|
||||
}else{
|
||||
msg = "Data Realisasi masih kosong !";
|
||||
cancel = true;
|
||||
}
|
||||
|
||||
if (cancel){
|
||||
@@ -204,5 +219,14 @@
|
||||
$("#btnSimpanDau").remove();
|
||||
<?php } ?>
|
||||
|
||||
@php if ($BelanjaRealisasi->jenis_dana == "DAU"){ @endphp
|
||||
$("#custom-tabs-four-home-tab").hide();
|
||||
$("#custom-tabs-four-profile-tab").hide();
|
||||
$("#custom-tabs-four-detail-tab").hide();
|
||||
$("#custom-tabs-four-dau-tab").click();
|
||||
@php }else{ @endphp
|
||||
$("#custom-tabs-four-dau-tab").hide();
|
||||
@php } @endphp
|
||||
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user