CHANGE_HANDLE_MULTIPLE_REMAINDER_DATE_AND_OTHERS : RV
This commit is contained in:
parent
2535bbad5d
commit
fb4b24cc79
@ -22,6 +22,8 @@ $routes->get("view", "EmployeeController::viewECard/$1");
|
||||
$routes->get("smapletest", "ClientController::smapletest");
|
||||
$routes->get("testMailAttachments", "ClientController::testMailAttachments");
|
||||
$routes->get("updatePolicyTermsKey", "ClientController::updatePolicyTermsKey");
|
||||
$routes->get("updateRemainderDate", "ClientController::updateRemainderDate");
|
||||
$routes->get("sendCroneRemainderMail", "DashboardController::sendCroneRemainderMail");
|
||||
|
||||
$routes->post("add_advertise_image", "AppContentManagementController::add_advertise_image");
|
||||
$routes->get("add_image_index", "AppContentManagementController::add_image_index");
|
||||
|
||||
@ -584,7 +584,7 @@ class ClientController extends AdminController
|
||||
$editData['client_policy'] = $clientPoliceData;
|
||||
$editData['client_policy']['role'] = get_role_id();
|
||||
$editData['notification'] = $this->notificationModel->select('template_name,enabled')->where('client_id', $id)->findAll();
|
||||
$editData['placeHolders'] = ['member_name', 'nhance_logo', 'tpa_id', 'ecard_download_link', 'client_logo', 'policy_no', 'member_summary', 'app_link', 'post_enrollment_app_link', 'client_name'];
|
||||
$editData['placeHolders'] = ['member_name', 'member_mobile', 'nhance_logo', 'tpa_id', 'ecard_download_link', 'client_logo', 'policy_no', 'member_summary', 'app_link', 'post_enrollment_app_link', 'client_name'];
|
||||
|
||||
// dd($editData);
|
||||
echo view('layout/header', $headerData);
|
||||
@ -1033,6 +1033,9 @@ class ClientController extends AdminController
|
||||
$data['cd_ac_no'] = $this->request->getPost('cd_ac_no');
|
||||
$data['gst'] = $this->request->getPost('gst');
|
||||
$data['disclaimer'] = $this->request->getPost('disclaimer');
|
||||
$data['is_member_modify_allowed'] = $this->request->getPost('is_member_modify_allowed') ? 1 : 0;
|
||||
$data['enrolment_visibility'] = $this->request->getPost('enrolment_visibility') ? 1 : 0;
|
||||
|
||||
|
||||
|
||||
if ($policy_type_id == 1 || $policy_type_id == 2 || $policy_type_id == 6 || $policy_type_id == 7) {
|
||||
@ -1059,7 +1062,8 @@ class ClientController extends AdminController
|
||||
if ($data['inception_type'] == 2) {
|
||||
$data['open_date'] = change_date_format($this->request->getPost('open_date'), 'd-m-Y', 'Y-m-d');
|
||||
$data['close_date'] = change_date_format($this->request->getPost('close_date'), 'd-m-Y', 'Y-m-d');
|
||||
$data['reminder_date'] = change_date_format($this->request->getPost('reminder_date'), 'd-m-Y', 'Y-m-d');
|
||||
// $data['reminder_date'] = change_date_format($this->request->getPost('reminder_date'), 'd-m-Y', 'Y-m-d');
|
||||
$data['reminder_date'] = $this->request->getPost('reminder_date');
|
||||
} else {
|
||||
$data['open_date'] = null;
|
||||
$data['closedate'] = null;
|
||||
@ -1162,11 +1166,13 @@ class ClientController extends AdminController
|
||||
$data['disclaimer'] = $this->request->getPost('disclaimer');
|
||||
$data['policy_start_date'] = change_date_format($this->request->getPost('policy_start_date'), 'd-m-Y', 'Y-m-d');
|
||||
$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;
|
||||
|
||||
if ($data['inception_type'] == 2) {
|
||||
$data['open_date'] = change_date_format($this->request->getPost('open_date'), 'd-m-Y', 'Y-m-d');
|
||||
$data['close_date'] = change_date_format($this->request->getPost('close_date'), 'd-m-Y', 'Y-m-d');
|
||||
$data['reminder_date'] = change_date_format($this->request->getPost('reminder_date'), 'd-m-Y', 'Y-m-d');
|
||||
// $data['reminder_date'] = change_date_format($this->request->getPost('reminder_date'), 'd-m-Y', 'Y-m-d');
|
||||
$data['reminder_date'] = $this->request->getPost('reminder_date');
|
||||
} else {
|
||||
$data['open_date'] = null;
|
||||
$data['close_date'] = null;
|
||||
@ -3659,4 +3665,28 @@ class ClientController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function updateRemainderDate()
|
||||
{
|
||||
// Connect to the database and fetch the data
|
||||
$data = db_connect()->table('client_policy')
|
||||
->where("reminder_date IS NOT NULL AND reminder_date <> ''")
|
||||
->where('is_active', 1)
|
||||
->get()
|
||||
->getResultArray();
|
||||
|
||||
$days = [];
|
||||
foreach ($data as $value) {
|
||||
|
||||
$reminderDate = strtotime($value['reminder_date']);
|
||||
if ($reminderDate) {
|
||||
$date_of_date = date('d', $reminderDate);
|
||||
$days[] = $date_of_date;
|
||||
$days[] = $value['reminder_date'];
|
||||
db_connect()->table('client_policy')->where('id', $value['id'])->set('reminder_date', $date_of_date)->update();
|
||||
}
|
||||
}
|
||||
|
||||
dd($days);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -362,16 +362,14 @@ class DashboardController extends AdminController
|
||||
// dd($client_policy_data, $send_mail_for_manual_or_crone);
|
||||
|
||||
$reminder_whole_mail = [];
|
||||
|
||||
|
||||
foreach ($client_policy_data as $client_policy) {
|
||||
|
||||
if(empty($send_mail_for_manual_or_crone)){
|
||||
|
||||
// echo '1';
|
||||
if (empty($send_mail_for_manual_or_crone)) {
|
||||
|
||||
// Fetch client data
|
||||
$client_data = $this->clientModel->find($client_policy['client_id']);
|
||||
|
||||
|
||||
// Fetch notification settings
|
||||
$notification_data = $this->notificationModel
|
||||
->where('client_id', $client_policy['client_id'])
|
||||
@ -379,11 +377,11 @@ class DashboardController extends AdminController
|
||||
->first();
|
||||
|
||||
// $this->myLogger->logme('error', 'Notification data fetched: ' . json_encode($notification_data));
|
||||
|
||||
|
||||
// Check if notification should be sent
|
||||
if ($notification_data && $notification_data['enabled'] == 1 && !empty($notification_data['mail_content'])) {
|
||||
$this->myLogger->logme('error', 'Notification should be sent for client policy ID: ' . $client_policy['id']);
|
||||
|
||||
|
||||
// Fetch all employees related to the client policy
|
||||
$employees = $this->employeePolicyModel
|
||||
->select('employees.*')
|
||||
@ -395,18 +393,18 @@ class DashboardController extends AdminController
|
||||
->where('employee_polices.is_active', 1)
|
||||
->where('employees.relationship', 'Self')
|
||||
->findAll();
|
||||
|
||||
|
||||
// Process each employee
|
||||
foreach ($employees as $employee) {
|
||||
|
||||
|
||||
if ($employee['emp_status'] == 'draft' && $employee['relationship'] == 'Self') {
|
||||
$this->myLogger->logme('error', 'Employee status and relationship check passed for employee ID: ' . $employee['id']);
|
||||
|
||||
|
||||
// Mail params
|
||||
$params['emp_data'] = $employee;
|
||||
$params['client_data'] = $client_data;
|
||||
$params['notification_data'] = $notification_data;
|
||||
|
||||
|
||||
// Send the mail notification
|
||||
$mail_result = sendMailNotification::sendMailNotification('member_reminder_mail', $params);
|
||||
// $this->myLogger->logme('error', 'Mail sent result: ' . json_encode($mail_result));
|
||||
@ -414,66 +412,66 @@ class DashboardController extends AdminController
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->myLogger->logme('error', 'Notification not sent for client policy ID: ' . $client_policy['id']);
|
||||
$this->myLogger->logme('error', 'Notification was not sent for Client Policy ID: ' . $client_policy['id']);
|
||||
$this->myLogger->logme('error', 'Notification setup not found or not enabled');
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// echo '2';
|
||||
$currentDate = date('d');
|
||||
$remainder_dates = explode(",", $client_policy['reminder_date']);
|
||||
|
||||
$currentDate = date('d-m-Y');
|
||||
foreach ($remainder_dates as $date) {
|
||||
|
||||
if($currentDate == date('d-m-Y', strtotime($client_policy['reminder_date']))){
|
||||
if ($currentDate == $date) {
|
||||
|
||||
// echo '3';
|
||||
$client_data = $this->clientModel->find($client_policy['client_id']);
|
||||
|
||||
$client_data = $this->clientModel->find($client_policy['client_id']);
|
||||
// Fetch notification settings
|
||||
$notification_data = $this->notificationModel
|
||||
->where('client_id', $client_policy['client_id'])
|
||||
->where('template_name', 'member_reminder_mail')
|
||||
->first();
|
||||
|
||||
// Fetch notification settings
|
||||
$notification_data = $this->notificationModel
|
||||
->where('client_id', $client_policy['client_id'])
|
||||
->where('template_name', 'member_reminder_mail')
|
||||
->first();
|
||||
|
||||
// Check if notification should be sent
|
||||
if ($notification_data && $notification_data['enabled'] == 1 && !empty($notification_data['mail_content'])) {
|
||||
// Check if notification should be sent
|
||||
if ($notification_data && $notification_data['enabled'] == 1 && !empty($notification_data['mail_content'])) {
|
||||
|
||||
// echo '4';
|
||||
// echo '4';
|
||||
|
||||
$this->myLogger->logme('error', 'Notification should be sent for client policy ID: ' . $client_policy['id']);
|
||||
|
||||
// Fetch all employees related to the client policy
|
||||
$employees = $this->employeePolicyModel
|
||||
->select('employees.*')
|
||||
->join('employees', 'employee_polices.employee_id = employees.id', 'left')
|
||||
->where('employee_polices.client_policy_id', $client_policy['id'])
|
||||
->where('employees.emp_status', 'draft')
|
||||
->where('employees.is_active', 1)
|
||||
->where('employee_polices.status', 'draft')
|
||||
->where('employee_polices.is_active', 1)
|
||||
->where('employees.relationship', 'Self')
|
||||
->findAll();
|
||||
|
||||
// Process each employee
|
||||
foreach ($employees as $employee) {
|
||||
|
||||
if ($employee['emp_status'] == 'draft' && $employee['relationship'] == 'Self') {
|
||||
$this->myLogger->logme('error', 'Employee status and relationship check passed for employee ID: ' . $employee['id']);
|
||||
|
||||
// Mail params
|
||||
$params['emp_data'] = $employee;
|
||||
$params['client_data'] = $client_data;
|
||||
$params['notification_data'] = $notification_data;
|
||||
|
||||
// Send the mail notification
|
||||
$mail_result = sendMailNotification::sendMailNotification('member_reminder_mail', $params);
|
||||
// $this->myLogger->logme('error', 'Mail sent result: ' . json_encode($mail_result));
|
||||
$reminder_whole_mail[] = $mail_result;
|
||||
$this->myLogger->logme('error', 'Notification should be sent for client policy ID: ' . $client_policy['id']);
|
||||
|
||||
// Fetch all employees related to the client policy
|
||||
$employees = $this->employeePolicyModel
|
||||
->select('employees.*')
|
||||
->join('employees', 'employee_polices.employee_id = employees.id', 'left')
|
||||
->where('employee_polices.client_policy_id', $client_policy['id'])
|
||||
->where('employees.emp_status', 'draft')
|
||||
->where('employees.is_active', 1)
|
||||
->where('employee_polices.status', 'draft')
|
||||
->where('employee_polices.is_active', 1)
|
||||
->where('employees.relationship', 'Self')
|
||||
->findAll();
|
||||
|
||||
// Process each employee
|
||||
foreach ($employees as $employee) {
|
||||
|
||||
if ($employee['emp_status'] == 'draft' && $employee['relationship'] == 'Self') {
|
||||
$this->myLogger->logme('error', 'Employee status and relationship check passed for employee ID: ' . $employee['id']);
|
||||
|
||||
// Mail params
|
||||
$params['emp_data'] = $employee;
|
||||
$params['client_data'] = $client_data;
|
||||
$params['notification_data'] = $notification_data;
|
||||
|
||||
// Send the mail notification
|
||||
$mail_result = sendMailNotification::sendMailNotification('member_reminder_mail', $params);
|
||||
// $this->myLogger->logme('error', 'Mail sent result: ' . json_encode($mail_result));
|
||||
$reminder_whole_mail[] = $mail_result;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// echo '5';
|
||||
$this->myLogger->logme('error', 'Notification not sent for client policy ID: ' . $client_policy['id']);
|
||||
}
|
||||
} else {
|
||||
// echo '5';
|
||||
$this->myLogger->logme('error', 'Notification not sent for client policy ID: ' . $client_policy['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -481,41 +479,22 @@ class DashboardController extends AdminController
|
||||
|
||||
// dd($reminder_whole_mail);
|
||||
|
||||
// $this->myLogger->logme('error', 'Whole email, count: ' . $reminder_whole_mail);
|
||||
|
||||
// Process and queue bulk emails
|
||||
$temp_whole_data = [];
|
||||
$count = 0;
|
||||
|
||||
foreach ($reminder_whole_mail as $whole_index => $values) {
|
||||
foreach ($values as $index => $value) {
|
||||
$temp_whole_data[] = $value;
|
||||
$count++;
|
||||
$this->myLogger->logme('error', 'Queueing email, count: ' . $count);
|
||||
|
||||
if ($count == 20 || ($whole_index == count($reminder_whole_mail) - 1 && $index == count($values) - 1)) {
|
||||
if (!empty($temp_whole_data)) {
|
||||
Jobs::addJob(['job_name' => 'bulk_mail', 'payload' => $temp_whole_data]);
|
||||
$this->myLogger->logme('error', 'Added bulk mail job: ' . json_encode($temp_whole_data));
|
||||
$temp_whole_data = [];
|
||||
$count = 0;
|
||||
}
|
||||
}
|
||||
if (!empty($reminder_whole_mail) && count($reminder_whole_mail) > 0) {
|
||||
|
||||
$reminder_whole_mail = array_chunk($reminder_whole_mail, 20);
|
||||
|
||||
foreach ($reminder_whole_mail as $key => $value) {
|
||||
$job_details = new Jobs();
|
||||
$r = Jobs::addJob(['job_name' => 'bulk_mail', 'payload' => $value]);
|
||||
}
|
||||
}
|
||||
|
||||
if (count($temp_whole_data) > 0) {
|
||||
Jobs::addJob(['job_name' => 'bulk_mail', 'payload' => $temp_whole_data]);
|
||||
$this->myLogger->logme('error', 'Added final bulk mail job: ' . json_encode($temp_whole_data));
|
||||
|
||||
if (count($reminder_whole_mail) > 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(count($reminder_whole_mail) > 0){
|
||||
return true;
|
||||
}else{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function sendManualReminder($client_id, $client_branch_id)
|
||||
@ -545,7 +524,7 @@ class DashboardController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function sendManualEcard($client_id, $client_branch_id, $policy_id)
|
||||
public function sendManualEcard($client_id, $client_branch_id, $policy_id)
|
||||
{
|
||||
$this->myLogger->logme('error', "sendManualEcard called with client_id: {$client_id}, client_branch_id: {$client_branch_id}, policy id : {$policy_id}");
|
||||
|
||||
@ -574,7 +553,8 @@ class DashboardController extends AdminController
|
||||
|
||||
}
|
||||
|
||||
public function data_construct_for_bds($data){
|
||||
public function data_construct_for_bds($data)
|
||||
{
|
||||
|
||||
$groupedData = [
|
||||
'under_process' => [],
|
||||
|
||||
@ -4353,7 +4353,7 @@ class EmpDataServiceController extends BaseController
|
||||
|
||||
foreach ($ids as $id) {
|
||||
$emp_details = $this->employeePolicyModel
|
||||
->select('employee_polices.client_policy_id, employees.relationship, employees.emp_code, employees.email_corporate, employees.client_id, employees.name, employee_polices.rand_string, employee_polices.tpa_id')
|
||||
->select('employee_polices.client_policy_id, employees.relationship, employees.emp_code, employees.email_corporate, employees.client_id, employees.name, employees.mobile, employee_polices.rand_string, employee_polices.tpa_id')
|
||||
->join('employees', 'employees.id = employee_polices.employee_id')
|
||||
->where('employees.emp_status', 'active')
|
||||
->where('employees.is_active', '1')
|
||||
|
||||
@ -17,6 +17,7 @@ class sendMailNotification
|
||||
public static function sendMailNotification($action, $params)
|
||||
{
|
||||
$wholeData =[];
|
||||
|
||||
if ($action == 'member_welcome_mail') {
|
||||
|
||||
$dataToInsert = $params['dataToInsert'];
|
||||
@ -42,6 +43,7 @@ class sendMailNotification
|
||||
$subject = $notification['subject'];
|
||||
$app_link = $_ENV['App_Url'];
|
||||
$employee_name =$dataToInsert['name'];
|
||||
$employee_mobile_no =$dataToInsert['mobile'];
|
||||
$mail_content = $notification['mail_content'];
|
||||
$nhance_logo = $_ENV['NHANCE_LOGO'];
|
||||
$client_logo = base_url() . "public/uploads/logo/" . $client_data['client_logo'];
|
||||
@ -49,6 +51,7 @@ class sendMailNotification
|
||||
$mail_content = str_replace("[[client_logo]]", "<img src='$client_logo' alt='Client Logo' width='20'>", $mail_content);
|
||||
$mail_content = str_replace("[[nhance_logo]]", "<img src='$nhance_logo' alt='Nhance Logo' width='20'>", $mail_content);
|
||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $employee_mobile_no, $mail_content);
|
||||
$mail_content = str_replace("[[client_name]]", $client_data['client_name'], $mail_content);
|
||||
|
||||
$mail_content = str_replace("[[app_link]]", "<a href='$app_link'>Review Details</a>", $mail_content);
|
||||
@ -83,7 +86,9 @@ class sendMailNotification
|
||||
$mail ='';
|
||||
if ($emp_data['relationship'] == 'Self') {
|
||||
$employee_name =$emp_data['name'];
|
||||
$employee_mobile_no =$emp_data['mobile'];
|
||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $employee_mobile_no, $mail_content);
|
||||
$mail = $emp_data['email_corporate'];
|
||||
}
|
||||
}
|
||||
@ -93,7 +98,9 @@ class sendMailNotification
|
||||
|
||||
}else{
|
||||
$employee_name =$emp_data['name'];
|
||||
$employee_mobile_no =$emp_data['mobile'];
|
||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $employee_mobile_no, $mail_content);
|
||||
$mail = $emp_data['email_corporate'];
|
||||
}
|
||||
|
||||
@ -111,7 +118,9 @@ class sendMailNotification
|
||||
foreach ($emp_data as $key => $values) {
|
||||
if ($value['relationship'] == 'Self') {
|
||||
$employee_name =$values['name'];
|
||||
$employee_mobile_no =$values['mobile'];
|
||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $employee_mobile_no, $mail_content);
|
||||
$mail = $values['email_corporate'];
|
||||
}
|
||||
}
|
||||
@ -120,7 +129,9 @@ class sendMailNotification
|
||||
}
|
||||
}else{
|
||||
$employee_name =$value['name'];
|
||||
$employee_mobile_no =$value['mobile'];
|
||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $employee_mobile_no, $mail_content);
|
||||
$mail = $value['email_corporate'];
|
||||
}
|
||||
if (isset($mail) && !empty($mail)) {
|
||||
@ -161,6 +172,7 @@ class sendMailNotification
|
||||
|
||||
$app_link = $_ENV['App_Url'];
|
||||
$name = $get_emp_email_and_other_details['name'];
|
||||
$employee_mobile_no = $get_emp_email_and_other_details['mobile'];
|
||||
$mail_content = $notification['mail_content'];
|
||||
|
||||
$nhance_logo = $_ENV['NHANCE_LOGO'];
|
||||
@ -175,6 +187,7 @@ class sendMailNotification
|
||||
$mail_content = str_replace("[[client_logo]]", "<img src='$client_logo' alt='Client Logo' width='20'>", $mail_content);
|
||||
|
||||
$mail_content = str_replace("[[member_name]]", $name, $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $employee_mobile_no, $mail_content);
|
||||
$mail_content = str_replace("[[app_link]]", "<a href='$app_link'>Review Details</a>", $mail_content);
|
||||
$mail_content = str_replace("[[post_enrollment_app_link]]", "<a href='$post_enrollment_app_link'>Review Details</a>", $mail_content);
|
||||
// $mail_content = str_replace("[[tpa_id]]", $tpa_id, $mail_content);
|
||||
@ -226,6 +239,7 @@ class sendMailNotification
|
||||
$gst = 0;
|
||||
$Addon_list = [];
|
||||
$name = '';
|
||||
$employee_mobile_no = '';
|
||||
$emp_code = '';
|
||||
|
||||
// echo '<pre>';
|
||||
@ -258,6 +272,7 @@ class sendMailNotification
|
||||
$emp_code = '(' . $inner_item['emp_code'] . ')';
|
||||
$mail = $inner_item['email_corporate'];
|
||||
$name = $inner_item['name'];
|
||||
$employee_mobile_no = $inner_item['mobile'];
|
||||
}
|
||||
|
||||
$si = '';
|
||||
@ -378,6 +393,7 @@ class sendMailNotification
|
||||
// print_r($table_content); die;
|
||||
|
||||
$mail_content = str_replace("[[member_name]]", $name . ' (' . $emp_code . ')' , $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $employee_mobile_no, $mail_content);
|
||||
$mail_content = str_replace("[[member_summary]]", $table_content , $mail_content);
|
||||
|
||||
// print_r($mail_content); die;
|
||||
@ -841,6 +857,7 @@ class sendMailNotification
|
||||
// print_r($attachments); die;
|
||||
|
||||
$employee_name = 'John Doe';
|
||||
$mobile = 9080706050;
|
||||
|
||||
$app_link = $_ENV['App_Url'];
|
||||
$nhance_logo = $_ENV['NHANCE_LOGO'];
|
||||
@ -850,6 +867,7 @@ class sendMailNotification
|
||||
$mail_content = str_replace("[[client_logo]]", "<img src='$client_logo' alt='Client Logo' width='20'>", $mail_content);
|
||||
$mail_content = str_replace("[[nhance_logo]]", "<img src='$nhance_logo' alt='Nhance Logo' width='20'>", $mail_content);
|
||||
$mail_content = str_replace("[[member_name]]", $employee_name, $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $mobile, $mail_content);
|
||||
$mail_content = str_replace("[[client_name]]", $client_data['client_name'], $mail_content);
|
||||
|
||||
$mail_content = str_replace("[[app_link]]", "<a href='$app_link'>Review Details</a>", $mail_content);
|
||||
@ -873,6 +891,7 @@ class sendMailNotification
|
||||
$app_link = $_ENV['App_Url'];
|
||||
|
||||
$employee_name = 'John Doe';
|
||||
$mobile = 9080706050;
|
||||
|
||||
$client_logo = base_url() . "public/uploads/logo/" . $client_data['client_logo'];
|
||||
|
||||
@ -880,6 +899,7 @@ class sendMailNotification
|
||||
$mail_content = str_replace("[[nhance_logo]]", "<img src='$nhance_logo' alt='Nhance Logo' width='20'>", $mail_content);
|
||||
$mail_content = str_replace("[[client_logo]]", "<img src='$client_logo' alt='Client Logo' width='20'>", $mail_content);
|
||||
$mail_content = str_replace("[[app_link]]", "<a href='$app_link'>Review Details</a>", $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $mobile, $mail_content);
|
||||
|
||||
if ((isset($notification_data) && $notification_data['enabled'] == 1)) {
|
||||
|
||||
@ -905,6 +925,7 @@ class sendMailNotification
|
||||
$link = generate_download_link($rand_string);
|
||||
|
||||
$name = 'John Doe';
|
||||
$mobile = 9080706050;
|
||||
|
||||
$nhance_logo = $_ENV['NHANCE_LOGO'];
|
||||
$app_link = $_ENV['App_Url'];
|
||||
@ -916,6 +937,7 @@ class sendMailNotification
|
||||
$mail_content = str_replace("[[client_logo]]", "<img src='$client_logo' alt='Client Logo' width='20'>", $mail_content);
|
||||
|
||||
$mail_content = str_replace("[[member_name]]", $name, $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $mobile, $mail_content);
|
||||
$mail_content = str_replace("[[app_link]]", "<a href='$app_link'>Review Details</a>", $mail_content);
|
||||
$mail_content = str_replace("[[post_enrollment_app_link]]", "<a href='$post_enrollment_app_link'>Review Details</a>", $mail_content);
|
||||
$mail_content = str_replace("[[ecard_download_link]]", "<a href='$link/1'>Download Insurance Card</a>", $mail_content);
|
||||
@ -937,7 +959,8 @@ class sendMailNotification
|
||||
'premium' => 12000,
|
||||
'gst' => 2160,
|
||||
'rata_premimum' => 12000,
|
||||
'is_addon' => 2
|
||||
'is_addon' => 2,
|
||||
'mobile' => 9080706050
|
||||
];
|
||||
|
||||
|
||||
@ -967,6 +990,7 @@ class sendMailNotification
|
||||
$gst = 0;
|
||||
$Addon_list = [];
|
||||
$name = $array_list['name'];
|
||||
$mobile = $array_list['mobile'];
|
||||
$emp_code = '';
|
||||
|
||||
if (!empty($array_list)) {
|
||||
@ -987,9 +1011,9 @@ class sendMailNotification
|
||||
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<th>Name</th>';
|
||||
$table_content .= '<th>Relation</th>';
|
||||
$table_content .= '<th style="width:15%">Date Of Birth</th>';
|
||||
$table_content .= '<th>Sum Insured</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Relation</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Date Of Birth</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Sum Insured</th>';
|
||||
|
||||
// Only Display SI Topup and Dependent Addon
|
||||
if ($array_list['is_addon'] == 2 || $array_list['is_addon'] == 3) {
|
||||
@ -1003,14 +1027,14 @@ class sendMailNotification
|
||||
// Table body with details
|
||||
$table_content .= '<tbody style="text-align: center;">';
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<td>' . $array_list['name'] . $emp_code . '</td>';
|
||||
$table_content .= '<td>' . $array_list['relationship'] . '</td>';
|
||||
$table_content .= '<td>' . \DateTime::createFromFormat('Y-m-d', $array_list['dob'])->format('d-m-Y') . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($array_list['basic_cover_si']) . '</td>';
|
||||
$table_content .= '<td>' . nl2br(wordwrap($array_list['name'] . $emp_code, 11, "\n", true)) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">' . $array_list['relationship'] . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">' . \DateTime::createFromFormat('Y-m-d', $array_list['dob'])->format('d-m-Y') . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($array_list['basic_cover_si']) . '</td>';
|
||||
|
||||
if ($array_list['is_addon'] == 2 || $array_list['is_addon'] == 3) {
|
||||
$table_content .= '<td>₹' . format_indian_number(round($array_list['premium'])) . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number(round($array_list['gst'])) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number(round($array_list['premium'])) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number(round($array_list['gst'])) . '</td>';
|
||||
}
|
||||
|
||||
$table_content .= '</tr>';
|
||||
@ -1039,10 +1063,10 @@ class sendMailNotification
|
||||
|
||||
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<th>Policy Name</th>';
|
||||
$table_content .= '<th>Additional Premium</th>';
|
||||
$table_content .= '<th>GST</th>';
|
||||
$table_content .= '<th>Total</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Policy Name</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Additional Premium</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">GST</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Total</th>';
|
||||
$table_content .= '</tr>';
|
||||
$table_content .= '</thead>';
|
||||
|
||||
@ -1050,16 +1074,16 @@ class sendMailNotification
|
||||
|
||||
$total_addon = $Addon_list[0]['gst'] + $Addon_list[0]['addtional_premium'];
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<td>' . $Addon_list[0]['policy_name'] . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($Addon_list[0]['addtional_premium']) . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($Addon_list[0]['gst']) . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">' . $Addon_list[0]['policy_name'] . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($Addon_list[0]['addtional_premium']) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($Addon_list[0]['gst']) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '</tr>';
|
||||
|
||||
$sum_total_words = numberToWords($total_addon);
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<td></td><td></td><td><b>Total</b></td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '</tr>';
|
||||
$table_content .= '</tbody>';
|
||||
$table_content .= '</table></div></div>';
|
||||
@ -1067,6 +1091,7 @@ class sendMailNotification
|
||||
}
|
||||
|
||||
$mail_content = str_replace("[[member_name]]", $name . ' (' . $emp_code . ')' , $mail_content);
|
||||
$mail_content = str_replace("[[member_mobile]]", $mobile, $mail_content);
|
||||
$mail_content = str_replace("[[member_summary]]", $table_content , $mail_content);
|
||||
|
||||
|
||||
@ -1136,14 +1161,14 @@ class sendMailNotification
|
||||
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<th>Name</th>';
|
||||
$table_content .= '<th>Relation</th>';
|
||||
$table_content .= '<th style="width:15%">Date Of Birth</th>';
|
||||
$table_content .= '<th>Sum Insured</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Relation</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Date Of Birth</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Sum Insured</th>';
|
||||
|
||||
// Only Display SI Topup and Dependent Addon
|
||||
if ($array_list['is_addon'] == 2 || $array_list['is_addon'] == 3) {
|
||||
$table_content .= '<th>Premium</th>';
|
||||
$table_content .= '<th>GST</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Premium</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">GST</th>';
|
||||
}
|
||||
|
||||
$table_content .= '</tr>';
|
||||
@ -1152,14 +1177,14 @@ class sendMailNotification
|
||||
// Table body with details
|
||||
$table_content .= '<tbody style="text-align: center;">';
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<td>' . $array_list['name'] . $emp_code . '</td>';
|
||||
$table_content .= '<td>' . $array_list['relationship'] . '</td>';
|
||||
$table_content .= '<td>' . \DateTime::createFromFormat('Y-m-d', $array_list['dob'])->format('d-m-Y') . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($array_list['basic_cover_si']) . '</td>';
|
||||
$table_content .= '<td>' . nl2br(wordwrap($array_list['name'] . $emp_code, 11, "\n", true)) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">' . $array_list['relationship'] . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">' . \DateTime::createFromFormat('Y-m-d', $array_list['dob'])->format('d-m-Y') . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($array_list['basic_cover_si']) . '</td>';
|
||||
|
||||
if ($array_list['is_addon'] == 2 || $array_list['is_addon'] == 3) {
|
||||
$table_content .= '<td>₹' . format_indian_number(round($array_list['premium'])) . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number(round($array_list['gst'])) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number(round($array_list['premium'])) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number(round($array_list['gst'])) . '</td>';
|
||||
}
|
||||
|
||||
$table_content .= '</tr>';
|
||||
@ -1188,10 +1213,10 @@ class sendMailNotification
|
||||
|
||||
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<th>Policy Name</th>';
|
||||
$table_content .= '<th>Additional Premium</th>';
|
||||
$table_content .= '<th>GST</th>';
|
||||
$table_content .= '<th>Total</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Policy Name</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Additional Premium</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">GST</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Total</th>';
|
||||
$table_content .= '</tr>';
|
||||
$table_content .= '</thead>';
|
||||
|
||||
@ -1199,17 +1224,17 @@ class sendMailNotification
|
||||
|
||||
$total_addon = $Addon_list[0]['gst'] + $Addon_list[0]['addtional_premium'];
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<td>' . $Addon_list[0]['policy_name'] . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($Addon_list[0]['addtional_premium']) . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($Addon_list[0]['gst']) . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">' . $Addon_list[0]['policy_name'] . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($Addon_list[0]['addtional_premium']) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($Addon_list[0]['gst']) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '</tr>';
|
||||
|
||||
$sum_total_words = numberToWords($total_addon);
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<td></td><td></td><td><b>Total</b></td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '</tr>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '</tr style="padding: 8px; white-space: nowrap;">';
|
||||
$table_content .= '</tbody>';
|
||||
$table_content .= '</table></div></div>';
|
||||
}
|
||||
@ -1228,7 +1253,7 @@ class sendMailNotification
|
||||
$array_list = [
|
||||
'policy_name' => 'Health Insurance Plan',
|
||||
'emp_code' => 'E12345',
|
||||
'name' => 'John Doe',
|
||||
'name' => 'Ramakrishnaparamahamsar',
|
||||
'relationship' => 'Self',
|
||||
'dob' => '1985-05-15',
|
||||
'basic_cover_si' => 500000,
|
||||
@ -1284,14 +1309,14 @@ class sendMailNotification
|
||||
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<th>Name</th>';
|
||||
$table_content .= '<th>Relation</th>';
|
||||
$table_content .= '<th style="width:15%">Date Of Birth</th>';
|
||||
$table_content .= '<th>Sum Insured</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Relation</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Date Of Birth</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Sum Insured</th>';
|
||||
|
||||
// Only Display SI Topup and Dependent Addon
|
||||
if ($array_list['is_addon'] == 2 || $array_list['is_addon'] == 3) {
|
||||
$table_content .= '<th>Premium</th>';
|
||||
$table_content .= '<th>GST</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Premium</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">GST</th>';
|
||||
}
|
||||
|
||||
$table_content .= '</tr>';
|
||||
@ -1300,14 +1325,14 @@ class sendMailNotification
|
||||
// Table body with details
|
||||
$table_content .= '<tbody style="text-align: center;">';
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<td>' . $array_list['name'] . $emp_code . '</td>';
|
||||
$table_content .= '<td>' . $array_list['relationship'] . '</td>';
|
||||
$table_content .= '<td>' . \DateTime::createFromFormat('Y-m-d', $array_list['dob'])->format('d-m-Y') . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($array_list['basic_cover_si']) . '</td>';
|
||||
$table_content .= '<td>' . nl2br(wordwrap($array_list['name'] . $emp_code, 11, "\n", true)) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">' . $array_list['relationship'] . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">' . \DateTime::createFromFormat('Y-m-d', $array_list['dob'])->format('d-m-Y') . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($array_list['basic_cover_si']) . '</td>';
|
||||
|
||||
if ($array_list['is_addon'] == 2 || $array_list['is_addon'] == 3) {
|
||||
$table_content .= '<td>₹' . format_indian_number(round($array_list['premium'])) . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number(round($array_list['gst'])) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number(round($array_list['premium'])) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number(round($array_list['gst'])) . '</td>';
|
||||
}
|
||||
|
||||
$table_content .= '</tr>';
|
||||
@ -1337,10 +1362,10 @@ class sendMailNotification
|
||||
|
||||
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<th>Policy Name</th>';
|
||||
$table_content .= '<th>Additional Premium</th>';
|
||||
$table_content .= '<th>GST</th>';
|
||||
$table_content .= '<th>Total</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Policy Name</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Additional Premium</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">GST</th>';
|
||||
$table_content .= '<th style="padding: 8px; white-space: nowrap;">Total</th>';
|
||||
$table_content .= '</tr>';
|
||||
$table_content .= '</thead>';
|
||||
|
||||
@ -1348,16 +1373,16 @@ class sendMailNotification
|
||||
|
||||
$total_addon = $Addon_list[0]['gst'] + $Addon_list[0]['addtional_premium'];
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<td>' . $Addon_list[0]['policy_name'] . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($Addon_list[0]['addtional_premium']) . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($Addon_list[0]['gst']) . '</td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">' . $Addon_list[0]['policy_name'] . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($Addon_list[0]['addtional_premium']) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($Addon_list[0]['gst']) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '</tr>';
|
||||
|
||||
$sum_total_words = numberToWords($total_addon);
|
||||
$table_content .= '<tr>';
|
||||
$table_content .= '<td></td><td></td><td><b>Total</b></td>';
|
||||
$table_content .= '<td>₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;"></td style="padding: 8px; white-space: nowrap;"><td style="padding: 8px; white-space: nowrap;"></td><td style="padding: 8px; white-space: nowrap;"><b>Total</b></td>';
|
||||
$table_content .= '<td style="padding: 8px; white-space: nowrap;">₹' . format_indian_number($total_addon) . '</td>';
|
||||
$table_content .= '</tr>';
|
||||
$table_content .= '</tbody>';
|
||||
$table_content .= '</table></div></div>';
|
||||
|
||||
@ -51,6 +51,7 @@ class ClientPolicyModel extends Model
|
||||
"enrolment_visibility",
|
||||
"disclaimer",
|
||||
"is_active",
|
||||
"is_member_modify_allowed",
|
||||
];
|
||||
|
||||
public function getClientPolicyById($id){
|
||||
|
||||
@ -37,12 +37,14 @@
|
||||
<hr>
|
||||
|
||||
<form role="form" class="parsley-examples" method="post" id="policy_form" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" class="form-control" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
|
||||
<input type="hidden" name="PrimaryKey" id="policy_PrimaryKey" />
|
||||
<input type="hidden" id="policy_form_action" />
|
||||
<input type="hidden" name="policy_type_id" id="policy_type_id" />
|
||||
<input type="hidden" id="insurer_policy_id" />
|
||||
<input type="hidden" name="client_id" id="client_id_policy" value="<?= isset($client['id']) ? $client['id'] : '' ?>" />
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-row">
|
||||
@ -56,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="email"> Policy Type<span class="text-danger">*</span></label>
|
||||
<label for="policy_type"> Policy Type<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="policy_type" name="policy_type_id" required>
|
||||
<option value="0">Select Policy Type</option>
|
||||
<?php foreach ($policy_types as $value) { ?>
|
||||
@ -66,7 +68,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4" id="base_policy_id" style="display: none;">
|
||||
<label for="addon_policy">Base Policy<span id="base_danger" class="text-danger">*</span></label>
|
||||
<label for="base_policy">Base Policy<span id="base_danger" class="text-danger">*</span></label>
|
||||
<select class="form-control" id="base_policy" name="base_policy">
|
||||
<option value="" selected>Select Base Policy</option>
|
||||
</select>
|
||||
@ -77,7 +79,7 @@
|
||||
<div class="form-row" id="first" style="display: none;">
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="email">Insurer<span class="text-danger">*</span></label>
|
||||
<label for="insurer">Insurer<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="insurer" name="insurer" required>
|
||||
<option value="">Select Insurer</option>
|
||||
<?php foreach ($insurer as $value) { ?>
|
||||
@ -88,7 +90,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">TPA<span id="tpa_danger" class="text-danger">*</span></label>
|
||||
<label for="tpa">TPA<span id="tpa_danger" class="text-danger">*</span></label>
|
||||
<select class="form-control" id="tpa" name="tpa" required>
|
||||
<option value="">Select TPA</option>
|
||||
<?php foreach ($tpa as $value) { ?>
|
||||
@ -123,14 +125,14 @@
|
||||
<div class="form-row" id="third" style="display: none; position: relative;top: 22px;">
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">CD Account Number<span id="tpa_danger" class="text-danger">*</span></label>
|
||||
<label for="cd_ac_no">CD Account Number<span id="tpa_danger" class="text-danger">*</span></label>
|
||||
<select class="form-control" id="cd_ac_no" name="cd_ac_no" required>
|
||||
<option value="">Select CD Account Number</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">GST ( % )<span id="tpa_danger" class="text-danger">*</span></label>
|
||||
<label for="gst_no">GST ( % )<span id="tpa_danger" class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" placeholder="GST (%)" id="gst_no" name="gst" required>
|
||||
</div>
|
||||
|
||||
@ -156,21 +158,30 @@
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="reminder_date">Reminder Date<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control dateofdata" placeholder="Enter Reminder Date " name="reminder_date" id="reminder_date" >
|
||||
<input value="" type="text" class="form-control dateofdata" placeholder="Enter Remainder Dates( eg, 28,29,30 )" name="reminder_date" id="reminder_date" >
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="disclaimer">Disclaimer<span class="text-danger">*</span></label>
|
||||
<textarea class="form-control" placeholder="Enter Disclaimer" name="disclaimer" id="disclaimer" ></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label class="switch" style="position: relative;top: 43px;left: 20px;">
|
||||
<input id="policy_visibility" type="checkbox" name="enrolment_visibility" checked>
|
||||
<span class="slider round" style="height: 27px;"></span>
|
||||
</label>
|
||||
|
||||
<label for="inception_type" style="position: relative;bottom: 5px;left: 85px;">Policy Visibilty</label>
|
||||
<label for="policy_visibility" style="position: relative;bottom: 5px;left: 85px;">Policy Visibilty in Enrollment App</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label class="switch" style="position: relative;top: 43px;left: 20px;">
|
||||
<input id="is_member_modify_allowed" type="checkbox" name="is_member_modify_allowed" checked>
|
||||
<span class="slider round" style="height: 27px;"></span>
|
||||
</label>
|
||||
|
||||
<label for="is_member_modify_allowed" style="position: relative;bottom: 5px;left: 85px;"> In Enrollment Member Data Modification Allowed</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -182,7 +193,9 @@
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit">Submit</button>
|
||||
<button type="button" class="btn btn-secondary waves-effect btnBack" id="btnBack">Cancel</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div> <!-- end col-->
|
||||
</div>
|
||||
@ -301,11 +314,11 @@
|
||||
allowInput: false
|
||||
});
|
||||
|
||||
var reminderDatePicker = flatpickr("#reminder_date", {
|
||||
dateFormat: "d-m-Y",
|
||||
defaultDate: today,
|
||||
allowInput: false
|
||||
});
|
||||
// var reminderDatePicker = flatpickr("#reminder_date", {
|
||||
// dateFormat: "d-m-Y",
|
||||
// defaultDate: today,
|
||||
// allowInput: false
|
||||
// });
|
||||
|
||||
|
||||
$('#add_form').hide();
|
||||
@ -784,13 +797,14 @@
|
||||
$('#open_date').val(rearrangeDateFormat(res.data.open_date));
|
||||
$('#end_date').val(rearrangeDateFormat(res.data.policy_end_date));
|
||||
$('#close_date').val(rearrangeDateFormat(res.data.close_date));
|
||||
$('#reminder_date').val(rearrangeDateFormat(res.data.reminder_date));
|
||||
$('#reminder_date').val(res.data.reminder_date);
|
||||
$('#disclaimer').val(res.data.disclaimer);
|
||||
$('#gst_no').val(gst);
|
||||
$('#policy_status').val(checkDateStatus(res.data.policy_end_date));
|
||||
$('#policy_status_field').show();
|
||||
|
||||
|
||||
//Open for enrollment yes or no
|
||||
if (res.data.inception_type == 2) {
|
||||
$('#inception_type').prop('checked', true);
|
||||
$('#open_date').parent().show();
|
||||
@ -805,13 +819,20 @@
|
||||
$('.dateofdata').attr('required', false);
|
||||
}
|
||||
|
||||
|
||||
//Policy Visibility in Web App
|
||||
if (res.data.enrolment_visibility == 1) {
|
||||
$('#policy_visibility').prop('checked', true);
|
||||
} else {
|
||||
$('#policy_visibility').prop('checked', false);
|
||||
}
|
||||
|
||||
// Member Modify Data Enable or Disable
|
||||
if (res.data.is_member_modify_allowed == 1) {
|
||||
$('#is_member_modify_allowed').prop('checked', true);
|
||||
} else {
|
||||
$('#is_member_modify_allowed').prop('checked', false);
|
||||
}
|
||||
|
||||
|
||||
// if (res.data.is_addon != '1' && res.data.is_addon != '0') {
|
||||
// $('#base_policy_id').show();
|
||||
|
||||
@ -237,7 +237,7 @@
|
||||
<select id="member_welcome_mail_customButton" class="form-control" style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;">
|
||||
<option value="">PlaceHolders</option>
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
<?php if($value == 'member_name' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>
|
||||
<?php if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>member_mobile
|
||||
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
|
||||
<option value="[[<?php echo $value; ?>]]"><?php echo $valueChange; ?></option>
|
||||
<?php } ?>
|
||||
@ -329,7 +329,7 @@
|
||||
<select id="member_reminder_mail_modal_customButton" class="form-control" style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;">
|
||||
<option value="">PlaceHolders</option>
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
<?php if($value == 'member_name' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>
|
||||
<?php if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>
|
||||
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
|
||||
<option value="[[<?php echo $value; ?>]]"><?php echo $valueChange; ?></option>
|
||||
<?php } ?>
|
||||
@ -405,7 +405,7 @@
|
||||
<option value="">PlaceHolders</option>
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
|
||||
<?php if($value == 'member_name' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'post_enrollment_app_link' || $value == 'client_name' || $value == 'ecard_download_link'){ ?>
|
||||
<?php if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'post_enrollment_app_link' || $value == 'client_name' || $value == 'ecard_download_link'){ ?>
|
||||
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
|
||||
<option value="[[<?php echo $value; ?>]]"><?php echo $valueChange; ?></option>
|
||||
<?php } ?>
|
||||
@ -492,7 +492,7 @@
|
||||
<select id="member_review_and_summary_mail_modal_customButton" class="form-control" style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;">
|
||||
<option value="">PlaceHolders</option>
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
<?php if($value == 'member_name' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name' || $value == 'member_summary'){ ?>
|
||||
<?php if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name' || $value == 'member_summary'){ ?>
|
||||
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
|
||||
<option value="[[<?php echo $value; ?>]]"><?php echo $valueChange; ?></option>
|
||||
<?php } ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user