51 lines
2.2 KiB
PHP
51 lines
2.2 KiB
PHP
@push('scripts')
|
|
<script src="{{ asset('assets/plugins/toastr/toastr.min.js') }}"></script>
|
|
<script src="{{ asset('assets/datatables/datatables.min.js') }}"></script>
|
|
<script>
|
|
function centang(){
|
|
var ceklist = document.getElementById("ceklist")
|
|
var detailCoa = $('#detail_coa')
|
|
|
|
if(ceklist.checked === true){
|
|
detailCoa.prop('disabled', false)
|
|
}else{
|
|
detailCoa.prop('disabled', true)
|
|
}
|
|
}
|
|
function ubah(id_rekening_coa, kode_coa, sub_kode_coa, detail_coa_edit, keterangan_coa){
|
|
$('#id_rekening_coa').val(id_rekening_coa)
|
|
$('#kode_coa').val(kode_coa)
|
|
$('#sub_kode_coa').val(sub_kode_coa)
|
|
$('#detail_coa_edit').val(detail_coa_edit)
|
|
$('#keterangan_coa').val(keterangan_coa)
|
|
$('#formedit').attr('action','{{ route('coa.ubah','') }}/'+id_rekening_coa)
|
|
$('#modal_edit').modal('show')
|
|
}
|
|
</script>
|
|
<script>
|
|
$(document).ready( function () {
|
|
$('#tabelku').DataTable({
|
|
processing: true,
|
|
serverSide: true,
|
|
scrollY: false,
|
|
ajax: '{{ route('coa.getData') }}',
|
|
columns: [
|
|
{data: 'nomor', name: 'nomor', orderable: false, className: 'text-center'},
|
|
{data: 'kode_coa', name: 'kode_coa', className: 'text-center'},
|
|
{data: 'sub_kode_coa', name: 'sub_kode_coa', className: 'text-center'},
|
|
{data: 'detail_coa', name: 'detail_coa', className: 'text-center'},
|
|
{data: 'coa', name: 'coa', className: 'text-center'},
|
|
{data: 'keterangan_coa', name: 'keterangan_coa', className: 'text-center'},
|
|
{data: 'ubah', name: 'ubah', className: 'text-center'},
|
|
]
|
|
})
|
|
})
|
|
</script>
|
|
<script>
|
|
@if(session()->has('success'))
|
|
toastr.success('{{ session('success') }}', 'BERHASIL');
|
|
@elseif(session()->has('error'))
|
|
toastr.error('{{ session('error') }}', 'GAGAL');
|
|
@endif
|
|
</script>
|
|
@endpush |