diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index b9a5aea..884af1f 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -1157,12 +1157,11 @@ class EmployeeRestController extends AdminController $array->mapped_family_floaters = $self; $array->type = 'GPA'; + $array->si_value = $si_value; if($array->is_premium_summery == 1){ - $array->si_value = $si_value; $array->si_premium_value = $si_premium_value; $array->si_gst_value = $si_gst_value; }else{ - $array->si_value = 0; $array->si_premium_value = 0; $array->si_gst_value = 0; } @@ -1306,12 +1305,11 @@ class EmployeeRestController extends AdminController $array->mapped_family_floaters = $data; $array->type = "GMC"; + $array->family_floaters_of_dependent_and_si_value = $dependent_and_si_value > 0 ? $dependent_and_si_value : 0; if($array->is_premium_summery == 1){ - $array->family_floaters_of_dependent_and_si_value = $dependent_and_si_value > 0 ? $dependent_and_si_value : 0; $array->family_floaters_of_dependent_and_si_premium_value = $dependent_and_si_premium_value > 0 ? round($dependent_and_si_premium_value) : 0; $array->family_floaters_of_dependent_and_gst_value = $dependent_and_si_gst_value > 0 ? round($dependent_and_si_gst_value) : 0; }else{ - $array->family_floaters_of_dependent_and_si_value = 0; $array->family_floaters_of_dependent_and_si_premium_value = 0; $array->family_floaters_of_dependent_and_gst_value = 0; } @@ -1512,12 +1510,11 @@ class EmployeeRestController extends AdminController $array->mapped_family_floaters = $data; $array->type = "GMC - Parents"; + $array->family_floaters_of_dependent_and_si_value = $dependent_and_si_value > 0 ? $dependent_and_si_value : 0; if($array->is_premium_summery == 1){ - $array->family_floaters_of_dependent_and_si_value = $dependent_and_si_value > 0 ? $dependent_and_si_value : 0; $array->family_floaters_of_dependent_and_si_premium_value = $dependent_and_si_premium_value > 0 ? round($dependent_and_si_premium_value) : 0; $array->family_floaters_of_dependent_and_gst_value = $dependent_and_si_gst_value > 0 ? round($dependent_and_si_gst_value) : 0; }else{ - $array->family_floaters_of_dependent_and_si_value = 0; $array->family_floaters_of_dependent_and_si_premium_value = 0; $array->family_floaters_of_dependent_and_gst_value = 0; } @@ -1531,7 +1528,7 @@ class EmployeeRestController extends AdminController public function getAdditionalGPAPolicy($empData,$policy_type,$emp_code,$client_id,$client_branch_id,$login_by_hr) { - $checkPolicyExist = $this->clientPolicyModel->select('client_policy.id as ClientPolicyId , client_policy.client_id as ClientId, client_policy.policy_type_id as policy_type_id, client_policy.is_addon as is_addon , client_policy.open_for_enrollment as OpenForEnrollment , client_policy.inception_type as inception_type , client_policy.policy_terms as Policy_Terms , client_policy.enrolment_visibility') + $checkPolicyExist = $this->clientPolicyModel->select('client_policy.id as ClientPolicyId , client_policy.client_id as ClientId, client_policy.policy_type_id as policy_type_id, client_policy.is_addon as is_addon , client_policy.open_for_enrollment as OpenForEnrollment , client_policy.inception_type as inception_type , client_policy.policy_terms as Policy_Terms , client_policy.enrolment_visibility,client_policy.is_premium_summery') ->where('client_policy.policy_type_id', $policy_type ) ->where('client_policy.is_addon', 1 ) ->where('client_policy.client_id', $client_id ) @@ -1563,12 +1560,11 @@ class EmployeeRestController extends AdminController $array->type = $policyTypeData->policy_type; $array->Policy_Name = $policyTypeData->long_name; + $array->si_value = $si_value; if($array->is_premium_summery == 1){ - $array->si_value = $si_value; $array->si_premium_value = $si_premium_value; $array->si_gst_value = $si_gst_value; }else{ - $array->si_value = 0; $array->si_premium_value = 0; $array->si_gst_value = 0; } @@ -1978,12 +1974,11 @@ class EmployeeRestController extends AdminController } $responce['family_floaters_of_dependent_and_si_array'] = $data; + $responce['family_floaters_of_dependent_and_si_value'] = $dependent_and_si_value > 0 ? $dependent_and_si_value : 0; if($array['is_premium_summery']){ - $responce['family_floaters_of_dependent_and_si_value'] = $dependent_and_si_value > 0 ? $dependent_and_si_value : 0; $responce['family_floaters_of_dependent_and_si_premium_value'] = $dependent_and_si_premium_value > 0 ? round($dependent_and_si_premium_value) : 0; $responce['family_floaters_of_dependent_and_gst_value'] = $dependent_and_si_gst_value > 0 ? round($dependent_and_si_gst_value) : 0; }else{ - $responce['family_floaters_of_dependent_and_si_value'] = 0; $responce['family_floaters_of_dependent_and_si_premium_value'] = 0; $responce['family_floaters_of_dependent_and_gst_value'] = 0; } @@ -2047,12 +2042,11 @@ class EmployeeRestController extends AdminController } $responce['family_floaters_of_only_si_array'] = $only_si_array; + $responce['family_floaters_of_only_si_value'] = $only_si_value; if($array['is_premium_summery']){ - $responce['family_floaters_of_only_si_value'] = $only_si_value; $responce['family_floaters_of_only_si_premium_value'] = round($only_si_premium_value); $responce['family_floaters_of_only_si_gst_value'] = $only_si_gst_value; }else{ - $responce['family_floaters_of_only_si_value'] = 0; $responce['family_floaters_of_only_si_premium_value'] = 0; $responce['family_floaters_of_only_si_gst_value'] = 0; } @@ -2110,12 +2104,11 @@ class EmployeeRestController extends AdminController } $responce['family_floaters_of_only_si_array'] = $only_si_array; + $responce['family_floaters_of_only_si_value'] = $only_si_value; if($array['is_premium_summery']){ - $responce['family_floaters_of_only_si_value'] = $only_si_value; $responce['family_floaters_of_only_si_premium_value'] = round($only_si_premium_value); $responce['family_floaters_of_only_si_gst_value'] = round($only_si_gst_value); }else{ - $responce['family_floaters_of_only_si_value'] = 0; $responce['family_floaters_of_only_si_premium_value'] = 0; $responce['family_floaters_of_only_si_gst_value'] = 0; }