From fdbc29d31ac4efb371cebcec16218a9709b8e094 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Mon, 12 May 2025 14:59:19 +0530 Subject: [PATCH] FIX_FAMILY_FLOATER_KEY_ISSUE : RV --- app/Controllers/EmployeeServiceController.php | 6 ++++-- app/Helpers/excel_util_helper.php | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php index b76510b..691e625 100755 --- a/app/Controllers/EmployeeServiceController.php +++ b/app/Controllers/EmployeeServiceController.php @@ -2058,12 +2058,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 7a59f25..710ba74 100755 --- a/app/Helpers/excel_util_helper.php +++ b/app/Helpers/excel_util_helper.php @@ -2207,13 +2207,17 @@ 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; } }