You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.8 KiB
70 lines
1.8 KiB
5 months ago
|
<?php
|
||
|
|
||
|
namespace App\Models\Bendahara;
|
||
|
|
||
|
use CodeIgniter\Model;
|
||
|
|
||
|
class MGeneral extends Model {
|
||
|
|
||
|
function get_ref_tahun() {
|
||
|
$builder = $this->db->table('GENAPP.REF_TAHUN');
|
||
|
$builder->select('*');
|
||
|
$builder->orderBy('TAHUN', 'DESC');
|
||
|
|
||
|
return $builder->get()->getResult();
|
||
|
}
|
||
|
|
||
|
function get_ref_bulan() {
|
||
|
$builder = $this->db->table('GENAPP.BULAN');
|
||
|
$builder->select('*');
|
||
|
|
||
|
return $builder->get()->getResult();
|
||
|
}
|
||
|
|
||
|
function get_ref_kanwil() {
|
||
|
$builder = $this->db->table('GENAPP.REF_KANWIL');
|
||
|
$builder->select('*');
|
||
|
$builder->orderBy('KODE', 'ASC');
|
||
|
|
||
|
return $builder->get()->getResult();
|
||
|
}
|
||
|
|
||
|
function get_ref_kpp($param) {
|
||
|
$builder = $this->db->table('GENAPP.REF_KPP');
|
||
|
$builder->select('*');
|
||
|
$builder->where('KD_KANWIL', $param["kanwil"]);
|
||
|
$builder->orderBy('KD_KPP', 'ASC');
|
||
|
|
||
|
return $builder->get()->getResult();
|
||
|
}
|
||
|
|
||
|
function get_ref_seksi() {
|
||
|
$builder = $this->db->table('GENAPP.REF_SEKSI');
|
||
|
$builder->select('*');
|
||
|
$builder->orderBy('KODESIE', 'ASC');
|
||
|
|
||
|
return $builder->get()->getResult();
|
||
|
}
|
||
|
|
||
|
function get_ref_ar($param) {
|
||
|
$param = ['KPPADM' => $param["kpp"], 'KODESIE' => $param["seksi"]];
|
||
|
$builder = $this->db->table('GENAPP.REF_AR');
|
||
|
$builder->select('*');
|
||
|
$builder->where($param);
|
||
|
$builder->orderBy('NAMA', 'ASC');
|
||
|
|
||
|
return $builder->get()->getResult();
|
||
|
}
|
||
|
|
||
|
function get_ref_kabkot($param) {
|
||
|
$builder = $this->db->table('GENAPP.DIM_WIL');
|
||
|
$builder->select('NM_DATI2');
|
||
|
$builder->where('KPPADM', $param["kpp"]);
|
||
|
$builder->orderBy('NM_DATI2', 'ASC');
|
||
|
$builder->distinct();
|
||
|
|
||
|
return $builder->get()->getResult();
|
||
|
}
|
||
|
|
||
|
}
|