FIX_CONFIRMATION_MAIL_TEMPLATE_AND_ENROLLMENT_VISIBILITY : RV

This commit is contained in:
VENKATESHWARAN 2025-08-21 14:57:28 +05:30
parent 7d934d781d
commit d3f1335a22
4 changed files with 13 additions and 10 deletions

View File

@ -1970,7 +1970,7 @@ class EmployeeController extends AdminController
$policy_terms = isset($policy_details['policy_terms']) ? true : false; $policy_terms = isset($policy_details['policy_terms']) ? true : false;
$si_enhancement_true_or_false = 1; $si_enhancement_true_or_false = 1;
if($policy_terms){ if($policy_terms == true){
$policyTermsData = json_decode($policy_details['policy_terms']); $policyTermsData = json_decode($policy_details['policy_terms']);
if (isset($policyTermsData->suminsuredenhancement) && $policyTermsData->suminsuredenhancement !== null) { if (isset($policyTermsData->suminsuredenhancement) && $policyTermsData->suminsuredenhancement !== null) {
@ -1983,7 +1983,7 @@ class EmployeeController extends AdminController
$message = null; $message = null;
if (!isset($policy_terms)) { if ($policy_terms == false) {
$message .= 'Policy terms'; $message .= 'Policy terms';
} }
@ -1993,7 +1993,7 @@ class EmployeeController extends AdminController
} }
$message = isset($message) ? ($message . ' not defined for choosed policy') : null; $message = isset($message) ? ($message . ' not defined for choosed policy') : null;
return $this->respond(['dataStatus' => true, 'code' => 200, 'message' => $message, 'si_enhancement' => $si_enhancement_true_or_false, 'insurer_multi_event' => $insurer_details['is_multi_event']], 200); return $this->respond(['dataStatus' => true, 'code' => 200, 'message' => $message, 'si_enhancement' => $si_enhancement_true_or_false, 'insurer_multi_event' => $insurer_details['is_multi_event'] ?? null], 200);
} }

View File

@ -1335,13 +1335,14 @@ class EmployeeRestController extends AdminController
$array->family_floaters_of_dependent_and_gst_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') $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, client_policy.enrolment_visibility')
->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left') ->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left')
->where('client_policy.policy_type_id', 3 ) ->where('client_policy.policy_type_id', 3 )
->where('client_policy.is_addon', 1 ) ->where('client_policy.is_addon', 1 )
->where('client_policy.client_id', $this->request->getGet('client_id') ) ->where('client_policy.client_id', $this->request->getGet('client_id') )
->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') ) ->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') )
->where('client_policy.is_active', 1 ) ->where('client_policy.is_active', 1 )
->where('client_policy.enrolment_visibility', 1 )
->get() ->get()
->getResult(); ->getResult();
if($checkGmcParentsPolicyExist) if($checkGmcParentsPolicyExist)
@ -1903,6 +1904,7 @@ class EmployeeRestController extends AdminController
->where('client_branch_id',$this->request->getGet('client_branch_id')) ->where('client_branch_id',$this->request->getGet('client_branch_id'))
->where('policy_status', 1) ->where('policy_status', 1)
->where('is_active', 1) ->where('is_active', 1)
->where('enrolment_visibility', 1)
->findAll(); ->findAll();
if(count($clientPolicy)) if(count($clientPolicy))

View File

@ -11,6 +11,7 @@ use App\Models\EmployeeModel;
use App\Models\PolicyPremium1Model; use App\Models\PolicyPremium1Model;
use App\Models\PolicyPremium2Model; use App\Models\PolicyPremium2Model;
use App\Models\MailAttachmentModel; use App\Models\MailAttachmentModel;
use Kint\Kint;
class sendMailNotification class sendMailNotification
{ {
@ -342,10 +343,10 @@ class sendMailNotification
$gst = 0; $gst = 0;
} }
// dd($payable_employee_array); // Kint::dump($payable_employee_array);
// dd(count($payable_employee_array['emp_data'])); // dd(count($payable_employee_array['emp_data']));
if(isset($payable_employee_array['emp_data']) && count($payable_employee_array['emp_data']) > 0 && $client_policy_data['is_premium_summery'] == 1){ if(isset($payable_employee_array['emp_data']) && count($payable_employee_array['emp_data']) > 0){
$table_content .= '<div style="text-align: left; font-size: 12px;"><div style="text-align:left;"><h4>Policy Type :'; $table_content .= '<div style="text-align: left; font-size: 12px;"><div style="text-align:left;"><h4>Policy Type :';
$temp_data = ''; $temp_data = '';
@ -402,7 +403,7 @@ class sendMailNotification
// dd($si); // dd($si);
// Premium summery for show and hide the Additional premium data // Premium summery for show and hide the Additional premium data
if($client_policy_data['is_premium_summery'] == 1){ if($inner_item['payable_employee'] == 1 || $client_policy_data['is_premium_summery'] == 1){
if($policy_premium_data['premium_type'] == 2){ if($policy_premium_data['premium_type'] == 2){
$temp_data .= '<td>' . $si . '</td>'; $temp_data .= '<td>' . $si . '</td>';
@ -458,7 +459,7 @@ class sendMailNotification
$table_content .= '<th>Sum Insured</th>'; $table_content .= '<th>Sum Insured</th>';
// Premium summery for show and hide the Additional premium data // Premium summery for show and hide the Additional premium data
if($client_policy_data['is_premium_summery'] == 1){ if($inner_item['payable_employee'] == 1 || $client_policy_data['is_premium_summery'] == 1){
$table_content .= '<th>Premium</th>'; $table_content .= '<th>Premium</th>';
$table_content .= '<th>GST</th>'; $table_content .= '<th>GST</th>';
} }
@ -471,7 +472,7 @@ class sendMailNotification
$table_content .= '</table></div>'; $table_content .= '</table></div>';
// Premium summery for show and hide the Additional premium data // Premium summery for show and hide the Additional premium data
if($client_policy_data['is_premium_summery'] == 1){ if($inner_item['payable_employee'] == 1 || $client_policy_data['is_premium_summery'] == 1){
$addon_list_array = [ $addon_list_array = [
'policy_name' => $policy_name_for_policy_type . '( Payable By Employee )', 'policy_name' => $policy_name_for_policy_type . '( Payable By Employee )',
'addtional_premium' => round($addtional_premium), 'addtional_premium' => round($addtional_premium),

View File

@ -354,7 +354,7 @@ label {
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<input type="text" name="waiverof30dayswaitingperiod" class="form-control waiverof30dayswaitingperiod" <input type="text" name="waiverof30dayswaitingperiod" class="form-control waiverof30dayswaitingperiod"
value="1"> value="">
</div> </div>
</div> </div>