fix total non business count and sum

This commit is contained in:
arifal hidayat
2025-08-08 03:53:38 +07:00
parent 1288ab509d
commit ef3c9d6fc3

View File

@@ -54,14 +54,14 @@ class BigdataResume extends Model
OR LOWER(TRIM(pbg_task.function_type)) LIKE '%sebagai tempat usaha%') OR LOWER(TRIM(pbg_task.function_type)) LIKE '%sebagai tempat usaha%')
AND pbg_task.status != 20 THEN ptr.nilai_retribusi_bangunan ELSE 0 END) AS business_total, AND pbg_task.status != 20 THEN ptr.nilai_retribusi_bangunan ELSE 0 END) AS business_total,
COUNT(CASE WHEN ((LOWER(TRIM(pbg_task.function_type)) NOT LIKE '%fungsi usaha%' COUNT(CASE WHEN (LOWER(TRIM(pbg_task.function_type)) NOT LIKE '%fungsi usaha%'
AND LOWER(TRIM(pbg_task.function_type)) NOT LIKE '%sebagai tempat usaha%') AND LOWER(TRIM(pbg_task.function_type)) NOT LIKE '%sebagai tempat usaha%'
OR pbg_task.function_type IS NULL) AND pbg_task.status != 20)
AND pbg_task.status != 20 THEN 1 END) AS non_business_count, OR pbg_task.function_type IS NULL THEN 1 END) AS non_business_count,
SUM(CASE WHEN ((LOWER(TRIM(pbg_task.function_type)) NOT LIKE '%fungsi usaha%' SUM(CASE WHEN (LOWER(TRIM(pbg_task.function_type)) NOT LIKE '%fungsi usaha%'
AND LOWER(TRIM(pbg_task.function_type)) NOT LIKE '%sebagai tempat usaha%') AND LOWER(TRIM(pbg_task.function_type)) NOT LIKE '%sebagai tempat usaha%'
OR pbg_task.function_type IS NULL) AND pbg_task.status != 20)
AND pbg_task.status != 20 THEN ptr.nilai_retribusi_bangunan ELSE 0 END) AS non_business_total OR pbg_task.function_type IS NULL THEN ptr.nilai_retribusi_bangunan ELSE 0 END) AS non_business_total
") ")
->first(); ->first();