Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function create(){
- $this->load->helper('string');
- $this->load->library('Datatables');
- $this->load->library('table');
- //ini table yang tampung data barang, perhatikan baik-baik
- $tmpl = array('table_open' => '<table id="big_table" border="1" cellpadding="2" cellspacing="1" class="table table-striped table-bordered">');
- $this->table->set_template($tmpl);
- $this->table->set_heading('no_faktur', 'kode_barang', 'kuantity', 'hargabeli','diskon1','diskon2','diskon3','ppn','kode_lokasi_barang','total_bayar','Action');
- $this->load->view('pembelian/form_pembelian', $data);
- }
- public function datatablebarangbelisatuan(){
- $this->load->library('Datatables');
- $this->datatables->select('detail_beli.id, detail_beli.no_faktur, detail_beli.kode_barang, detail_beli.kuantity, detail_beli.hargabeli, detail_beli.diskon1, detail_beli.diskon2, detail_beli.diskon3, detail_beli.ppn, detail_beli.kode_lokasi_barang, detail_beli.total_bayar')
- ->unset_column('detail_beli.id')
- ->add_column('Actions', get_pembeliansatuan('$1'), 'detail_beli.id')
- ->from('detail_beli');
- echo $this->datatables->generate();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement