Update besar apk finance

This commit is contained in:
Wian Drs
2026-09-11 16:03:00 +07:00
parent d42483b350
commit 4ef15c22ae
897 changed files with 98056 additions and 15979 deletions
+48 -6
View File
@@ -18,6 +18,9 @@
<th>Tipe</th>
<th>Posisi</th>
<th>Kategori</th>
<th>Jenis</th>
<th>Visibilitas</th>
<th>Status</th>
<th width="15%">Aksi</th>
</tr>
</thead>
@@ -43,7 +46,8 @@
<input type="hidden" id="inputId">
<label class="fw-semibold">Kode Akun</label>
<input type="text" class="form-control" id="kode_akun">
<input type="text" class="form-control" id="kode_akun" inputmode="numeric" pattern="[0-9]{4}" maxlength="4" placeholder="Contoh: 1010">
<small class="text-muted">Gunakan tepat 4 angka.</small>
<label class="fw-semibold mt-2">Nama Akun</label>
<input type="text" class="form-control" id="nama_akun">
@@ -70,6 +74,23 @@
<?php endforeach; ?>
</select>
<div class="form-check mt-3">
<input class="form-check-input" type="checkbox" id="is_header">
<label class="form-check-label" for="is_header">Akun header/grup</label>
</div>
<div class="form-check mt-2">
<input class="form-check-input" type="checkbox" id="allow_posting" checked>
<label class="form-check-label" for="allow_posting">Boleh menerima posting jurnal</label>
</div>
<div class="form-check mt-2">
<input class="form-check-input" type="checkbox" id="is_active" checked>
<label class="form-check-label" for="is_active">Aktif</label>
</div>
<div class="form-check mt-2">
<input class="form-check-input" type="checkbox" id="is_hidden">
<label class="form-check-label" for="is_hidden">Sembunyikan akun</label>
</div>
</div>
<div class="modal-footer">
@@ -83,6 +104,11 @@
<script>
$(function(){
$('#is_header').on('change',function(){
if(this.checked) $('#allow_posting').prop('checked',false).prop('disabled',true);
else $('#allow_posting').prop('disabled',false);
});
let table = $('#tableAccounts').DataTable({
processing: true,
serverSide: true,
@@ -101,7 +127,10 @@ $(function(){
{ data: 4 },
{ data: 5 },
{ data: 6 },
{ data: 7, orderable:false }
{ data: 7 },
{ data: 8 },
{ data: 9 },
{ data: 10, orderable:false }
],
language: {
processing: `<div class="text-center"><div class="spinner-border text-warning"></div></div>`
@@ -116,6 +145,10 @@ $(function(){
$('#priority').val('');
$('#tipe').val('asset');
$('#parent_id').val('');
$('#is_header').prop('checked',false);
$('#allow_posting').prop('checked',true).prop('disabled',false);
$('#is_active').prop('checked',true);
$('#is_hidden').prop('checked',false);
$('#modalAccount .modal-title').text('Tambah Akun');
}
@@ -138,10 +171,14 @@ $(function(){
priority: $('#priority').val().trim(),
tipe: $('#tipe').val(),
parent_id: $('#parent_id').val()
,is_header: $('#is_header').is(':checked') ? 1 : 0
,allow_posting: $('#allow_posting').is(':checked') ? 1 : 0
,is_active: $('#is_active').is(':checked') ? 1 : 0
,is_hidden: $('#is_hidden').is(':checked') ? 1 : 0
};
if(!data.kode_akun || !data.nama_akun){
Swal.fire('Warning','Kode & Nama wajib diisi','warning');
if(!/^[0-9]{4}$/.test(data.kode_akun) || !data.nama_akun){
Swal.fire('Warning','Kode akun wajib 4 angka dan nama akun wajib diisi.','warning');
return;
}
@@ -182,6 +219,11 @@ $(function(){
$('#priority').val(res.priority);
$('#tipe').val(res.tipe);
$('#parent_id').val(res.parent_id);
$('#is_header').prop('checked',Number(res.is_header)===1);
$('#allow_posting').prop('checked',Number(res.allow_posting)===1);
$('#is_active').prop('checked',Number(res.is_active)===1);
$('#is_hidden').prop('checked',Number(res.is_hidden)===1);
$('#is_header').trigger('change');
$('#modalAccount .modal-title').text('Edit Akun');
$('#btnSimpan').data('action','edit');
@@ -205,7 +247,7 @@ $(function(){
}).then((result)=>{
if(result.isConfirmed){
$.get("<?= base_url('accounts/delete/'); ?>" + id, function(res){
$.post("<?= base_url('accounts/delete/'); ?>" + id, {}, function(res){
if(res.status){
table.ajax.reload(null,false);
@@ -220,4 +262,4 @@ $(function(){
});
});
</script>
</script>