update from prod
This commit is contained in:
@@ -50,6 +50,7 @@ class Accounts extends CI_Controller {
|
||||
$data[] = [
|
||||
$no,
|
||||
$row->kode_akun,
|
||||
$row->priority,
|
||||
$row->nama_akun,
|
||||
ucfirst($row->tipe),
|
||||
ucfirst($row->posisi),
|
||||
@@ -80,7 +81,8 @@ class Accounts extends CI_Controller {
|
||||
'tipe' => $tipe,
|
||||
'posisi' => in_array($tipe, ['asset','expense']) ? 'debit' : 'kredit',
|
||||
'kategori' => in_array($tipe, ['asset','liability','equity']) ? 'neraca' : 'laba_rugi',
|
||||
'parent_id' => $this->input->post('parent_id') ?: NULL
|
||||
'parent_id' => $this->input->post('parent_id') ?: NULL,
|
||||
'priority' => $this->input->post('priority') ?: NULL
|
||||
];
|
||||
|
||||
$insert = $this->dm->setTable('accounts')->insert($data);
|
||||
@@ -111,7 +113,8 @@ class Accounts extends CI_Controller {
|
||||
'tipe' => $tipe,
|
||||
'posisi' => in_array($tipe, ['asset','expense']) ? 'debit' : 'kredit',
|
||||
'kategori' => in_array($tipe, ['asset','liability','equity']) ? 'neraca' : 'laba_rugi',
|
||||
'parent_id' => $this->input->post('parent_id') ?: NULL
|
||||
'parent_id' => $this->input->post('parent_id') ?: NULL,
|
||||
'priority' => $this->input->post('priority') ?: NULL
|
||||
];
|
||||
|
||||
$update = $this->dm->setTable('accounts')->update($id, $data);
|
||||
|
||||
@@ -646,7 +646,7 @@ class Items extends CI_Controller {
|
||||
public function get_accounts()
|
||||
{
|
||||
$data = $this->db
|
||||
->where_in('kode_akun', [101,102,201])
|
||||
->where_in('kode_akun', [101,102,201,122,125,105])
|
||||
->order_by('kode_akun','ASC')
|
||||
->get('accounts')
|
||||
->result();
|
||||
|
||||
@@ -101,7 +101,7 @@ class Neraca extends CI_Controller {
|
||||
}
|
||||
|
||||
$this->db->group_by('a.id');
|
||||
$this->db->order_by('a.kode_akun','ASC');
|
||||
$this->db->order_by('a.priority','ASC');
|
||||
|
||||
$rows = $this->db->get()->result();
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th>Kode</th>
|
||||
<th>Urutan Laporan</th>
|
||||
<th>Nama</th>
|
||||
<th>Tipe</th>
|
||||
<th>Posisi</th>
|
||||
@@ -47,6 +48,9 @@
|
||||
<label class="fw-semibold mt-2">Nama Akun</label>
|
||||
<input type="text" class="form-control" id="nama_akun">
|
||||
|
||||
<label class="fw-semibold mt-2">Urutan Laporan</label>
|
||||
<input type="number" class="form-control" id="priority">
|
||||
|
||||
<label class="fw-semibold mt-2">Tipe</label>
|
||||
<select class="form-control" id="tipe">
|
||||
<option value="asset">Asset</option>
|
||||
@@ -96,7 +100,8 @@ $(function(){
|
||||
{ data: 3 },
|
||||
{ data: 4 },
|
||||
{ data: 5 },
|
||||
{ data: 6, orderable:false }
|
||||
{ data: 6 },
|
||||
{ data: 7, orderable:false }
|
||||
],
|
||||
language: {
|
||||
processing: `<div class="text-center"><div class="spinner-border text-warning"></div></div>`
|
||||
@@ -108,6 +113,7 @@ $(function(){
|
||||
$('#inputId').val('');
|
||||
$('#kode_akun').val('');
|
||||
$('#nama_akun').val('');
|
||||
$('#priority').val('');
|
||||
$('#tipe').val('asset');
|
||||
$('#parent_id').val('');
|
||||
$('#modalAccount .modal-title').text('Tambah Akun');
|
||||
@@ -129,6 +135,7 @@ $(function(){
|
||||
id: $('#inputId').val(),
|
||||
kode_akun: $('#kode_akun').val().trim(),
|
||||
nama_akun: $('#nama_akun').val().trim(),
|
||||
priority: $('#priority').val().trim(),
|
||||
tipe: $('#tipe').val(),
|
||||
parent_id: $('#parent_id').val()
|
||||
};
|
||||
@@ -172,6 +179,7 @@ $(function(){
|
||||
$('#inputId').val(res.id);
|
||||
$('#kode_akun').val(res.kode_akun);
|
||||
$('#nama_akun').val(res.nama_akun);
|
||||
$('#priority').val(res.priority);
|
||||
$('#tipe').val(res.tipe);
|
||||
$('#parent_id').val(res.parent_id);
|
||||
|
||||
|
||||
@@ -995,7 +995,7 @@ $(function(){
|
||||
|
||||
refreshTable(dtKembalikan, kembalikanData);
|
||||
$('#scanKembalikan').val('').focus();
|
||||
Swal.fire({icon:'success', text:'Barang ditambahkan ke daftar pengembalian', timer:1200, showConfirmButton:false});
|
||||
// Swal.fire({icon:'success', text:'Barang ditambahkan ke daftar pengembalian', timer:1200, showConfirmButton:false});
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
@@ -1059,7 +1059,7 @@ $(function(){
|
||||
|
||||
refreshTable(dtDibawa, dibawaData);
|
||||
$('#scanDibawa').val('').focus();
|
||||
Swal.fire({icon:'success', text:'Barang ditambahkan ke daftar bawaan', timer:1200, showConfirmButton:false});
|
||||
// Swal.fire({icon:'success', text:'Barang ditambahkan ke daftar bawaan', timer:1200, showConfirmButton:false});
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 150 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 133 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 150 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 138 KiB |
Reference in New Issue
Block a user