@ -34,6 +39,7 @@ class Identifikasi extends \App\Controllers\Kewilayahan\Kytp
$db = \Config\Database::connect();
$db = \Config\Database::connect();
$npwp = $db->table('KPDL_MV_LOKASI_SUBJEK A')->select("CASE WHEN (A.NPWP IS NULL) THEN 'NON NPWP' ELSE 'BER NPWP' END AS IDENTIFIKASI, count(1) JML", false)
$npwp = $db->table('KPDL_MV_LOKASI_SUBJEK A')->select("CASE WHEN (A.NPWP IS NULL) THEN 'NON NPWP' ELSE 'BER NPWP' END AS IDENTIFIKASI, count(1) JML", false)
->where('EXTRACT (YEAR FROM creation_date) <=', $tahun)
->groupBy("CASE WHEN (A.NPWP IS NULL) THEN 'NON NPWP' ELSE 'BER NPWP' END");
->groupBy("CASE WHEN (A.NPWP IS NULL) THEN 'NON NPWP' ELSE 'BER NPWP' END");
if ($opsiWilZona == 'wilayah') {
if ($opsiWilZona == 'wilayah') {
@ -197,8 +203,9 @@ class Identifikasi extends \App\Controllers\Kewilayahan\Kytp
@ -34,7 +34,7 @@ class PayComp extends \App\Controllers\Kewilayahan\Kytp
$db = \Config\Database::connect();
$db = \Config\Database::connect();
//npwp
//npwp
$npwp = $db->table('KPDL_MV_LOKASI_SUBJEK A')->select('A.NPWP')->distinct()->where('A.NPWP IS NOT NULL');
$npwp = $db->table('KPDL_MV_LOKASI_SUBJEK A')->select('A.NPWP')->distinct()->where('A.NPWP IS NOT NULL')->where('EXTRACT (YEAR FROM A.creation_date)<=', $tahun);
if ($opsiWilZona == 'wilayah') {
if ($opsiWilZona == 'wilayah') {
$npwp->whereIn('ADM4_PCODE', $adm4_pcode);
$npwp->whereIn('ADM4_PCODE', $adm4_pcode);
@ -198,13 +198,13 @@ class PayComp extends \App\Controllers\Kewilayahan\Kytp
@ -34,7 +34,7 @@ class Pembayaran extends \App\Controllers\Kewilayahan\Kytp
$db = \Config\Database::connect();
$db = \Config\Database::connect();
//npwp
//npwp
$npwp = $db->table('KPDL_MV_LOKASI_SUBJEK A')->select('A.NPWP')->distinct()->where('A.NPWP IS NOT NULL');
$npwp = $db->table('KPDL_MV_LOKASI_SUBJEK A')->select('A.NPWP')->distinct()->where('A.NPWP IS NOT NULL')->where('EXTRACT (YEAR FROM A.creation_date)<=', $tahun);
if ($opsiWilZona == 'wilayah') {
if ($opsiWilZona == 'wilayah') {
$npwp->whereIn('ADM4_PCODE', $adm4_pcode);
$npwp->whereIn('ADM4_PCODE', $adm4_pcode);
@ -229,12 +229,12 @@ class Pembayaran extends \App\Controllers\Kewilayahan\Kytp
@ -33,7 +33,7 @@ class Sof extends \App\Controllers\Kewilayahan\Kytp
}
}
$db = \Config\Database::connect();
$db = \Config\Database::connect();
//npwp
//npwp
$npwp = $db->table('KPDL_MV_LOKASI_SUBJEK A')->select('A.NPWP')->distinct()->where('A.NPWP IS NOT NULL');
$npwp = $db->table('KPDL_MV_LOKASI_SUBJEK A')->select('A.NPWP')->distinct()->where('A.NPWP IS NOT NULL')->where('EXTRACT (YEAR FROM A.creation_date)<=', $tahun);
if ($opsiWilZona == 'wilayah') {
if ($opsiWilZona == 'wilayah') {
$npwp->whereIn('ADM4_PCODE', $adm4_pcode);
$npwp->whereIn('ADM4_PCODE', $adm4_pcode);
@ -213,11 +213,11 @@ class Sof extends \App\Controllers\Kewilayahan\Kytp