From bb63ea8084483997eb5a9b5603926fd88836c313 Mon Sep 17 00:00:00 2001 From: arifal hidayat Date: Fri, 15 Aug 2025 02:51:17 +0700 Subject: [PATCH] fix business data --- app/Http/Controllers/Api/RequestAssignmentController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Api/RequestAssignmentController.php b/app/Http/Controllers/Api/RequestAssignmentController.php index b912ada..4cb78e8 100644 --- a/app/Http/Controllers/Api/RequestAssignmentController.php +++ b/app/Http/Controllers/Api/RequestAssignmentController.php @@ -36,8 +36,8 @@ class RequestAssignmentController extends Controller case 'non-business': $query->where(function ($q) { $q->where(function ($q2) { - $q2->whereRaw("LOWER(function_type) NOT LIKE ?", ['%fungsi usaha%']) - ->whereRaw("LOWER(function_type) NOT LIKE ?", ['%sebagai tempat usaha%']) + $q2->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%fungsi usaha%']) + ->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%sebagai tempat usaha%']) ->whereIn("status", PbgTaskStatus::getNonVerified()); }) ->orWhere(function ($q3) { @@ -50,8 +50,8 @@ class RequestAssignmentController extends Controller case 'business': $query->where(function ($q) { $q->where(function ($q2) { - $q2->whereRaw("LOWER(function_type) LIKE ?", ['%fungsi usaha%']) - ->orWhereRaw("LOWER(function_type) LIKE ?", ['%sebagai tempat usaha%']) + $q2->whereRaw("LOWER(TRIM(function_type)) LIKE ?", ['%fungsi usaha%']) + ->orWhereRaw("LOWER(TRIM(function_type)) LIKE ?", ['%sebagai tempat usaha%']) ->whereIn("status", PbgTaskStatus::getNonVerified()); }); });