Data SPD
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<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 }}"></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>
|
||||
@@ -114,17 +114,22 @@
|
||||
foreach($vwSPD as $key=>$spd){ ?>
|
||||
<tr>
|
||||
<td>{{ $key+1 }}</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>
|
||||
<td>{{ $spd->no_spd }}</td>
|
||||
<td class="text-center">{{ date("d-m-Y",strtotime($spd->tgl)) }}</td>
|
||||
<td class="text-right">{{ separateNumberIndo($spd->jumlah) }}</td>
|
||||
</tr>
|
||||
<?php $totalSPD+=floatVal($spd->jml); } ?>
|
||||
<?php $totalSPD+=floatVal($spd->jumlah); } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<div class="col-6"><strong>TOTAL SPD</strong></div>
|
||||
<div class="col-2"><strong>TOTAL SPD</strong></div>
|
||||
<div class="col-4">
|
||||
<?php if (getRole() == "bendahara"){ ?>
|
||||
<a class="btn btn-sm btn-warning modalButton" title="Pilih SPD" href="{{ url('/realisasi-belanja/'.$BelanjaRealisasi->kode_rsk."/ubah-spd?redirect=/realisasi-belanja/$BelanjaRealisasi->id/submit") }}"><i class="fa fa-edit"></i> Pilih SPD</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-6 text-right"><strong>{{ separateNumberIndo($totalSPD) }}</strong></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user