diff --git a/application/controllers/Invoices.php b/application/controllers/Invoices.php index 37fff31..c356043 100644 --- a/application/controllers/Invoices.php +++ b/application/controllers/Invoices.php @@ -1193,7 +1193,7 @@ class Invoices extends CI_Controller { public function get_accounts_assets() { $data = $this->db - ->where_in('kode_akun', [101,102,207,201,202,203,204,205,209]) + ->where_in('tipe', ['asset','liability']) ->order_by('kode_akun', 'ASC') ->get('accounts') ->result(); diff --git a/application/controllers/Items.php b/application/controllers/Items.php index b576320..51ca787 100644 --- a/application/controllers/Items.php +++ b/application/controllers/Items.php @@ -420,7 +420,7 @@ class Items extends CI_Controller { ->or_like('i.nama_barang', $barcode, 'both') ->or_like('ib.serial_number', $barcode, 'both') ->group_end() - ->limit(15) + // ->limit(15) ->get() ->result(); @@ -969,6 +969,8 @@ class Items extends CI_Controller { // hapus item $this->db->delete('stock_logs',['item_id'=>$id]); + $this->db->delete('item_movements',['item_id'=>$id]); + $this->db->delete('item_barcodes',['item_id'=>$id]); $this->db->delete('items',['id'=>$id]); $j = $this->db->get_where('journals', [ diff --git a/application/views/invoices/layout.php b/application/views/invoices/layout.php index 3377311..75577bf 100644 --- a/application/views/invoices/layout.php +++ b/application/views/invoices/layout.php @@ -365,7 +365,7 @@ $('.btn-add-bayar').click(function(){ $('#tableBayar tbody').append(`