update from prod
This commit is contained in:
@@ -50,6 +50,7 @@ class Accounts extends CI_Controller {
|
|||||||
$data[] = [
|
$data[] = [
|
||||||
$no,
|
$no,
|
||||||
$row->kode_akun,
|
$row->kode_akun,
|
||||||
|
$row->priority,
|
||||||
$row->nama_akun,
|
$row->nama_akun,
|
||||||
ucfirst($row->tipe),
|
ucfirst($row->tipe),
|
||||||
ucfirst($row->posisi),
|
ucfirst($row->posisi),
|
||||||
@@ -80,7 +81,8 @@ class Accounts extends CI_Controller {
|
|||||||
'tipe' => $tipe,
|
'tipe' => $tipe,
|
||||||
'posisi' => in_array($tipe, ['asset','expense']) ? 'debit' : 'kredit',
|
'posisi' => in_array($tipe, ['asset','expense']) ? 'debit' : 'kredit',
|
||||||
'kategori' => in_array($tipe, ['asset','liability','equity']) ? 'neraca' : 'laba_rugi',
|
'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);
|
$insert = $this->dm->setTable('accounts')->insert($data);
|
||||||
@@ -111,7 +113,8 @@ class Accounts extends CI_Controller {
|
|||||||
'tipe' => $tipe,
|
'tipe' => $tipe,
|
||||||
'posisi' => in_array($tipe, ['asset','expense']) ? 'debit' : 'kredit',
|
'posisi' => in_array($tipe, ['asset','expense']) ? 'debit' : 'kredit',
|
||||||
'kategori' => in_array($tipe, ['asset','liability','equity']) ? 'neraca' : 'laba_rugi',
|
'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);
|
$update = $this->dm->setTable('accounts')->update($id, $data);
|
||||||
|
|||||||
@@ -646,7 +646,7 @@ class Items extends CI_Controller {
|
|||||||
public function get_accounts()
|
public function get_accounts()
|
||||||
{
|
{
|
||||||
$data = $this->db
|
$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')
|
->order_by('kode_akun','ASC')
|
||||||
->get('accounts')
|
->get('accounts')
|
||||||
->result();
|
->result();
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class Neraca extends CI_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->db->group_by('a.id');
|
$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();
|
$rows = $this->db->get()->result();
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th width="5%">No</th>
|
<th width="5%">No</th>
|
||||||
<th>Kode</th>
|
<th>Kode</th>
|
||||||
|
<th>Urutan Laporan</th>
|
||||||
<th>Nama</th>
|
<th>Nama</th>
|
||||||
<th>Tipe</th>
|
<th>Tipe</th>
|
||||||
<th>Posisi</th>
|
<th>Posisi</th>
|
||||||
@@ -47,6 +48,9 @@
|
|||||||
<label class="fw-semibold mt-2">Nama Akun</label>
|
<label class="fw-semibold mt-2">Nama Akun</label>
|
||||||
<input type="text" class="form-control" id="nama_akun">
|
<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>
|
<label class="fw-semibold mt-2">Tipe</label>
|
||||||
<select class="form-control" id="tipe">
|
<select class="form-control" id="tipe">
|
||||||
<option value="asset">Asset</option>
|
<option value="asset">Asset</option>
|
||||||
@@ -96,7 +100,8 @@ $(function(){
|
|||||||
{ data: 3 },
|
{ data: 3 },
|
||||||
{ data: 4 },
|
{ data: 4 },
|
||||||
{ data: 5 },
|
{ data: 5 },
|
||||||
{ data: 6, orderable:false }
|
{ data: 6 },
|
||||||
|
{ data: 7, orderable:false }
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
processing: `<div class="text-center"><div class="spinner-border text-warning"></div></div>`
|
processing: `<div class="text-center"><div class="spinner-border text-warning"></div></div>`
|
||||||
@@ -108,6 +113,7 @@ $(function(){
|
|||||||
$('#inputId').val('');
|
$('#inputId').val('');
|
||||||
$('#kode_akun').val('');
|
$('#kode_akun').val('');
|
||||||
$('#nama_akun').val('');
|
$('#nama_akun').val('');
|
||||||
|
$('#priority').val('');
|
||||||
$('#tipe').val('asset');
|
$('#tipe').val('asset');
|
||||||
$('#parent_id').val('');
|
$('#parent_id').val('');
|
||||||
$('#modalAccount .modal-title').text('Tambah Akun');
|
$('#modalAccount .modal-title').text('Tambah Akun');
|
||||||
@@ -129,6 +135,7 @@ $(function(){
|
|||||||
id: $('#inputId').val(),
|
id: $('#inputId').val(),
|
||||||
kode_akun: $('#kode_akun').val().trim(),
|
kode_akun: $('#kode_akun').val().trim(),
|
||||||
nama_akun: $('#nama_akun').val().trim(),
|
nama_akun: $('#nama_akun').val().trim(),
|
||||||
|
priority: $('#priority').val().trim(),
|
||||||
tipe: $('#tipe').val(),
|
tipe: $('#tipe').val(),
|
||||||
parent_id: $('#parent_id').val()
|
parent_id: $('#parent_id').val()
|
||||||
};
|
};
|
||||||
@@ -172,6 +179,7 @@ $(function(){
|
|||||||
$('#inputId').val(res.id);
|
$('#inputId').val(res.id);
|
||||||
$('#kode_akun').val(res.kode_akun);
|
$('#kode_akun').val(res.kode_akun);
|
||||||
$('#nama_akun').val(res.nama_akun);
|
$('#nama_akun').val(res.nama_akun);
|
||||||
|
$('#priority').val(res.priority);
|
||||||
$('#tipe').val(res.tipe);
|
$('#tipe').val(res.tipe);
|
||||||
$('#parent_id').val(res.parent_id);
|
$('#parent_id').val(res.parent_id);
|
||||||
|
|
||||||
|
|||||||
@@ -995,7 +995,7 @@ $(function(){
|
|||||||
|
|
||||||
refreshTable(dtKembalikan, kembalikanData);
|
refreshTable(dtKembalikan, kembalikanData);
|
||||||
$('#scanKembalikan').val('').focus();
|
$('#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');
|
}, 'json');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1059,7 +1059,7 @@ $(function(){
|
|||||||
|
|
||||||
refreshTable(dtDibawa, dibawaData);
|
refreshTable(dtDibawa, dibawaData);
|
||||||
$('#scanDibawa').val('').focus();
|
$('#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');
|
}, '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