diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php index 3be910e8..25b4f08d 100644 --- a/app/Controllers/EmployeeServiceController.php +++ b/app/Controllers/EmployeeServiceController.php @@ -359,7 +359,10 @@ class EmployeeServiceController extends AdminController { $temp = $policy_terms['family_floaters']; $temp = is_array($temp) ? $temp : (is_object($temp) ? (array)$temp : []); - $is_self_available_in_policy_terms = isset($temp['self']) ? true : false; + + $is_self_available_in_policy_terms = isset($temp['self']) && $temp['self'] == 1 ? true : false; + // Kint::dump($temp['self']); + // dd($is_self_available_in_policy_terms); } // dd($employee_data_group_by_family); foreach ($employee_data_group_by_family as $emp_id => $family) @@ -415,7 +418,7 @@ class EmployeeServiceController extends AdminController if(!count($self_details)) { array_push($result['error_summary'],14); // Self not found - $result['error_data'][ $family[0][0] ]['sno']['error'][] = "Self not found in System"; + $result['error_data'][ $family[0][0] ]['sno']['error'][] = "Self not found in Database"; } } diff --git a/app/Helpers/excel_util_helper.php b/app/Helpers/excel_util_helper.php index 5dc29d0d..90d74c3d 100644 --- a/app/Helpers/excel_util_helper.php +++ b/app/Helpers/excel_util_helper.php @@ -603,10 +603,8 @@ if (!function_exists('check_dependent_conflict')) $result['error_data'][] = ['code' => 12,'col_name' => 'sno','msg' => 'Rule conflict: As per policy, count of dependents has exceeded configured count','row_id' => (isset($self_emp_row_id) ? $self_emp_row_id : $family_data[0][0])];//dependent count mismatch } } - - // var_dump($allowed_adults == 0); - // dd($allowed_adults == 0 && (($allowed_parents_count < $received_parents_count) || ($allowed_parent_in_laws_count < $received_parent_in_laws_count))); - if($allowed_adults == 0 && (($allowed_parents_count < $received_parents_count) || ($allowed_parent_in_laws_count < $received_parent_in_laws_count) )) + //check for any cross parents but not more than two + if($allowed_adults == 0 && $allowed_parents_count == 1 && $allowed_parent_in_laws_count == 1 && (2 < ($received_parents_count + $received_parent_in_laws_count))) { // dd($allowed_adults); $result['status'] = false;