MERGE_TEST_SELF_CHECK&CROSS_PARENTS

This commit is contained in:
Venba 2024-06-20 06:01:05 +00:00
commit b2314c7c49
4 changed files with 14 additions and 10 deletions

View File

@ -1432,7 +1432,7 @@ class ClientController extends AdminController
}
}
$data['family_floaters']['elders_count'] =$this->request->getPost("member_count") ? $this->request->getPost("member_count") : 0;
$data['family_floaters']['elders_count'] =$this->request->getPost("elder_member_count") ? $this->request->getPost("elder_member_count") : 0;
// print_r($data);die;
@ -1972,8 +1972,6 @@ class ClientController extends AdminController
];
foreach ($client_policy as $key => $value) {
$policy_terms = json_decode($value['policy_terms'], true);
@ -2243,4 +2241,9 @@ class ClientController extends AdminController
return $this->respond(['status' => true, 'data' => $JSON], 200);
}
public function createPolicyTermsHtmlAsJSON(){
}
}

View File

@ -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";
}
}

View File

@ -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;

View File

@ -189,7 +189,7 @@
<table>
<tbody>
<tr>
<td style="width: 22%;" ><div class="other-member-age"><span style="margin-right: 20px;">Elders Count:</span><input class="underline-input" id="member_count" style="width: 30%;;" type="number" name="member_count" disabled id="member_count"></div></td>
<td style="width: 22%;" ><div class="other-member-age"><span style="margin-right: 20px;">Elders Count:</span><input class="underline-input" id="member_count" style="width: 30%; width: 30%;background: lightgray;" type="number" name="elder_member_count" id="member_count" readonly></div></td>
<td style="width: 28%;" ><div class="other-member-age" style="margin-left: 32px;"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo isset($other_member_min_age) ? $other_member_min_age : '18'; ?>" style="width: 35%;;" type="number" class="underline-input min_age" name="other_member_min_age" id="other_member_min_age" oninput="lowerIsEighteen(this)"></div></td>
<td style="width: 28%;" ><div class="other-member-age" style="margin-left: 17px;"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($other_member_max_age) ? $other_member_max_age : '60'; ?>" style="width: 35%;;" type="number" class="underline-input max_age" name="other_member_max_age" id="other_member_max_age" oninput="lowerIsEighteen(this)"></div></td>
</tr>