| 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_2020_sekolah_geser/application/modules/dpal/controllers/ |
Upload File : |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Dpal extends Rka_Controller {
public function __construct()
{
parent::__construct();
$this->modul_name = 'dpal';
$this->modul_display = 'DPA Lanjutan';
$this->view_form = 'dpal_form';
$this->view_daftar = 'dpal_view';
$this->report_daftar = 'DAFTAR DPAL';
$this->report_form = 'FORM DPAL';
$this->load->model('dpal_model', 'data_model');
$this->message_dihapus = 'DPA Lanjutan telah dihapus.';
$this->message_gagal_dihapus = 'DPA Lanjutan tidak bisa dihapus.';
}
function validasi()
{
}
function rincian($id = 0)
{
$result = $this->data_model->get_rincian($id);
if ($this->data_model->perubahan)
{
$id_murni = $this->data_model->get_id_rka_murni($id);
$murni_ = $this->data_model->get_rincian_murni($id_murni);
$murni = array();
foreach ($murni_ as $key => $value){
$murni[$value['ID_DETIL_REKENING']] = $value;
}
}
$response = (object) NULL;
if ($result){
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'][] = $result[$i]['URAIAN'];
$response->rows[$i]['cell'][] = $result[$i]['KODE_STANDAR'];
$response->rows[$i]['cell'][] = $result[$i]['ID_SUMBER_DANA'];
$response->rows[$i]['cell'][] = $result[$i]['SUMBER_DANA'];
if ($this->data_model->perubahan)
{
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'] = '';
}
$response->rows[$i]['cell'][] = ($row_murni ? 1 : 0);
$response->rows[$i]['cell'][] = ($row_murni ? $row_murni['VOLUME'] : '');
$response->rows[$i]['cell'][] = ($row_murni ? $row_murni['SATUAN'] : '');
$response->rows[$i]['cell'][] = ($row_murni ? $row_murni['TARIF'] : '');
$response->rows[$i]['cell'][] = ($row_murni ? $row_murni['PAGU'] : '');
}
$response->rows[$i]['cell'][] = ($result[$i]['LEVEL_REKENING'] > 0 ? '' : $result[$i]['VOLUME_DPAL']);
$response->rows[$i]['cell'][] = $result[$i]['SATUAN'];
$response->rows[$i]['cell'][] = ($result[$i]['LEVEL_REKENING'] > 0 ? '' : $result[$i]['TARIF_DPAL']);
$response->rows[$i]['cell'][] = $result[$i]['SALDO_AWAL_0'];
$response->rows[$i]['cell'][] = $result[$i]['REALISASI_0'];
$response->rows[$i]['cell'][] = $result[$i]['SALDO_AWAL_1'];
$response->rows[$i]['cell'][] = $result[$i]['REALISASI_1'];
$response->rows[$i]['cell'][] = $result[$i]['SALDO_AWAL_2'];
$response->rows[$i]['cell'][] = $result[$i]['REALISASI_2'];
$response->rows[$i]['cell'][] = $result[$i]['SALDO_AKHIR_2'];
if ($this->data_model->perubahan)
$response->rows[$i]['cell'][] = ($row_murni ? $result[$i]['SALDO_AWAL_0'] - $row_murni['PAGU'] : $result[$i]['SALDO_AWAL_0']);
$response->rows[$i]['cell'][] = 0;
$response->rows[$i]['cell'][] = 0;
$response->rows[$i]['cell'][] = 0;
$response->rows[$i]['cell'][] = 0;
$response->rows[$i]['cell'][] = 0;
$response->rows[$i]['cell'][] = 0;
$response->rows[$i]['cell'][] = 0;
}
}
$response->sql = $this->db->queries;
echo json_encode($response);
}
}