diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php index 9b4dd5be..e57a84db 100644 --- a/app/Controllers/EmployeeServiceController.php +++ b/app/Controllers/EmployeeServiceController.php @@ -321,6 +321,7 @@ class EmployeeServiceController extends AdminController // get policy and rack details $policy_terms = $this->clientPolicyModel->getPolicyDetails($file['client_id'],$file['policy_id']); + $policy_details = (array)$policy_terms[0]; // dd($this->clientPolicyModel->getLastQuery()); $policy_terms = json_decode($policy_terms[0]->policy_terms); $policy_terms = (array) $policy_terms;// convert obj to array @@ -373,7 +374,7 @@ class EmployeeServiceController extends AdminController } } - if($file['action'] == 'inception') + if(($file['action'] == 'inception' || $file['action'] == 'addition') && ($policy_details['is_addon'] != 3)) // 3 is depent addon { $res = check_self_available_in_family($family,$file['action']); // dd($res);