From 7e23f18b2bcfeba95b70465b3b25fdb6d7c74a55 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Thu, 22 May 2025 15:42:08 +0530 Subject: [PATCH] FIX_MOBIL_NO_VATION : RV --- app/Helpers/excel_util_helper.php | 6 +++--- app/Models/EmployeePolicyModel.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Helpers/excel_util_helper.php b/app/Helpers/excel_util_helper.php index 710ba74..79a9b23 100755 --- a/app/Helpers/excel_util_helper.php +++ b/app/Helpers/excel_util_helper.php @@ -1762,10 +1762,10 @@ if(!function_exists('remap_default_age_ratio_into_relationship')) if(!function_exists('check_dup_mobileno')) { function check_dup_mobileno(array $row,array $existing_mobilenos) - { + { foreach($existing_mobilenos as $k => $value) { - if ($row['12'] == $value['mobile']) { + if (strtolower($row['5']) == 'self' && $row['12'] == $value['mobile']) { return array('status' => false,'error' => "Duplicate Mobile No"); // break; } @@ -1780,7 +1780,7 @@ if(!function_exists('check_dup_email')) { foreach($existing_mobilenos as $k => $value) { - if ($row['13'] == $value['email_corporate']) { + if (strtolower($row['5']) == 'self' && $row['13'] == $value['email_corporate']) { return array('status' => false,'error' => "Duplicate Email"); // break; } diff --git a/app/Models/EmployeePolicyModel.php b/app/Models/EmployeePolicyModel.php index 2158b04..ff80bc7 100755 --- a/app/Models/EmployeePolicyModel.php +++ b/app/Models/EmployeePolicyModel.php @@ -1414,8 +1414,8 @@ class EmployeePolicyModel extends Model ->join('employees emp', 'employee_polices.employee_id = emp.id') ->join('client_policy cp', 'employee_polices.client_policy_id = cp.id') ->where('employee_polices.client_policy_id',$client_policy_id) - ->whereIn('employee_polices.status', ['Active']) - ->whereIn('emp.emp_status', ['Active']) + ->whereIn('employee_polices.status', ['draft', 'enrolled']) + ->whereIn('emp.emp_status', ['draft', 'enrolled']) ->where('emp.is_active', 1) ->where('emp.relationship', 'Self') ->where('emp.mobile is not null')