diff --git a/app/Config/Routes.php b/app/Config/Routes.php index a6529b4..998369a 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -500,3 +500,6 @@ $routes->cli("cli/sendCroneRemainderMail", "DashboardController::sendCroneRemain $routes->get('enrollOpendAndClose', 'DashboardController::updatePolicyEnrollmentStatus'); $routes->get("sendCroneRemainderMail", "DashboardController::sendCroneRemainderMail"); +$routes->get("getEmployeePolicy", "EmployeeRestController::getEmployeePolicy"); +$routes->get("getAddOnPolicy", "EmployeeRestController::getAddOnPolicy"); + diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index f013e9f..eb1a2be 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -1069,6 +1069,7 @@ class ClientController extends AdminController $data['is_member_modify_allowed'] = $this->request->getPost('is_member_modify_allowed') ? 1 : 0; $data['enrolment_visibility'] = $this->request->getPost('enrolment_visibility') ? 1 : 0; $data['is_lgbtq'] = $this->request->getPost('is_lgbtq') ? 1 : 0; + $data['is_premium_summery'] = $this->request->getPost('is_premium_summery') ? 1 : 0; if ($policy_type_id == 1 || $policy_type_id == 2 || $policy_type_id == 6 || $policy_type_id == 7) { @@ -1201,6 +1202,7 @@ class ClientController extends AdminController $data['policy_end_date'] = change_date_format($this->request->getPost('policy_end_date'), 'd-m-Y', 'Y-m-d'); // $data['is_member_modify_allowed'] = $this->request->getPost('is_member_modify_allowed') ? 1 : 0; $data['is_lgbtq'] = $this->request->getPost('is_lgbtq') ? 1 : 0; + $data['is_premium_summery'] = $this->request->getPost('is_premium_summery') ? 1 : 0; if ($data['inception_type'] == 2) { $data['open_date'] = change_date_format($this->request->getPost('open_date'), 'd-m-Y', 'Y-m-d'); @@ -1913,7 +1915,7 @@ class ClientController extends AdminController $emp_count = $this->employeePolicyModel ->join('client_policy cp', "cp.id = employee_polices.client_policy_id") ->where("employee_polices.client_policy_id", $client_policy_id) - ->where("employee_polices.status", 'active') + ->whereIn("employee_polices.status", ['draft', 'enrolled']) ->where("employee_polices.is_active", 1) ->countAllResults(); @@ -2455,7 +2457,7 @@ class ClientController extends AdminController $emp_count_by_policy = $this->employeePolicyModel ->where('client_policy_id', $client_policy_id) - ->where("status", 'active') + ->whereIn("status", ['draft', 'enrolled']) ->where('is_active', 1) ->countAllResults(); @@ -4571,7 +4573,8 @@ class ClientController extends AdminController // $empRest = new EmployeeRestController(); - // $empRest->calculatePremium(393, 'ARCPO7010', 500000, 27); + // // $empRest->calculatePremium(399, 'ZOHO7105', 500000, 145); + // $empRest->updatePremiumAmount(399, 'ZOHO7105', 145); } // ------------------------------------------------------------------------------------------------------- diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 247d940..f13f66e 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -380,7 +380,7 @@ class EmployeeRestController extends AdminController ->where('client_policy_id',$value['policy_details']['client_policy_id'] ) ->where('employee_id' , $value['temp']['emp_id'] ) ->where('is_active', 1 ) - ->set(array('basic_cover_si' => $value['policy_details']['basic_cover_si'],'premium'=> $value['policy_details']['premium'] , 'rata_premimum'=> $value['policy_details']['rata_premimum'] , 'gst'=> $value['policy_details']['gst'] )) + ->set(array('basic_cover_si' => $value['policy_details']['basic_cover_si'],'premium'=> $value['policy_details']['premium'] , 'rata_premimum'=> $value['policy_details']['rata_premimum'] , 'gst'=> $value['policy_details']['gst'], 'payable_employee'=> $value['policy_details']['payable_employee'] ?? 0 )) ->update(); } @@ -1094,7 +1094,7 @@ class EmployeeRestController extends AdminController $keysToRemove = ["removable_keys"]; // Retrieve employee policy data by passing the employee primary key $empPolicy = $this->employeeModel->getEmployeePolicy($id); -// dd($empPolicy); + // dd($empPolicy); // Retrieve employee and dependents data by passing the employee code $employeeData = $this->employeeModel->where('emp_code',$emp_code) ->where('client_id',$client_id) @@ -1158,8 +1158,14 @@ class EmployeeRestController extends AdminController $array->mapped_family_floaters = $self; $array->type = 'GPA'; $array->si_value = $si_value; - $array->si_premium_value = $si_premium_value; - $array->si_gst_value = $si_gst_value; + if($array->is_premium_summery == 1){ + $array->si_premium_value = $si_premium_value; + $array->si_gst_value = $si_gst_value; + }else{ + $array->si_premium_value = 0; + $array->si_gst_value = 0; + } + @@ -1300,8 +1306,13 @@ 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; - $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; + if($array->is_premium_summery == 1){ + $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_premium_value = 0; + $array->family_floaters_of_dependent_and_gst_value = 0; + } $checkGmcParentsPolicyExist = $this->clientPolicyModel->select('client_policy.id as ClientPolicyId , client_policy.client_id as ClientId, client_policy.policy_type_id as policy_type_id, policy_type.long_name as Policy_Name , 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') ->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left') @@ -1500,8 +1511,13 @@ 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; - $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; + if($array->is_premium_summery == 1){ + $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_premium_value = 0; + $array->family_floaters_of_dependent_and_gst_value = 0; + } return $array; @@ -1512,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 ) @@ -1545,8 +1561,13 @@ class EmployeeRestController extends AdminController $array->type = $policyTypeData->policy_type; $array->Policy_Name = $policyTypeData->long_name; $array->si_value = $si_value; - $array->si_premium_value = $si_premium_value; - $array->si_gst_value = $si_gst_value; + if($array->is_premium_summery == 1){ + $array->si_premium_value = round($si_premium_value); + $array->si_gst_value = round($si_gst_value); + }else{ + $array->si_premium_value = 0; + $array->si_gst_value = 0; + } if($employee_policy){ @@ -1812,6 +1833,7 @@ class EmployeeRestController extends AdminController $responce['policy_type_id'] = $array['policy_type_id']; //$responce['is_member_modify_allowed'] = $array['is_member_modify_allowed']; $responce['disclaimer'] = $array['disclaimer']; + $responce['is_premium_summery'] = $array['is_premium_summery']; $tpaArray = $this->employeeModel->select('employees.name as name , employee_polices.tpa_id as tpa_id , employee_polices.rand_string as rand_string') ->join('employee_polices', 'employee_polices.employee_id = employees.id') @@ -1953,8 +1975,14 @@ 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; - $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; + if($array['is_premium_summery']){ + $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_premium_value'] = 0; + $responce['family_floaters_of_dependent_and_gst_value'] = 0; + } + @@ -2015,8 +2043,14 @@ class EmployeeRestController extends AdminController $responce['family_floaters_of_only_si_array'] = $only_si_array; $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; + if($array['is_premium_summery']){ + $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_premium_value'] = 0; + $responce['family_floaters_of_only_si_gst_value'] = 0; + } + if($this->request->getGet('policy') == 'GMC-SI-TOPUP'){ @@ -2071,8 +2105,14 @@ class EmployeeRestController extends AdminController $responce['family_floaters_of_only_si_array'] = $only_si_array; $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); + if($array['is_premium_summery']){ + $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_premium_value'] = 0; + $responce['family_floaters_of_only_si_gst_value'] = 0; + } + if($this->request->getGet('policy') == 'GMC-SI-PARENT-TOPUP'){ @@ -2333,24 +2373,66 @@ class EmployeeRestController extends AdminController $value['policy_details']['rata_premimum'] = 0; $value['policy_details']['premium'] = 0; $value['policy_details']['gst'] = 0; + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['self']; + + }else if(strtolower($value['relationship']) == 'self' && $policyTermsJson['is_payable_employee']['self'] == 1){ + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['self']; } if(strtolower($value['relationship']) == 'spouse' && $policyTermsJson['is_payable_employee']['spouse'] == 0){ $value['policy_details']['rata_premimum'] = 0; $value['policy_details']['premium'] = 0; - $value['policy_details']['gst'] = 0; + $value['policy_details']['gst'] = 0; + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['spouse']; + + }else if(strtolower($value['relationship']) == 'spouse' && $policyTermsJson['is_payable_employee']['spouse'] == 1){ + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['spouse']; } if((strtolower($value['relationship']) == 'son' || strtolower($value['relationship']) == 'daughter') && $policyTermsJson['is_payable_employee']['childern'] == 0){ $value['policy_details']['rata_premimum'] = 0; $value['policy_details']['premium'] = 0; - $value['policy_details']['gst'] = 0; + $value['policy_details']['gst'] = 0; + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['childern']; + + }else if((strtolower($value['relationship']) == 'son' || strtolower($value['relationship']) == 'daughter') && $policyTermsJson['is_payable_employee']['childern'] == 1){ + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['childern']; } if((strtolower($value['relationship']) == 'father in law' || strtolower($value['relationship']) == 'mother in law' || strtolower($value['relationship']) == 'father' || strtolower($value['relationship']) == 'mother' ) && $policyTermsJson['is_payable_employee']['elders'] == 0){ $value['policy_details']['rata_premimum'] = 0; $value['policy_details']['premium'] = 0; - $value['policy_details']['gst'] = 0; + $value['policy_details']['gst'] = 0; + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['elders']; + + }else if((strtolower($value['relationship']) == 'father in law' || strtolower($value['relationship']) == 'mother in law' || strtolower($value['relationship']) == 'father' || strtolower($value['relationship']) == 'mother' ) && $policyTermsJson['is_payable_employee']['elders'] == 1){ + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['elders']; + } + + } + unset($value); + } + }else{ + if(isset($policy_terms['policy_terms'])){ + + $policyTermsJson = json_decode($policy_terms['policy_terms'], true); + + foreach ($employee_data_group_by_family[$emp_code] as $key => &$value) { + + if(strtolower($value['relationship']) == 'self'){ + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['self']; + } + + if(strtolower($value['relationship']) == 'spouse'){ + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['spouse']; + } + + if((strtolower($value['relationship']) == 'son' || strtolower($value['relationship']) == 'daughter')){ + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['childern']; + } + + if((strtolower($value['relationship']) == 'father in law' || strtolower($value['relationship']) == 'mother in law' || strtolower($value['relationship']) == 'father' || strtolower($value['relationship']) == 'mother' )){ + $value['policy_details']['payable_employee'] = $policyTermsJson['is_payable_employee']['elders']; } } @@ -2362,7 +2444,8 @@ class EmployeeRestController extends AdminController } // die(); if($clientPolicyId != null && $empCode != null) - { // dd ($employee_data_group_by_family); + { + // dd ($employee_data_group_by_family); return $employee_data_group_by_family; }else{ // dd ($employee_data_group_by_family); diff --git a/app/Helpers/sendMailNotification.php b/app/Helpers/sendMailNotification.php index bea00db..743ca23 100755 --- a/app/Helpers/sendMailNotification.php +++ b/app/Helpers/sendMailNotification.php @@ -239,22 +239,22 @@ class sendMailNotification $premium = ''; $gst_forself = ''; - // if(checkFamilyFloaters($policy_premium_data, $client_policy_data, $inner_item)){ - - if($policy_premium_data['premium_type'] == 2){ - $si = '₹ ' .format_indian_number($inner_item['basic_cover_si']); - }else{ - if ($inner_item['relationship'] == 'Self') { - $payable_employee_array['si_amount'] = $inner_item['basic_cover_si']; - $payable_employee_array['self_premium'] = $inner_item['rata_premimum']; - $payable_employee_array['self_gst'] = $inner_item['gst']; - } - empty($inner_item['basic_cover_si']) ? $si = 0 : $si = '₹ ' .format_indian_number($inner_item['basic_cover_si']); + if($policy_premium_data['premium_type'] == 2){ + $si = '₹ ' .format_indian_number($inner_item['basic_cover_si']); + }else{ + if ($inner_item['relationship'] == 'Self') { + $payable_employee_array['si_amount'] = $inner_item['basic_cover_si']; + $payable_employee_array['self_premium'] = $inner_item['rata_premimum']; + $payable_employee_array['self_gst'] = $inner_item['gst']; } + empty($inner_item['basic_cover_si']) ? $si = 0 : $si = '₹ ' .format_indian_number($inner_item['basic_cover_si']); + } + // Premium summery for show and hide the Additional premium data + if($client_policy_data['is_premium_summery'] == 1){ $premium = '₹ ' .format_indian_number(round($inner_item['rata_premimum'])); - $gst_forself = '₹ ' .format_indian_number(round($inner_item['gst'])); - // } + $gst_forself = '₹ ' .format_indian_number(round($inner_item['gst'])); + } $temp_data .= ''; $temp_data .= '' . $inner_item['name'] . ($inner_item['relationship'] == 'Self' ? ' (' . $inner_item['emp_code'] . ')' : '') . ''; @@ -268,7 +268,7 @@ class sendMailNotification if ($si != 0 && count($item) != 1 && $is_si_set == 0) { - $temp_data .= '' . $si . ''; + $temp_data .= '' . $si . ''; $is_si_set = 1; } else { @@ -284,7 +284,7 @@ class sendMailNotification } // Only Display SI Topup and Dependent Addon - if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) { + if (($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) && $client_policy_data['is_premium_summery'] == 1) { $temp_data .= '' . $premium . ''; $temp_data .= '' . $gst_forself . ''; } @@ -316,7 +316,7 @@ class sendMailNotification $table_content .= 'Sum Insured'; // Only Display SI Topup and Dependent Addon - if ($is_addon == 2 || $is_addon == 3) { + if (($is_addon == 2 || $is_addon == 3) && $client_policy_data['is_premium_summery'] == 1) { $table_content .= 'Premium'; $table_content .= 'GST'; } @@ -328,7 +328,7 @@ class sendMailNotification $table_content .= '' . $temp_data . ''; $table_content .= ''; - if ($is_addon == 2 || $is_addon == 3) { + if (($is_addon == 2 || $is_addon == 3) && $client_policy_data['is_premium_summery'] == 1) { $addon_list_array = [ 'policy_name' => $policy_name_for_policy_type, 'addtional_premium' => round($addtional_premium), @@ -345,7 +345,7 @@ class sendMailNotification // dd($payable_employee_array); // dd(count($payable_employee_array['emp_data'])); - if(isset($payable_employee_array['emp_data']) && count($payable_employee_array['emp_data']) > 0){ + if(isset($payable_employee_array['emp_data']) && count($payable_employee_array['emp_data']) > 0 && $client_policy_data['is_premium_summery'] == 1){ $table_content .= '

Policy Type :'; $temp_data = ''; @@ -401,30 +401,35 @@ class sendMailNotification // dd($si); - if($policy_premium_data['premium_type'] == 2){ + // Premium summery for show and hide the Additional premium data + if($client_policy_data['is_premium_summery'] == 1){ + if($policy_premium_data['premium_type'] == 2){ - $temp_data .= '' . $si . ''; - $temp_data .= '' . $premium . ''; - $temp_data .= '' . $gst_forself . ''; + $temp_data .= '' . $si . ''; + $temp_data .= '' . $premium . ''; + $temp_data .= '' . $gst_forself . ''; - }else{ - - if($policy_premium_data['premium_type'] == 1){ - - $temp_data .= (($si != 0 && count($item) != 1) ? ('' . $si . '') : ($si == 0 ? "" : '' . $si . '') ); - $temp_data .= (($premium != 0 && count($item) != 1) ? ('' . $premium . '') : ($premium == 0 ? "" : '' . $premium . '') ); - $temp_data .= (($gst_forself != 0 && count($item) != 1) ? ('' . $gst_forself . '') : ($gst_forself == 0 ? "" : '' . $gst_forself . '') ); - }else{ - $temp_data .= (($si != 0 && count($item) != 1) ? ('' . $si . '') : ($si == 0 ? "" : '' . $si . '') ); - $temp_data .= '' . $premium . ''; - $temp_data .= '' . $gst_forself . ''; - } + if($policy_premium_data['premium_type'] == 1){ - $self_si_amount = 0; - $self_premium = 0; - $self_gst = 0; + $temp_data .= (($si != 0 && count($item) != 1) ? ('' . $si . '') : ($si == 0 ? "" : '' . $si . '') ); + $temp_data .= (($premium != 0 && count($item) != 1) ? ('' . $premium . '') : ($premium == 0 ? "" : '' . $premium . '') ); + $temp_data .= (($gst_forself != 0 && count($item) != 1) ? ('' . $gst_forself . '') : ($gst_forself == 0 ? "" : '' . $gst_forself . '') ); + + }else{ + + $temp_data .= (($si != 0 && count($item) != 1) ? ('' . $si . '') : ($si == 0 ? "" : '' . $si . '') ); + $temp_data .= '' . $premium . ''; + $temp_data .= '' . $gst_forself . ''; + } + + $self_si_amount = 0; + $self_premium = 0; + $self_gst = 0; + } + }else{ + $temp_data .= '' . $si . ''; } @@ -451,8 +456,12 @@ class sendMailNotification $table_content .= 'Relation'; $table_content .= 'Date Of Birth'; $table_content .= 'Sum Insured'; - $table_content .= 'Premium'; - $table_content .= 'GST'; + + // Premium summery for show and hide the Additional premium data + if($client_policy_data['is_premium_summery'] == 1){ + $table_content .= 'Premium'; + $table_content .= 'GST'; + } $table_content .= ''; $table_content .= ''; @@ -461,13 +470,15 @@ class sendMailNotification $table_content .= '' . $temp_data . ''; $table_content .= '

'; - - $addon_list_array = [ - 'policy_name' => $policy_name_for_policy_type . '( Payable By Employee )', - 'addtional_premium' => round($addtional_premium), - 'gst' => round($gst) - ]; - $Addon_list[] = $addon_list_array; + // Premium summery for show and hide the Additional premium data + if($client_policy_data['is_premium_summery'] == 1){ + $addon_list_array = [ + 'policy_name' => $policy_name_for_policy_type . '( Payable By Employee )', + 'addtional_premium' => round($addtional_premium), + 'gst' => round($gst) + ]; + $Addon_list[] = $addon_list_array; + } $temp_data = ''; @@ -525,10 +536,7 @@ class sendMailNotification // print_r($mail_content); die; - // $mail = "aadhavanvalli@gmail.com"; - // if (isset($mail) && !empty($mail)) { - $wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails'], 'reply_to' => $client_data['reply_to'], 'common' => $common]; - // } + $wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails'], 'reply_to' => $client_data['reply_to'], 'common' => $common]; return $wholeData; diff --git a/app/Models/ClientPolicyModel.php b/app/Models/ClientPolicyModel.php index 552b3f9..22b8921 100755 --- a/app/Models/ClientPolicyModel.php +++ b/app/Models/ClientPolicyModel.php @@ -55,6 +55,7 @@ class ClientPolicyModel extends Model "cd_ac_pk", "is_auto_si", "is_lgbtq", + "is_premium_summery", ]; // Callbacks diff --git a/app/Models/EmployeeModel.php b/app/Models/EmployeeModel.php index 0826428..97c2dfe 100755 --- a/app/Models/EmployeeModel.php +++ b/app/Models/EmployeeModel.php @@ -155,6 +155,7 @@ class EmployeeModel extends Model client_policy.client_id as ClientId, client_policy.policy_id as PolicyId, client_policy.id as ClientPolicyId, + client_policy.is_premium_summery, CASE WHEN client_policy.open_for_enrollment IS NULL THEN 0 ELSE client_policy.open_for_enrollment diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index c3bc46d..a337d23 100755 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -184,14 +184,14 @@ id="disclaimer">
- +