From c94550a48df942aac19d265ae00070bb5669da5a Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Mon, 12 May 2025 15:09:23 +0530 Subject: [PATCH] FIX_FAMILY_FLOATER_KEY_ISSUE : RV --- app/Controllers/EmployeeServiceController.php | 6 ++++-- app/Helpers/excel_util_helper.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php index 9917796f..4d130194 100755 --- a/app/Controllers/EmployeeServiceController.php +++ b/app/Controllers/EmployeeServiceController.php @@ -2077,12 +2077,14 @@ public function getFileMetaDataByFileId($file_id, $status = 'success'){ $relation = 'parent'; } else if(strtolower(trim($value['relationship'])) === 'son' || strtolower(trim($value['relationship'])) === 'daughter'){ $relation = 'child'; - }else if(strtolower(trim($value['relationship'])) === 'father in law' || strtolower(trim($value['relationship'])) === 'mother in law'){ + }else if((strtolower(trim($value['relationship'])) === 'father in law' || strtolower(trim($value['relationship'])) === 'mother in law') || (strtolower(trim($value['relationship'])) === 'father-in-law' || strtolower(trim($value['relationship'])) === 'mother-in-law')){ $relation = 'parent_in_law'; }else if(strtolower(trim($value['relationship'])) === 'spouse'){ $relation = 'spouse'; - }else{ + }else if(strtolower(trim($value['relationship'])) === 'self'){ $relation = 'self'; + }else { + $relation = ''; } $value['family_floater_key'] = $relation; diff --git a/app/Helpers/excel_util_helper.php b/app/Helpers/excel_util_helper.php index d2e30828..67ffc9b1 100755 --- a/app/Helpers/excel_util_helper.php +++ b/app/Helpers/excel_util_helper.php @@ -2210,12 +2210,14 @@ if (!function_exists('generate_family_floater_key')) { $relation = 'parent'; } else if (strtolower(trim($relationship)) === 'son' || strtolower(trim($relationship)) === 'daughter') { $relation = 'child'; - } else if (strtolower(trim($relationship)) === 'father in Law' || strtolower(trim($relationship)) === 'mother in Law') { + }else if((strtolower(trim($relationship)) === 'father in Law' || strtolower(trim($relationship)) === 'mother in Law') || (strtolower(trim($relationship)) === 'father-in-Law' || strtolower(trim($relationship)) === 'mother-in-Law')){ $relation = 'parent_in_law'; } else if (strtolower(trim($relationship)) === 'spouse') { $relation = 'spouse'; - } else { + } else if(strtolower(trim($relationship)) === 'self'){ $relation = 'self'; + }else{ + $relation = ''; } return $relation;