From 1a7b92befb2b23a3089e839b9488718d7858e77b Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Thu, 19 Feb 2026 11:14:25 +0530 Subject: [PATCH] FIX_CLIENT_DETAILS --- app/Controllers/EmployeeRestController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 16dfc91..c5d99b3 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -2189,15 +2189,19 @@ class EmployeeRestController extends AdminController if (!empty($pre_client_id)) { + if (is_string($pre_client_id) && preg_match('/^[a-f0-9]{32}$/i', $pre_client_id)) { + $client = $this->clientModel->where('MD5(id)', $pre_client_id)->first(); + }else{ + $client = $this->clientModel->where('id', $pre_client_id)->first(); + } - $client = $this->clientModel->where('id', $pre_client_id)->first(); if ($client) { $client['client_logo'] = base_url() . 'public/uploads/logo/' . $client['client_logo']; $clientPolicy = $this->clientPolicyModel - ->where('client_id', $pre_client_id) + ->where('client_id', $client['id'] ?? null) ->where('client_branch_id', $pre_branch_id) ->findAll();