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.
49 lines
2.0 KiB
49 lines
2.0 KiB
10 months ago
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use CodeIgniter\Model;
|
||
|
|
||
|
class Mrapor extends Model
|
||
|
{
|
||
|
|
||
|
|
||
|
function getRatKwl($param)
|
||
|
{
|
||
|
$tahun = $param['tahun'];
|
||
|
$bln = $param['bln'];
|
||
|
$query = $this->db->query(" SELECT SUBSTR (b.nama, 12) nama,
|
||
|
a.KD_KANWIL,
|
||
|
SUM (wp_bayar) wpbyr,
|
||
|
SUM (wp_bayar_teratur) wpbyrteratur,
|
||
|
sum(wp_bayar_prev_year) wpbyrl,
|
||
|
sum(wp_bayar_teratur_prev_year) WPBRYTERATURL,
|
||
|
sum(jml_wp) jmlwp
|
||
|
FROM GENAPP.RAPOR_WP_BAYAR a
|
||
|
LEFT JOIN GENAPP.REF_KANWIL b ON a.KD_KANWIL = b.KODE
|
||
|
WHERE THN_BYR = '".$tahun."' and b.NAMA IS NOT NULL and bln_byr = to_number('".$bln."')
|
||
|
group by b.nama, a.KD_KANWIL
|
||
|
");
|
||
|
return $query;
|
||
|
}
|
||
|
|
||
|
function getRatKpp($param)
|
||
|
{
|
||
|
$tahun = $param['tahun'];
|
||
|
$query = $this->db->query(" SELECT SUBSTR (b.nama, 12) nama,
|
||
|
a.KD_KANWIL,
|
||
|
SUM (wp_bayar) wpbyr,
|
||
|
SUM (wp_bayar_teratur) wbyrteratur,
|
||
|
sum(wp_bayar_prev_year) wpbyrl,
|
||
|
sum(wp_bayar_teratur_prev_year) WPBRYTERATURL,
|
||
|
sum(jml_wp) jmlwp
|
||
|
FROM GENAPP.RAPOR_WP_BAYAR_TERATUR a
|
||
|
LEFT JOIN GENAPP.REF_KANWIL b ON a.KD_KANWIL = b.KODE
|
||
|
WHERE THN_BYR = '2024' and b.NAMA IS NOT NULL and bln_byr = '4'
|
||
|
group by b.nama, a.KD_KANWIL");
|
||
|
return $query;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|