57 lines
2.3 KiB
PHP
57 lines
2.3 KiB
PHP
<form id="frmInputSPD" action="{{ url('/realisasi-belanja/'.$id.'/ubah-spd') }}" method="POST" autocomplete="off">
|
|
@csrf
|
|
<div class="row">
|
|
<input type="hidden" value="{{ $id }}" name="id_rsk">
|
|
<input type="hidden" value="{{ $redirect }}" name="redirect">
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<table class="table table-sm table-striped">
|
|
<thead>
|
|
<th>No</th>
|
|
<th>Nomor SPD</th>
|
|
<th class="text-center">Tanggal</th>
|
|
<th class="text-right">Jumlah</th>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
foreach($SPDs as $spd){ ?>
|
|
<tr>
|
|
<td><input type="checkbox" name="spd[]" value="{{ $spd->i_spdno_dok }}" {{ array_search($spd->i_spdno_dok, array_column($selected, "no_spd")) > -1?"checked":"" }}></td>
|
|
<td>{{ $spd->i_spdno_dok }}</td>
|
|
<td class="text-center">{{ date("d-m-Y",strtotime($spd->d_spdno)) }}</td>
|
|
<td class="text-right">{{ separateNumberIndo($spd->jml) }}</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<button type="submit" class="btn btn-success"><i class="fa fa-paper-plane"></i> Simpan</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<script type="text/javascript">
|
|
$("#frmInputRealisasi").on("submit",function(e){
|
|
e.preventDefault();
|
|
if ($("#jml_realisasi").val()!=0)
|
|
{
|
|
Swal.fire({
|
|
title: 'Data akan disimpan?',
|
|
showDenyButton: true,
|
|
showCancelButton: false,
|
|
confirmButtonText: 'Ya',
|
|
denyButtonText: "Tidak",
|
|
icon: "warning",
|
|
}).then((result) => {
|
|
if (result.isConfirmed) {
|
|
return e.currentTarget.submit();
|
|
}
|
|
});
|
|
}else{
|
|
Swal.fire(
|
|
'Warning',
|
|
'Belum ada Realisasi!',
|
|
'error'
|
|
)
|
|
}
|
|
});
|
|
</script>
|