| Server IP : 127.0.0.1 / Your IP : 192.168.99.1 Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9 System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64 User : Administrator ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/wamp/www/sipapbd_2021_sekolah_cetak/application/modules/rka221/controllers/ |
Upload File : |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Rka221 extends Rka_Controller {
public function __construct()
{
parent::__construct();
$this->modul_name = 'rka221';
$this->dpa = 'rkadpa';
$this->modul_display = 'RKA RINCIAN BELANJA';
$this->view_form = 'rka221_form';
$this->view_daftar = 'rka221_view';
$this->report_daftar = 'DAFTAR RKA221';
$this->report_form = 'FORM RKA221';
$this->load->model('rka221_model', 'data_model');
$this->message_dihapus = 'RKA RINCIAN BELANJA telah dihapus.';
$this->message_gagal_dihapus = 'RKA RINCIAN BELANJA tidak bisa dihapus.';
}
function validasi()
{
//$this->form_validation->set_rules('id_sd', 'Sumber Dana', 'required|trim|integer');
//$this->form_validation->set_rules('kaskpd', 'Kepala SKPD', 'trim|integer');
}
function rincian_kegiatan($id,$id_kegiatan){
$response = (object) NULL;
if ($id === 0)
{
echo json_encode($response);
return;
}
if ($this->data_model->perubahan)
{
$id_murni = $this->data_model->get_id_rka_murni($id);
$murni_ = $this->data_model->get_rincian_murni_keg($id_murni,$id_kegiatan);
$murni = array();
foreach ($murni_ as $key => $value){
$murni[$value['ID_DETIL_REKENING']] = $value;
}
}
$result = $this->data_model->get_rincian_kegiatan($id,$id_kegiatan);
for($i=0; $i<count($result); $i++)
{
$response->rows[$i]['id'] = $result[$i]['ID_RINCIAN_ANGGARAN'];
$response->rows[$i]['cell'][] = $result[$i]['ID_RINCIAN_ANGGARAN'];
$response->rows[$i]['cell'][] = $result[$i]['ID_DETIL_REKENING'];
$response->rows[$i]['cell'][] = $result[$i]['ID_REKENING'];
$response->rows[$i]['cell'][] = $result[$i]['ID_PARENT_REKENING'];
$response->rows[$i]['cell'][] = $result[$i]['LEVEL_REKENING'];
$response->rows[$i]['cell'][] = $result[$i]['CHILD'];
$response->rows[$i]['cell'][] = $result[$i]['LEVEL_REKENING'] > 0? $result[$i]['KODE_REKENING'] : '';
$response->rows[$i]['cell'][] = utf8_encode($result[$i]['URAIAN']);
$response->rows[$i]['cell'][] = $result[$i]['KODE_STANDAR'];
$response->rows[$i]['cell'][] = $result[$i]['ID_SUMBER_DANA'];
$response->rows[$i]['cell'][] = utf8_encode($result[$i]['SUMBER_DANA']);
if ($this->data_model->perubahan)
{
$row_murni = array();
if (isset($murni[ $result[$i]['ID_DETIL_REKENING']])){
$row_murni = $murni[ $result[$i]['ID_DETIL_REKENING']];
}
else {
$row_murni['VOLUME'] = '';
$row_murni['TARIF'] = '';
$row_murni['SATUAN'] = '';
$row_murni['PAGU'] = '';
$row_murni['PPN'] = '';
}
$response->rows[$i]['cell'][] = ((isset($row_murni['ID_DETIL_REKENING'])) ? 1 : 0);
$response->rows[$i]['cell'][] = ($row_murni && $result[$i]['LEVEL_REKENING'] > 0 ? '' : $row_murni['VOLUME']);
$response->rows[$i]['cell'][] = ($row_murni ? $row_murni['SATUAN'] : '');
$response->rows[$i]['cell'][] = ($row_murni && $result[$i]['LEVEL_REKENING'] > 0 ? '' : $row_murni['TARIF']);
$response->rows[$i]['cell'][] = ($row_murni ? $row_murni['PAGU'] : '');
$response->rows[$i]['cell'][] = ($row_murni ? $row_murni['PPN'] : '');
}
$response->rows[$i]['cell'][] = ($result[$i]['LEVEL_REKENING'] > 0 ? '' : $result[$i]['VOLUME']);
$response->rows[$i]['cell'][] = $result[$i]['SATUAN'];
$response->rows[$i]['cell'][] = ($result[$i]['LEVEL_REKENING'] > 0 ? '' : $result[$i]['TARIF']);
$response->rows[$i]['cell'][] = $result[$i]['PAGU'];
$response->rows[$i]['cell'][] = $result[$i]['PPN'];
if ($this->data_model->perubahan){
$response->rows[$i]['cell'][] = ($row_murni ? $result[$i]['PAGU'] - $row_murni['PAGU'] : $result[$i]['PAGU']);
//$response->rows[$i]['cell'][] = ($row_murni ? $result[$i]['PPN'] - $row_murni['PPN'] : $result[$i]['PPN']);
}
$response->rows[$i]['cell'][] = ($result[$i]['LEVEL_REKENING'] > 0 ? $result[$i]['REALISASI'] : '' );
$response->rows[$i]['cell'][] = $result[$i]['PAGU_TAHUN_DEPAN'];
$response->rows[$i]['cell'][] = isset($result[$i]['KETERANGAN'])?$result[$i]['KETERANGAN']:'';
$response->rows[$i]['cell'][] = $result[$i]['KODE_REKENING'];
$response->rows[$i]['cell'][] = $result[$i]['ID_SSH'];
$response->rows[$i]['cell'][] = $id_kegiatan;
}
echo json_encode($response);
}
}