From 00d115b7450f1b8f0ab019d4be4a4fb563a1a198 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Fri, 6 Feb 2026 14:18:40 +0530 Subject: [PATCH] FIX_ISSUE --- app/Controllers/EmployeeRestController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 6f8f0a81..1040c97e 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -4803,7 +4803,14 @@ class EmployeeRestController extends AdminController $data = $this->getDataFromHrFileUploadTable($search_data); $table = "hr_file_upload"; }else{ - $client_data = $this->clientModel->where('MD5(id)', $search_data['client_id'])->first(); + + if (is_string($search_data['client_id']) && preg_match('/^[a-f0-9]{32}$/i', $search_data['client_id'])) { + $client_data = $this->clientModel->where('MD5(id)', $search_data['client_id'])->first(); + $search_data['client_id'] = $client_data['id']; + } else { + $client_data = $this->clientModel->where('id', $search_data['client_id'])->first(); + } + if($client_data['hr_file_processed_by'] == 1){ $data = $this->getDataFromHrFilesTable($search_data); $table = "files";