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.
88 lines
2.1 KiB
88 lines
2.1 KiB
11 months ago
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use CodeIgniter\Model;
|
||
|
|
||
|
class Mref extends Model
|
||
|
{
|
||
|
function selKLU()
|
||
|
{
|
||
|
$query = $this->db->query("SELECT DISTINCT KD_KATEGORI KATEGORI, NM_KATEGORIPDK NAMA FROM REF_KLU
|
||
|
ORDER BY KD_KATEGORI ASC");
|
||
|
return $query;
|
||
|
}
|
||
|
|
||
|
function selMAP()
|
||
|
{
|
||
|
$query = $this->db->query("SELECT DISTINCT KD_MAP,NM_MAP FROM DIM_MAP_KJS
|
||
|
ORDER BY KD_MAP ASC");
|
||
|
return $query;
|
||
|
}
|
||
|
|
||
|
function selKJS()
|
||
|
{
|
||
|
$query = $this->db->query("SELECT DISTINCT KD_SETOR KJS FROM DIM_MAP_KJS
|
||
|
WHERE TRIM(KD_SETOR) IS NOT NULL
|
||
|
ORDER BY KD_SETOR ASC");
|
||
|
return $query;
|
||
|
}
|
||
|
|
||
|
function selBln()
|
||
|
{
|
||
|
$builder = $this->db->table('BULAN');
|
||
|
$builder->select('*');
|
||
|
return $builder->get();
|
||
|
}
|
||
|
|
||
|
function selKwl()
|
||
|
{
|
||
|
$builder = $this->db->table('REF_KANWIL');
|
||
|
$builder->select('*');
|
||
|
$builder->orderBy('KODE', 'ASC');
|
||
|
return $builder->get();
|
||
|
}
|
||
|
|
||
|
function selKpp($kwl)
|
||
|
{
|
||
|
$builder = $this->db->table('REF_KPP');
|
||
|
$builder->select('*');
|
||
|
$builder->where('KD_KANWIL', $kwl);
|
||
|
$builder->orderBy('KD_KPP', 'ASC');
|
||
|
return $builder->get();
|
||
|
}
|
||
|
|
||
|
function selSeksi($kpp)
|
||
|
{
|
||
|
$builder = $this->db->table('REF_KASIWAS');
|
||
|
$builder->select('*');
|
||
|
$builder->where('KPPADM', $kpp);
|
||
|
$builder->orderBy('KODESIE', 'ASC');
|
||
|
return $builder->get();
|
||
|
}
|
||
|
|
||
|
function selAR($kpp, $seksi)
|
||
|
{
|
||
|
$param = ['KPPADM' => $kpp, 'KODESIE' => $seksi];
|
||
|
$builder = $this->db->table('REF_AR');
|
||
|
$builder->select('*');
|
||
|
$builder->where($param);
|
||
|
$builder->orderBy('NIP', 'ASC');
|
||
|
return $builder->get();
|
||
|
}
|
||
|
|
||
|
function getUpd()
|
||
|
{
|
||
|
$builder = $this->db->table('LAST_UPDATE');
|
||
|
$builder->select('UPD');
|
||
|
return $builder->get();
|
||
|
}
|
||
|
|
||
|
function getBln()
|
||
|
{
|
||
|
$builder = $this->db->table('BULAN');
|
||
|
$builder->select('*');
|
||
|
return $builder->get()->getResult();
|
||
|
}
|
||
|
}
|