From ef3c9d6fc307c0d4fe4b71788a7e08bdfd0606e9 Mon Sep 17 00:00:00 2001 From: arifal hidayat Date: Fri, 8 Aug 2025 03:53:38 +0700 Subject: [PATCH] fix total non business count and sum --- app/Models/BigdataResume.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Models/BigdataResume.php b/app/Models/BigdataResume.php index 0d81bc1..4e65aeb 100644 --- a/app/Models/BigdataResume.php +++ b/app/Models/BigdataResume.php @@ -54,14 +54,14 @@ class BigdataResume extends Model 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, - 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%') - OR pbg_task.function_type IS NULL) - AND pbg_task.status != 20 THEN 1 END) AS non_business_count, - 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%') - OR pbg_task.function_type IS NULL) - AND pbg_task.status != 20 THEN ptr.nilai_retribusi_bangunan ELSE 0 END) AS non_business_total + 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 pbg_task.status != 20) + 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%' + AND LOWER(TRIM(pbg_task.function_type)) NOT LIKE '%sebagai tempat usaha%' + AND pbg_task.status != 20) + OR pbg_task.function_type IS NULL THEN ptr.nilai_retribusi_bangunan ELSE 0 END) AS non_business_total ") ->first();