|
|
|
@ -43,13 +43,14 @@ class MKanwil extends Model
|
|
|
|
|
$tahun = $param['tahun']; |
|
|
|
|
$tahunl = $tahun - 1; |
|
|
|
|
$bln = $param['bln']; |
|
|
|
|
$kwl = $param['kwl']; |
|
|
|
|
$query = $this->db->query("SELECT CASE WHEN KD_KATEGORI IS NULL THEN '-' ELSE KD_KATEGORI END KODE, |
|
|
|
|
CASE WHEN KD_KATEGORI IS NULL THEN 'UNKNOWN' ELSE NM_KATEGORI END NMKAT, |
|
|
|
|
SUM(CASE WHEN THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN WPBAYAR ELSE 0 END)WPBYRN, |
|
|
|
|
SUM(CASE WHEN THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN WPBAYAR ELSE 0 END)WPBYRP, |
|
|
|
|
SUM(CASE WHEN THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN ROUND(TOTAL) ELSE 0 END) KPENN, |
|
|
|
|
SUM(CASE WHEN THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN ROUND(TOTAL) ELSE 0 END) KPENP |
|
|
|
|
FROM PERKATEGORI_MV |
|
|
|
|
FROM KWLPERKATEGORI_MV WHERE KWLADM = '".$kwl."' |
|
|
|
|
GROUP BY KD_KATEGORI,NM_KATEGORI |
|
|
|
|
ORDER BY KD_KATEGORI ASC |
|
|
|
|
"); |
|
|
|
@ -62,13 +63,14 @@ class MKanwil extends Model
|
|
|
|
|
$tahun = $param['tahun']; |
|
|
|
|
$tahunl = $tahun - 1; |
|
|
|
|
$bln = $param['bln']; |
|
|
|
|
$kwl = $param['kwl']; |
|
|
|
|
$query = $this->db->query("SELECT NM_PAJAK,TOTALN PENERIMAAN, TOTALP PENL, |
|
|
|
|
(SELECT ROUND(SUM(TOTAL)) FROM PERJENIS_MV WHERE THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "') PENERIMAAN_TOT, |
|
|
|
|
(SELECT ROUND(SUM(TOTAL)) FROM PERJENIS_MV WHERE THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "') PENERIMAAN_TOTL |
|
|
|
|
(SELECT ROUND(SUM(TOTAL)) FROM KWLPERJENIS_MV WHERE THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "') PENERIMAAN_TOT, |
|
|
|
|
(SELECT ROUND(SUM(TOTAL)) FROM KWLPERJENIS_MV WHERE THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "') PENERIMAAN_TOTL |
|
|
|
|
FROM ( |
|
|
|
|
SELECT NM_PAJAK,ROUND(SUM(CASE WHEN THNBYR= '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN TOTAL ELSE 0 END)) TOTALN, |
|
|
|
|
ROUND(SUM(CASE WHEN THNBYR= '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN TOTAL ELSE 0 END)) TOTALP |
|
|
|
|
FROM PERJENIS_MV |
|
|
|
|
FROM KWLPERJENIS_MV WHERE KWLADM = '".$kwl."' |
|
|
|
|
GROUP BY NM_PAJAK ORDER BY TOTALN DESC) WHERE ROWNUM < = 7 |
|
|
|
|
"); |
|
|
|
|
return $query; |
|
|
|
@ -80,11 +82,12 @@ class MKanwil extends Model
|
|
|
|
|
$tahun = $param['tahun']; |
|
|
|
|
$tahunl = $tahun - 1; |
|
|
|
|
$bln = $param['bln']; |
|
|
|
|
$kwl = $param['kwl']; |
|
|
|
|
$query = $this->db->query("SELECT A.JMLBULAN, A.JUMLAHWP,B.JUMLAHWP JUMLAHWPP FROM |
|
|
|
|
(SELECT TO_NUMBER(BLNBYR) JMLBULAN,JUMLAHWP FROM PAYCOMPNAS |
|
|
|
|
WHERE THNBYR = '" . $tahun . "') A, |
|
|
|
|
(SELECT TO_NUMBER(BLNBYR) JMLBULAN,JUMLAHWP FROM PAYCOMPNAS |
|
|
|
|
WHERE THNBYR = '" . $tahunl . "') B |
|
|
|
|
(SELECT TO_NUMBER(BLNBYR) JMLBULAN,JUMLAHWP FROM KWLPAYCOMPNAS |
|
|
|
|
WHERE THNBYR = '" . $tahun . "' AND BLNBYR <= '".$bln."' AND KWLADM = '".$kwl."') A, |
|
|
|
|
(SELECT TO_NUMBER(BLNBYR) JMLBULAN,JUMLAHWP FROM KWLPAYCOMPNAS |
|
|
|
|
WHERE THNBYR = '" . $tahunl ."' AND BLNBYR <= '" . $bln . "' AND KWLADM = '" . $kwl . "') B |
|
|
|
|
WHERE A.JMLBULAN =B.JMLBULAN |
|
|
|
|
ORDER BY A.JMLBULAN ASC"); |
|
|
|
|
return $query; |
|
|
|
@ -94,11 +97,12 @@ class MKanwil extends Model
|
|
|
|
|
{ |
|
|
|
|
$tahun = $param['tahun']; |
|
|
|
|
$bln = $param['bln']; |
|
|
|
|
$kwl = $param['kwl']; |
|
|
|
|
$query = $this->db->query("SELECT NO,LAPISAN,WPBYR,TOTAL, |
|
|
|
|
(SELECT SUM(ROUND(WPBYR/2)) FROM SOFNAS WHERE THNBYR = '" . $tahun . "' AND BLNBYR < = '" . $bln . "') TOTWPBYR, |
|
|
|
|
(SELECT SUM(TOTAL) FROM SOFNAS WHERE THNBYR = '" . $tahun . "' AND BLNBYR < = '" . $bln . "') TOTALL |
|
|
|
|
(SELECT SUM(ROUND(WPBYR/2)) FROM KWLSOFNAS WHERE THNBYR = '" . $tahun . "' AND BLNBYR < = '" . $bln . "' AND KWLADM = '".$kwl."') TOTWPBYR, |
|
|
|
|
(SELECT SUM(TOTAL) FROM KWLSOFNAS WHERE THNBYR = '" . $tahun . "' AND BLNBYR < = '" . $bln . "' AND KWLADM = '".$kwl."') TOTALL |
|
|
|
|
FROM ( |
|
|
|
|
SELECT NO,LAPISAN,SUM(ROUND(WPBYR/2)) WPBYR,SUM(ROUND(TOTAL)) TOTAL FROM SOFNAS WHERE THNBYR = '" . $tahun . "' AND BLNBYR < = '" . $bln . "' |
|
|
|
|
SELECT NO,LAPISAN,SUM(ROUND(WPBYR/2)) WPBYR,SUM(ROUND(TOTAL)) TOTAL FROM KWLSOFNAS WHERE THNBYR = '" . $tahun . "' AND BLNBYR < = '" . $bln . "' AND KWLADM = '".$kwl."' |
|
|
|
|
GROUP BY NO,LAPISAN) ORDER BY NO ASC "); |
|
|
|
|
return $query; |
|
|
|
|
} |
|
|
|
@ -110,11 +114,12 @@ class MKanwil extends Model
|
|
|
|
|
return $builder->get()->getResult(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function getWpsk() |
|
|
|
|
function getWpsk($param) |
|
|
|
|
{ |
|
|
|
|
$kwl = $param['kwl']; |
|
|
|
|
$query = $this->db->query("SELECT SUM(CASE WHEN FLAG_WPS_WPK = 'WPK' THEN JUMLAHWP ELSE 0 END) WPK, |
|
|
|
|
SUM(CASE WHEN FLAG_WPS_WPK = 'WPS' THEN JUMLAHWP ELSE 0 END) WPS |
|
|
|
|
FROM WPSK_MV"); |
|
|
|
|
FROM WPSK_MV WHERE KWLADM = '".$kwl."'"); |
|
|
|
|
return $query; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -123,6 +128,7 @@ class MKanwil extends Model
|
|
|
|
|
$tahun = $param['tahun']; |
|
|
|
|
$tahunl = $tahun - 1; |
|
|
|
|
$bln = $param['bln']; |
|
|
|
|
$kwl = $param['kwl']; |
|
|
|
|
$query = $this->db->query("SELECT |
|
|
|
|
SUM(CASE WHEN FLAG_WPS_WPK = 'WPS' AND THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN WPBYR ELSE 0 END) WPSWP, |
|
|
|
|
SUM(CASE WHEN FLAG_WPS_WPK = 'WPS' AND THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN WPBYR ELSE 0 END) WPSWPL, |
|
|
|
@ -132,7 +138,7 @@ class MKanwil extends Model
|
|
|
|
|
SUM(CASE WHEN FLAG_WPS_WPK = 'WPK' AND THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN WPBYR ELSE 0 END) WPKWPL, |
|
|
|
|
SUM(CASE WHEN FLAG_WPS_WPK = 'WPK' AND THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN ROUND(TOTAL) ELSE 0 END) WPKBYRN, |
|
|
|
|
SUM(CASE WHEN FLAG_WPS_WPK = 'WPK' AND THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN ROUND(TOTAL) ELSE 0 END) WPKBYRP |
|
|
|
|
FROM BREAKDOWN_PEN"); |
|
|
|
|
FROM BREAKDOWN_PEN WHERE KWLADM = '".$kwl."' "); |
|
|
|
|
return $query; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -140,12 +146,12 @@ class MKanwil extends Model
|
|
|
|
|
{ |
|
|
|
|
$tahun = $param['tahun']; |
|
|
|
|
$tahunl = $tahun - 1; |
|
|
|
|
|
|
|
|
|
$kwl = $param['kwl']; |
|
|
|
|
|
|
|
|
|
$query = $this->db->query("SELECT |
|
|
|
|
SUM(CASE WHEN TAHUN <= '" . $tahun . "' THEN JUMLAHWP ELSE 0 END) WPADMNOW, |
|
|
|
|
SUM(CASE WHEN TAHUN <= '" . $tahunl . "' THEN JUMLAHWP ELSE 0 END) WPADMPAST |
|
|
|
|
FROM WP_TERDAFTAR"); |
|
|
|
|
FROM WP_TERDAFTAR WHERE KWLADM = '".$kwl."'"); |
|
|
|
|
return $query; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -153,10 +159,10 @@ class MKanwil extends Model
|
|
|
|
|
{ |
|
|
|
|
$tahun = $param['tahun']; |
|
|
|
|
$tahunl = $tahun - 1; |
|
|
|
|
|
|
|
|
|
$kwl = $param['kwl']; |
|
|
|
|
$query = $this->db->query("SELECT SUM(CASE WHEN TAHUN = '" . $tahun . "' THEN JMLLAPOR ELSE 0 END) LAPORNOW, |
|
|
|
|
SUM(CASE WHEN TAHUN = '" . $tahunl . "' THEN JMLLAPOR ELSE 0 END) LAPORPAST |
|
|
|
|
FROM DASH_SPTTAHUNAN"); |
|
|
|
|
FROM DASH_SPTTAHUNAN WHERE KWLADM = '".$kwl."'"); |
|
|
|
|
return $query; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|