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')