public function load_data_master() { $this->load->library('flexigrid'); $valid_fields = array('id_m_apbdes'); $this->flexigrid->validate_post('id_m_apbdes', 'ASC', $valid_fields); $records = $this->m_master_apbdes->getFlexigrid(); $this->output->set_header($this->config->item('json_header')); $record_items = array(); foreach ($records['records']->result() as $row) { $record_items[] = array($row->id_m_apbdes, $row->id_m_apbdes, $row->id_m_rkp, $row->rkp_tahun, rupiah_display($row->total_pendapatan), rupiah_display($row->total_belanja), rupiah_display($row->total_pembiayaan), $row->tanggal_disetujui, $row->disetujui_oleh, '<button id="anchor_detail_' . $row->id_m_apbdes . '" type="button" class="btn btn-primary btn-xs btn_add_detail" onclick="add_detail(this);" title="Tambah Detail APB Desa" />' . '<i class="fa fa-plus"></i>' . '</button> ' . '<button type="submit" class="btn btn-info btn-xs" title="Tampil Detil APB Desa" onclick="show_detail_program(\'' . $row->id_m_apbdes . '\')"/>' . '<i class="fa fa-list-alt"></i>' . '</button> ' . '<a title="Ubah Data" href="' . base_url() . 'rencanaPembangunan/c_apbdes/add/' . $row->id_m_apbdes . '" class="btn btn-warning btn-xs"><i class="fa fa-pencil"></i></a> ' . '<a title="Download Excel" href="' . base_url() . 'rencanaPembangunan/c_apbdes/export_excel/' . $row->id_m_apbdes . '" class="btn btn-success btn-xs"><i class="fa fa-file-excel-o"></i></a>'); } //Print please $this->output->set_output($this->flexigrid->json_build($records['record_count'], $record_items)); }
public function load_data_master() { $this->load->library('flexigrid'); $valid_fields = array('id_m_rkp'); $this->flexigrid->validate_post('id_m_rkp', 'ASC', $valid_fields); $records = $this->m_master_rkp->getFlexigrid(); $this->output->set_header($this->config->item('json_header')); $record_items = array(); foreach ($records['records']->result() as $row) { $record_items[] = array($row->id_m_rkp, $row->id_m_rkp, $row->id_m_rancangan_rpjm_desa, $row->tahun_awal, $row->tahun_akhir, $row->tahun_anggaran, rupiah_display($row->total_bidang_1), rupiah_display($row->total_bidang_2), rupiah_display($row->total_bidang_3), rupiah_display($row->total_bidang_4), rupiah_display($row->total_keseluruhan), $row->rkp_tahun, $row->tanggal_disusun, $row->disusun_oleh, $row->kepala_desa, $row->id_desa, $row->nama_desa, $row->id_kecamatan, $row->nama_kecamatan, $row->id_kab_kota, $row->nama_kab_kota, $row->id_provinsi, $row->nama_provinsi, '<button id="anchor_detail_' . $row->id_m_rkp . '" type="button" class="btn btn-primary btn-xs btn_add_detail" onclick="add_detail(this);" title="Tambah Detail RKP" />' . '<i class="fa fa-plus"></i>' . '</button> ' . '<button type="submit" class="btn btn-info btn-xs" title="Tampil Detil RKP" onclick="show_detail_program(\'' . $row->id_m_rkp . '\')"/>' . '<i class="fa fa-list-alt"></i>' . '</button> ' . '<a title="Ubah Data" href="' . base_url() . 'rencanaPembangunan/c_rkp/add/' . $row->id_m_rkp . '" class="btn btn-warning btn-xs"><i class="fa fa-pencil"></i></a> ' . '<a title="Download Excel" href="' . base_url() . 'rencanaPembangunan/c_rkp/export_excel/' . $row->id_m_rkp . '" class="btn btn-success btn-xs"><i class="fa fa-file-excel-o"></i></a>'); } //Print please $this->output->set_output($this->flexigrid->json_build($records['record_count'], $record_items)); }