CHANGE_MAIL_POLICY_TERMS_STATEMENT_UPLOAD_DELETION_QUERY_USER_HELPDESK_AND_OTHER_AND_LIVE_ISSUE_CHANGES : RV

This commit is contained in:
VENKATESHWARAN 2024-12-17 10:20:10 +05:30
parent 885e396e00
commit 205598304c
13 changed files with 593 additions and 268 deletions

View File

@ -118,6 +118,8 @@ class ClientController extends AdminController
$this->leadsModel = new LeadsModel(); $this->leadsModel = new LeadsModel();
} }
//--------------------------------------------------------------------------------------------------------
public function checkDuplicateTableFieldValue() public function checkDuplicateTableFieldValue()
{ {
$table = $this->request->getPost('table'); $table = $this->request->getPost('table');
@ -2176,6 +2178,7 @@ class ClientController extends AdminController
$data['preandpostnatal'] = ""; $data['preandpostnatal'] = "";
$data['babyday1cover'] = ""; $data['babyday1cover'] = "";
} }
$data['9monthwaitingperiodwaived'] = str_replace(',', '', $this->request->getPost("9monthwaitingperiodwaived")); $data['9monthwaitingperiodwaived'] = str_replace(',', '', $this->request->getPost("9monthwaitingperiodwaived"));
$data['coverfromthedateofjoining'] = str_replace(',', '', $this->request->getPost("coverfromthedateofjoining")); $data['coverfromthedateofjoining'] = str_replace(',', '', $this->request->getPost("coverfromthedateofjoining"));
$data['waiverof1,2,3&4thyearexclusions'] = $this->request->getPost("waiverof1,2,3&4thyearexclusions"); $data['waiverof1,2,3&4thyearexclusions'] = $this->request->getPost("waiverof1,2,3&4thyearexclusions");
@ -3792,6 +3795,15 @@ class ClientController extends AdminController
public function sendextraparam() public function sendextraparam()
{ {
// $batch_data = [
// 'client_id' => 17,
// 'client_policy_id' => 30,
// 'client_branch_id' => 18,
// ];
// $batch_data['insurer_or_tpa'] = 'insurer';
// $batch_data['insurer_or_tpa'] = 'tpa';
// dd($this->request); // dd($this->request);
// $employeeRestController = new EmployeeServiceController(); // $employeeRestController = new EmployeeServiceController();
@ -3809,8 +3821,17 @@ class ClientController extends AdminController
// $ids = array_column($emp_data, 'id'); // $ids = array_column($emp_data, 'id');
// $EmpDataServiceController->sendMailForDownloadingECard($ids); // $EmpDataServiceController->sendMailForDownloadingECard($ids);
// $EmpDataServiceController = new EmpDataServiceController();
// $EmpDataServiceController->importDeletionValidation(['file_id' => 304]); //for live
// $result = $this->employeePolicyModel->getDeletionEmployeeDataForExportExcel($batch_data);
// print_rr($result); die;
// $empServiceController = new EmployeeServiceController(); // $empServiceController = new EmployeeServiceController();
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => '741']); // $res = $empServiceController->employeesOnboardPreprocess(['file_id' => '741']);
// $PolicyTransactionController = new PolicyTransactionController();
// $res = $PolicyTransactionController->validateInsurerStatement(['file_id' => '36']);
} }
// ------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------
@ -3832,4 +3853,27 @@ class ClientController extends AdminController
return $this->respond(['status' => false, 'code' => 404, 'message' => 'No data to update'], 200); return $this->respond(['status' => false, 'code' => 404, 'message' => 'No data to update'], 200);
} }
} }
// -------------------------------------------------------------------------------------------------------
public function enrollmentAddonSIAmountDropdown($client_policy_id)
{
if(!empty($client_policy_id)){
$client_policy_details = $this->clientPolicyModel->where('id', $client_policy_id)->where('policy_status', 1)->where('is_active', 1)->first();
if(!empty($client_policy_details) && $client_policy_details['policy_type_id'] == 3 && $client_policy_details['is_addon'] == 3){
$base_policy_id = $client_policy_details['base_policy'] ?? 0;
if(!empty($base_policy_id)){
}
}
}
}
} }

View File

@ -752,10 +752,14 @@ class EmpDataServiceController extends BaseController
public function generateExcelForDeletion($export_data) public function generateExcelForDeletion($export_data)
{ {
// dd($export_data);
$ids = []; $ids = [];
$objects = $this->employeePolicyModel->getDeletionEmployeeDataForExportExcel($export_data); $objects = $this->employeePolicyModel->getDeletionEmployeeDataForExportExcel($export_data);
// dd($objects);
$totals = 0; $totals = 0;
foreach ($objects as $obj) { foreach ($objects as $obj) {
$ids[] = $obj->endorsement_primarykey; $ids[] = $obj->endorsement_primarykey;
@ -2932,6 +2936,14 @@ class EmpDataServiceController extends BaseController
$batch_code = $file['batch_code']; $batch_code = $file['batch_code'];
$user_id = $file['created_by']; $user_id = $file['created_by'];
$ref_data = [
'client_id' => $client_id,
'client_policy_id' => $client_policy_id,
'client_branch_id' => $client_branch_id,
'insurer_or_tpa' => $file['insurer_or_tpa'],
'event_type' => $file['event_type'],
];
$file_name_with_path = WRITEPATH . "/uploads/import_excel/" . $file['file_name']; $file_name_with_path = WRITEPATH . "/uploads/import_excel/" . $file['file_name'];
@ -2963,72 +2975,8 @@ class EmpDataServiceController extends BaseController
} }
} }
$db = \Config\Database::connect(); $objects = $this->employeePolicyModel->getDeletionEmployeeDataForExportExcel($ref_data, 1);
$endorsement_data = $objects;
$sql = "
SELECT DISTINCT
a.id as endorsement_primarykey,
a.group_key,
employee_polices.id as primaryKey,
employees.name AS emp_name,
employees.emp_code AS emp_code,
employees.dob AS emp_dob,
employees.gender AS emp_gender,
employees.relationship AS emp_relationship,
'Has Define' as emp_type,
employee_polices.basic_cover_si,
employee_polices.uhid as risk_id,
employee_polices.policy_end_date,
employee_polices.rata_premimum as premium,
deletiondata.empstatus,
deletiondata.changeevent,
deletiondata.dateofexit,
deletiondata.reasonforexit,
deletiondata.status,
DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit) AS no_of_days,
ROUND((employee_polices.rata_premimum * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365, 2) AS pro_rata_premium,
ROUND(((employee_polices.rata_premimum * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365) * 0.18, 2) AS gst,
ROUND(((employee_polices.rata_premimum * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365) + (((employee_polices.rata_premimum * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365) * 0.18), 2) AS total
FROM
emp_endorsement a
LEFT JOIN
employees ON a.emp_code = employees.emp_code and a.pk = employees.id
LEFT JOIN
employee_polices ON employees.id = employee_polices.employee_id
LEFT JOIN(
select aa.emp_code, aa.new_value as 'empstatus', bb.new_value as 'changeevent', cc.new_value as 'dateofexit', dd.new_value as 'reasonforexit', ee.new_value as 'status' from
( SELECT a1.emp_code, a1.field_name, a1.new_value from emp_endorsement as a1 where a1.field_name = 'emp_status') aa
left join
( SELECT b1.emp_code, b1.field_name, b1.new_value from emp_endorsement as b1 where b1.field_name = 'change_event') bb on aa.emp_code = bb.emp_code
left join
( SELECT c1.emp_code, c1.field_name, c1.new_value from emp_endorsement as c1 where c1.field_name = 'date_of_exit') cc on aa.emp_code = cc.emp_code
left join
( SELECT d1.emp_code, d1.field_name, d1.new_value from emp_endorsement as d1 where d1.field_name = 'reason_for_exit') dd on aa.emp_code = dd.emp_code
left JOIN
( SELECT e1.emp_code, e1.field_name, e1.new_value from emp_endorsement as e1 where e1.field_name = 'status') ee on aa.emp_code = ee.emp_code
) as deletiondata on a.emp_code = deletiondata.emp_code
WHERE employee_polices.client_policy_id = '$client_policy_id'
AND employees.client_branch_id = '$client_branch_id'
AND a.actions = 'd'
AND employee_polices.is_active = 1
AND employee_polices.status = 'active'
AND employees.is_active = 1
AND employees.emp_status = 'active'
AND (a.endorsement_id IS NULL OR a.endorsement_id = '')
group by group_key
";
$query = $db->query($sql);
$endorsement_data = $query->getResultArray();
// dd($endorsement_data); // dd($endorsement_data);

View File

@ -1762,8 +1762,10 @@ class EmployeeController extends AdminController
public function update_emp_data() public function update_emp_data()
{ {
$data = $this->request->getPost(); $data = $this->request->getPost();
// print_rr($data);
$data['dob'] = date('Y-m-d', strtotime($data['dob'])); // $data['dob'] = date('Y-m-d', strtotime($data['dob']));
$data['dob'] = change_date_format($data['dob'], 'd/m/Y', 'Y-m-d');
// print_rr($data); die;
// Fetch current employee data // Fetch current employee data
$employee_data = $this->employeeModel->where('id', $data['employee_primary_id'])->first(); $employee_data = $this->employeeModel->where('id', $data['employee_primary_id'])->first();
@ -1973,5 +1975,50 @@ class EmployeeController extends AdminController
return redirect()->back()->with('error', 'Log file not found.'); return redirect()->back()->with('error', 'Log file not found.');
} }
public function exportToExceltpadata()
{
// Create a new Spreadsheet
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
// Header row
$headers = [
'TPA_NAME', 'SHORT_NAME', 'TPA_BRANCH_NAME', 'TPA_BRANCH_CODE',
'TPA_CONTACT_PERSON_NAME', 'TPA_CONTACT_PERSON_EMAIL', 'TPA_CONTACT_PERSON_MOBILE',
'TPA_CONTACT_PERSON_DESIGNATION', 'IS_DELETED'
];
$sheet->fromArray($headers, NULL, 'A1');
// Data rows
$data = [
["ICICI Lombard Health Care", "IL Health care", "Chennai", "997133", "Heena", "dharanisri@jubiliant.in", "9043955294", "General Manager", "YES"],
["ICICI Lombard Health Care", "IL Health care", "Chennai", "997133", "Mahammad shireen", "mahammad.shireen@icicilombard.com", "8655420732", "Claims head", "NO"],
["Medi Assist Insurance TPA Private Limited", "Medi Assist", "Chennai", "YA0000000348", "Ragavi", "dharanisri@jubiliant.in", "9043955294", "Senior Manager", "YES"],
["Medi Assist Insurance TPA Private Limited", "Medi Assist", "Chennai", "YA0000000348", "Vijayalakshmi", "vijayalakshmi.c@mediassist.in", "7795542162", "Senior Executive | Account Management", "NO"],
["Vidal Health Insurance TPA", "Vidal", "Chennai", "YA0000000349", "vijalakshmi", "vijayalakshmi.c@mediassist.in", "7795542162", "Senior Executive", "NO"],
["Vidal Health Insurance TPA", "Vidal", "Chennai", "YA0000000349", "M.Pushparaj", "pushparaj.moorthy@vidalhealth.com", "8939634456", "Executive", "NO"],
["Digit in-House", "Digit in-House", "Go Digit General Insurance Ltd", "1", "sathish", "sathish.n@vidalhealth.com", "7823913800", "Senior Executive", "NO"],
["Digit in-House", "Digit in-House", "Go Digit General Insurance Ltd", "1", "Mr. Pavan", "TK.Pavankumar@godigit.com", "8754490492", "Strategic Partnerships", "NO"],
["Aditya Birla Health Insurance Co. Limited", "ABHI", "Chennai", "O1", "sathish", "sathish.n@vidalhealth.com", "7823913800", "Senior Executive", "NO"],
["Aditya Birla Health Insurance Co. Limited", "ABHI", "Chennai", "O1", "Jhonson Kj", "jhonson.kj@adityabirlacapital.com", "9900729513", "Executive", "NO"],
["Aditya Birla Health Insurance Co. Limited", "ABHI", "Chennai", "01", "Jhonson Kj", "jhonson.kj@adityabirlacapital.com", "9900729513", "Executive", "NO"],
["R Care Health", "R Care", "Chennai", "01", "Jeevanadam", "Jeevanandam.Kumaran@relianceada.com", "8825982053", "Executive", "NO"],
["IFFCO-TOKIO GENERAL INSURANCE CO. LTD", "ITGI", "Chennai", "01", "Anjali", "Anjali.K@ext.iffcotokio.co.in", "6374270165", "Senior Executive", "NO"],
["Star Health and Allied Insurance", "STAR", "Chennai", "110000", "Mr. Vijay Baskar", "vijayabhaskar.m@starhealth.in", "9840905286", "Area Manager", "NO"],
];
$sheet->fromArray($data, NULL, 'A2');
// Save the file
$filename = 'TPA_Data.xlsx';
$writer = new Xlsx($spreadsheet);
// Set headers for download
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment; filename="' . $filename . '"');
header('Cache-Control: max-age=0');
$writer->save('php://output');
exit;
}
} }

View File

@ -1745,6 +1745,7 @@ class PolicyTransactionController extends BaseController
// var_dump($source_data);die(); // var_dump($source_data);die();
// Kint::dump($source_data);//die(); // Kint::dump($source_data);//die();
// check policy no,insurer and etc in DB for this month // check policy no,insurer and etc in DB for this month
// if all good return true, otherwise return false with messssage // if all good return true, otherwise return false with messssage
foreach ($excel_data as $excel_key => $excel_row) foreach ($excel_data as $excel_key => $excel_row)
@ -1752,34 +1753,37 @@ class PolicyTransactionController extends BaseController
$is_row_empty = check_row_is_empty_or_null($excel_row); $is_row_empty = check_row_is_empty_or_null($excel_row);
if(!$is_row_empty) if(!$is_row_empty)
{ {
break; $is_source_found = 0;
} $policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]);//policy_start_date from excel
$policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]);//policy_end_date from excel
$policy_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[1]);//policy_end_date from excel
$client_name = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[3]);//clientname from excel
$endorsement_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[2]);//policy_end_date from excel
$is_source_found = 0; foreach ($source_data as $source_key => $source_row)
$policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]);//policy_start_date from excel
$policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]);//policy_end_date from excel
$policy_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[1]);//policy_end_date from excel
$client_name = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[3]);//clientname from excel
$endorsement_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[2]);//policy_end_date from excel
foreach ($source_data as $source_key => $source_row)
{
if( ($policy_no == $source_row['policy_no']) && $endorsement_no == $source_row['endorsement_no'] && change_date_format($policy_start_date,'d/m/Y','Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date,'d/m/Y','Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name'])
{ {
$is_source_found = 1; $source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : "";
unset($source_data[$source_key]); if( ($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date,'d-m-Y','Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date,'d-m-Y','Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name'])
continue 2; {
$is_source_found = 1;
unset($source_data[$source_key]);
continue 2;
}
}
if($is_source_found == 0)
{
// echo $excel_key.'-'.$excel_row[1] . '- not found<br>';
$error_data['error_code'] = 1;//match not found
// $error_data['error_data'] = ($error_data['error_data'] ?? []);
$error_data['error_data'] = array_merge($error_data['error_data'],[$excel_row[0]]);//match not found
} }
}
if($is_source_found == 0)
{
// echo $excel_key.'-'.$excel_row[1] . '- not found<br>';
$error_data['error_code'] = 1;//match not found
// $error_data['error_data'] = ($error_data['error_data'] ?? []);
$error_data['error_data'] = array_merge($error_data['error_data'],[$excel_row[0]]);//match not found
} }
} }
// dd($error_data);
if($error_data['error_code']) if($error_data['error_code'])
{ {
$status = 'failed'; $status = 'failed';
@ -1850,94 +1854,96 @@ class PolicyTransactionController extends BaseController
$is_row_empty = check_row_is_empty_or_null($excel_row); $is_row_empty = check_row_is_empty_or_null($excel_row);
if(!$is_row_empty) if(!$is_row_empty)
{ {
break;
}
$is_source_found = 0; $is_source_found = 0;
$policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]);//policy_start_date from excel $policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]);//policy_start_date from excel
$policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]);//policy_end_date from excel $policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]);//policy_end_date from excel
$policy_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[1]);//policy_end_date from excel $policy_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[1]);//policy_end_date from excel
$client_name = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[3]);//clientname from excel $client_name = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[3]);//clientname from excel
$endorsement_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[2]);//policy_end_date from excel $endorsement_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[2]);//policy_end_date from excel
foreach ($source_data as $source_key => $source_row) foreach ($source_data as $source_key => $source_row)
{
// Kint::dump(change_date_format($excel_row[3],'d/m/Y','Y-m-d'));
if( ($policy_no == $source_row['policy_no']) && $endorsement_no == $source_row['endorsement_no'] && change_date_format($policy_start_date,'d/m/Y','Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date,'d/m/Y','Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name'])
{ {
$is_source_found = 1; // Kint::dump(change_date_format($excel_row[3],'d-m-Y','Y-m-d'));
$source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : "";
//calculate percentage first if( ($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date,'d-m-Y','Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date,'d-m-Y','Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name'])
$total_amt = 0;
$actual_bp_per = trim($excel_row[9]);
$actual_bp_brokerage = trim($excel_row[12]);
$actual_bp_amt = trim($excel_row[6]);
if(($actual_bp_brokerage && $actual_bp_brokerage != 0 && $actual_bp_brokerage != ""))
{ {
$total_amt += $actual_bp_brokerage; $is_source_found = 1;
//percentage reverse calculation
if($actual_bp_per == 0 || $actual_bp_per == "") //calculate percentage first
$total_amt = 0;
$actual_bp_per = trim($excel_row[9]);
$actual_bp_brokerage = trim($excel_row[12]);
$actual_bp_amt = trim($excel_row[6]);
if(($actual_bp_brokerage && $actual_bp_brokerage != 0 && $actual_bp_brokerage != ""))
{ {
$actual_bp_per = round(($actual_bp_brokerage / $actual_bp_amt) * 100,2); $total_amt += $actual_bp_brokerage;
//percentage reverse calculation
if($actual_bp_per == 0 || $actual_bp_per == "")
{
$actual_bp_per = round(($actual_bp_brokerage / $actual_bp_amt) * 100,2);
}
}
else
{
$actual_bp_brokerage = $actual_bp_amt * ($actual_bp_per / 100);
$total_amt += $actual_bp_brokerage;
} }
} $actual_tp_per = trim($excel_row[10]);
else $actual_tp_brokerage = trim($excel_row[13]);
{ $actual_tp_amt = trim($excel_row[7]);
$actual_bp_brokerage = $actual_bp_amt * ($actual_bp_per / 100);
$total_amt += $actual_bp_brokerage;
}
$actual_tp_per = trim($excel_row[10]); if($actual_tp_brokerage && $actual_tp_brokerage != 0 && $actual_tp_brokerage != "")
$actual_tp_brokerage = trim($excel_row[13]);
$actual_tp_amt = trim($excel_row[7]);
if($actual_tp_brokerage && $actual_tp_brokerage != 0 && $actual_tp_brokerage != "")
{
$total_amt += $actual_tp_brokerage;
//percentage reverse calculation
if($actual_tp_per == 0 || $actual_tp_per == "")
{ {
$actual_tp_per = ($actual_tp_brokerage / $actual_tp_amt) * 100; $total_amt += $actual_tp_brokerage;
//percentage reverse calculation
if($actual_tp_per == 0 || $actual_tp_per == "")
{
$actual_tp_per = ($actual_tp_brokerage / $actual_tp_amt) * 100;
}
} }
} else
else
{
$actual_tp_brokerage = $actual_tp_amt * ($actual_tp_per / 100);
$total_amt += $actual_tp_brokerage;
}
$actual_tep_per = trim($excel_row[11]);
$actual_tep_brokerage = trim($excel_row[14]);
$actual_tep_amt = trim($excel_row[8]);
if($actual_tep_brokerage && $actual_tep_brokerage != 0 && $actual_tep_brokerage != "")
{
$total_amt += $actual_tep_brokerage;
//percentage reverse calculation
if($actual_tep_per == 0 || $actual_tep_per == "")
{ {
$actual_tep_per = ($actual_tep_brokerage / $actual_tep_amt) * 100; $actual_tp_brokerage = $actual_tp_amt * ($actual_tp_per / 100);
$total_amt += $actual_tp_brokerage;
} }
$actual_tep_per = trim($excel_row[11]);
$actual_tep_brokerage = trim($excel_row[14]);
$actual_tep_amt = trim($excel_row[8]);
if($actual_tep_brokerage && $actual_tep_brokerage != 0 && $actual_tep_brokerage != "")
{
$total_amt += $actual_tep_brokerage;
//percentage reverse calculation
if($actual_tep_per == 0 || $actual_tep_per == "")
{
$actual_tep_per = ($actual_tep_brokerage / $actual_tep_amt) * 100;
}
}
else
{
$actual_tep_brokerage = $actual_tep_amt * ($actual_tep_per / 100);
$total_amt += $actual_tep_brokerage;
}
//find variance
$variance_amt = $source_row['exp_amt'] - $total_amt;
$data_to_update[] = ['id' => $source_row['id'],'actual_bp_amt' => $actual_bp_amt,'actual_tp_amt' => $actual_tp_amt,'actual_tep_amt' => $actual_tep_amt,'actual_bp_per' => $actual_bp_per,'actual_tp_per' => $actual_tp_per,'actual_tep_per' => $actual_tep_per,'variance' => $variance_amt,'actual_tep_brokerage_amt' => $actual_tep_brokerage,'actual_tp_brokerage_amt' => $actual_tp_brokerage,'actual_bp_brokerage_amt' => $actual_bp_brokerage,'reward' => trim($excel_row[15]),'statement_id' => $file_id];
unset($source_data[$source_key]);
continue 2;
} }
else
{
$actual_tep_brokerage = $actual_tep_amt * ($actual_tep_per / 100);
$total_amt += $actual_tep_brokerage;
}
//find variance
$variance_amt = $source_row['exp_amt'] - $total_amt;
$data_to_update[] = ['id' => $source_row['id'],'actual_bp_amt' => $actual_bp_amt,'actual_tp_amt' => $actual_tp_amt,'actual_tep_amt' => $actual_tep_amt,'actual_bp_per' => $actual_bp_per,'actual_tp_per' => $actual_tp_per,'actual_tep_per' => $actual_tep_per,'variance' => $variance_amt,'actual_tep_brokerage_amt' => $actual_tep_brokerage,'actual_tp_brokerage_amt' => $actual_tp_brokerage,'actual_bp_brokerage_amt' => $actual_bp_brokerage,'reward' => trim($excel_row[15]),'statement_id' => $file_id];
unset($source_data[$source_key]);
continue 2;
} }
} }
} }
// dd($data_to_update);
$this->PTCOShareDetailsModel->updateBatch($data_to_update, 'id'); $this->PTCOShareDetailsModel->updateBatch($data_to_update, 'id');
// dd($data_to_update); // dd($data_to_update);
// if($error_data['error_code']) // if($error_data['error_code'])

View File

@ -71,39 +71,43 @@ class UserController extends AdminController
$this->userTeamsModel->insert($teamData); $this->userTeamsModel->insert($teamData);
} }
if ($userData['role'] == 3) { $db = \Config\Database::connect();
$tableName = 'hdz_staff';
$db = \Config\Database::connect(); // Set default values
$tableName = 'hdz_staff'; $admin = 0;
$acm = 0;
$acm_id = null;
if ($userData['role'] == 3) {
$admin = 0; $admin = 0;
$acm = 1; $acm = 1;
$acm_id = $insert; $acm_id = $insert;
} else if (in_array($userData['role'], [1, 5])) {
$password = '12345678'; //Default password $admin = 1;
$hashedPassword = password_hash($password, PASSWORD_DEFAULT); $acm = 0;
$acm_id = null;
foreach ($temp_team as $key => $value) {
$team = $this->teamModel->where('id', $value)->first();
if ($team['name'] == 'Claims') {
$hdz_staff = [
'emp_code' => $userData['emp_code'],
'fullname' => $userData['first_name'],
'username' => strtolower($userData['first_name']),
'email' => $userData['email'],
'admin' => $admin,
'acm' => $acm,
'acm_id' => $acm_id,
'registration' => time(),
'password' => $hashedPassword,
'active' => 1,
];
$db->table($tableName)->insert($hdz_staff);
}
}
} }
$password = '12345678'; // Default password
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
$hdz_staff = [
'emp_code' => $userData['emp_code'],
'fullname' => $userData['first_name'],
'username' => strtolower($userData['first_name']),
'email' => $userData['email'],
'admin' => $admin,
'acm' => $acm,
'acm_id' => $acm_id,
'registration' => time(),
'password' => $hashedPassword,
'active' => 1,
'department' => 'a:7:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"5";i:3;s:1:"3";i:4;s:1:"9";i:5;s:1:"4";i:6;s:2:"10";}',
];
$db->table($tableName)->insert($hdz_staff);
} }
} }
$this->myLogger->logme('error', 'User create Successfully created by id {data}', ['data' => get_session_userid()]); $this->myLogger->logme('error', 'User create Successfully created by id {data}', ['data' => get_session_userid()]);
@ -149,33 +153,55 @@ class UserController extends AdminController
} }
} }
$db = \Config\Database::connect();
$tableName = 'hdz_staff';
$hdz_staff = [
'emp_code' => $userData['emp_code'],
'fullname' => $userData['first_name'],
'username' => strtolower($userData['first_name']),
'email' => $userData['email'],
'registration' => time(),
'active' => 1,
'department' => 'a:7:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"5";i:3;s:1:"3";i:4;s:1:"9";i:5;s:1:"4";i:6;s:2:"10";}',
];
if ($userData['role'] == 3) { if ($userData['role'] == 3) {
$hdz_staff['admin'] = 0;
$hdz_staff['acm'] = 1;
$hdz_staff['acm_id'] = $id;
} elseif (in_array($userData['role'], [1, 5])) {
$hdz_staff['admin'] = 1;
$hdz_staff['acm'] = 0;
$hdz_staff['acm_id'] = null;
} else {
$db = \Config\Database::connect(); return redirect()->to(base_url('/user/list'));
$tableName = 'hdz_staff';
$admin = 1;
foreach ($userData['team'] as $key => $value) {
if ($value == 2) {
$hdz_staff = [
'emp_code' => $userData['emp_code'],
'fullname' => $userData['first_name'],
'username' => strtolower($userData['first_name']),
'email' => $userData['email'],
'admin' => $admin,
'registration' => time(),
'active' => 1,
];
$db->table($tableName)->where('emp_code', $userData['emp_code'])
->where('email', $userData['email'])
->set($hdz_staff)
->update();
}
}
} }
// Check if staff data exists
$staffData = $db->table($tableName)
// ->where('emp_code', $userData['emp_code'])
->where('email', $userData['email'])
->get()->getResult();
if (!empty($staffData)) {
// Update existing record
$db->table($tableName)
// ->where('emp_code', $userData['emp_code'])
->where('email', $userData['email'])
->set($hdz_staff)->update();
} else {
$password = '12345678'; // Default password
$hdz_staff['password'] = password_hash($password, PASSWORD_DEFAULT);
// Insert new record
$db->table($tableName)->insert($hdz_staff);
}
} }
return redirect()->to(base_url('/user/list')); return redirect()->to(base_url('/user/list'));

View File

@ -203,6 +203,7 @@ class sendMailNotification
$temp_data = ''; $temp_data = '';
$policy_name = ''; $policy_name = '';
$is_addon = ''; $is_addon = '';
$rowspan = count($item) ?? 2;
foreach ($item as $inner_item) { foreach ($item as $inner_item) {
@ -215,8 +216,10 @@ class sendMailNotification
} }
//end of getting policy premium data //end of getting policy premium data
// dd($policy_premium_data);
if($inner_item['payable_employee'] == 1 && $client_policy_data['policy_type_id'] == 2){ if($inner_item['payable_employee'] == 1 && $client_policy_data['policy_type_id'] == 2){
$payable_employee_array[] = $inner_item; $payable_employee_array['emp_data'][] = $inner_item;
} }
// dd($policy_premium_data); // dd($policy_premium_data);
@ -235,7 +238,18 @@ class sendMailNotification
$gst_forself = ''; $gst_forself = '';
// if(checkFamilyFloaters($policy_premium_data, $client_policy_data, $inner_item)){ // if(checkFamilyFloaters($policy_premium_data, $client_policy_data, $inner_item)){
$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 = '₹ ' .format_indian_number(round($inner_item['rata_premimum'])); $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']));
// } // }
@ -244,7 +258,12 @@ class sendMailNotification
$temp_data .= '<td>' . $inner_item['name'] . ($inner_item['relationship'] == 'Self' ? ' (' . $inner_item['emp_code'] . ')' : '') . '</td>'; $temp_data .= '<td>' . $inner_item['name'] . ($inner_item['relationship'] == 'Self' ? ' (' . $inner_item['emp_code'] . ')' : '') . '</td>';
$temp_data .= '<td>' . $inner_item['relationship'] . '</td>'; $temp_data .= '<td>' . $inner_item['relationship'] . '</td>';
$temp_data .= '<td>' . \DateTime::createFromFormat('Y-m-d', $inner_item['dob'])->format('d-m-Y') . '</td>'; $temp_data .= '<td>' . \DateTime::createFromFormat('Y-m-d', $inner_item['dob'])->format('d-m-Y') . '</td>';
$temp_data .= '<td>' . $si . '</td>';
if($policy_premium_data['premium_type'] == 2){
$temp_data .= '<td>' . $si . '</td>';
}else{
$temp_data .= (($si != 0 && count($item) != 1) ? ('<td rowspan='.$rowspan.'>' . $si . '</td>') : ($si == 0 ? "" : '<td>' . $si . '</td>') );
}
// Only Display SI Topup and Dependent Addon // 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) {
@ -305,15 +324,25 @@ class sendMailNotification
$gst = 0; $gst = 0;
} }
if(count($payable_employee_array) > 0){ // dd($payable_employee_array);
// dd(count($payable_employee_array['emp_data']));
if(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 = '';
$is_addon = ''; $is_addon = '';
$rowspan = count($payable_employee_array['emp_data']) ?? 2;
foreach ($payable_employee_array as $inner_item) { $self_si_amount = $payable_employee_array['si_amount'] ?? 0;
$self_premium = $payable_employee_array['self_premium'] ?? 0;
$self_gst = $payable_employee_array['self_gst'] ?? 0;
// dd($payable_employee_array['si_amount'], $self_si_amount);
foreach ($payable_employee_array['emp_data'] as $inner_item) {
//getting policy premium data //getting policy premium data
$client_policy_data = $clientPolicyModel->where('id', $inner_item['client_policy_id'])->first(); $client_policy_data = $clientPolicyModel->where('id', $inner_item['client_policy_id'])->first();
if($client_policy_data['policy_type_id'] == 1 || $client_policy_data['policy_type_id'] == 6 || $client_policy_data['policy_type_id'] == 7 ){ if($client_policy_data['policy_type_id'] == 1 || $client_policy_data['policy_type_id'] == 6 || $client_policy_data['policy_type_id'] == 7 ){
@ -323,22 +352,63 @@ class sendMailNotification
} }
//end of getting policy premium data //end of getting policy premium data
// dd($policy_premium_data);
$si = ''; $si = '';
$premium = ''; $premium = '';
$gst_forself = ''; $gst_forself = '';
$si = '₹ ' .format_indian_number($inner_item['basic_cover_si']); if($policy_premium_data['premium_type'] == 2){
$premium = '₹ ' .format_indian_number(round($inner_item['rata_premimum'])); $si = '₹ ' .format_indian_number($inner_item['basic_cover_si']);
$gst_forself = '₹ ' .format_indian_number(round($inner_item['gst'])); }else{
empty($self_si_amount) ? $si = 0 : $si = '₹ ' .format_indian_number($self_si_amount);
}
if($policy_premium_data['premium_type'] == 1){
empty($self_premium) ? $premium = 0 : $premium = '₹ ' .format_indian_number($self_premium);
empty($self_gst) ? $gst_forself = 0 : $gst_forself = '₹ ' .format_indian_number($self_gst);
}else{
$premium = '₹ ' .format_indian_number(round($inner_item['rata_premimum']));
$gst_forself = '₹ ' .format_indian_number(round($inner_item['gst']));
}
$temp_data .= '<tr>'; $temp_data .= '<tr>';
$temp_data .= '<td>' . $inner_item['name'] . ($inner_item['relationship'] == 'Self' ? ' (' . $inner_item['emp_code'] . ')' : '') . '</td>'; $temp_data .= '<td>' . $inner_item['name'] . ($inner_item['relationship'] == 'Self' ? ' (' . $inner_item['emp_code'] . ')' : '') . '</td>';
$temp_data .= '<td>' . $inner_item['relationship'] . '</td>'; $temp_data .= '<td>' . $inner_item['relationship'] . '</td>';
$temp_data .= '<td>' . \DateTime::createFromFormat('Y-m-d', $inner_item['dob'])->format('d-m-Y') . '</td>'; $temp_data .= '<td>' . \DateTime::createFromFormat('Y-m-d', $inner_item['dob'])->format('d-m-Y') . '</td>';
$temp_data .= '<td>' . $si . '</td>';
$temp_data .= '<td>' . $premium . '</td>'; // dd($si);
$temp_data .= '<td>' . $gst_forself . '</td>';
if($policy_premium_data['premium_type'] == 2){
$temp_data .= '<td>' . $si . '</td>';
$temp_data .= '<td>' . $premium . '</td>';
$temp_data .= '<td>' . $gst_forself . '</td>';
}else{
if($policy_premium_data['premium_type'] == 1){
$temp_data .= (($si != 0 && count($item) != 1) ? ('<td rowspan='.$rowspan.'>' . $si . '</td>') : ($si == 0 ? "" : '<td>' . $si . '</td>') );
$temp_data .= (($premium != 0 && count($item) != 1) ? ('<td rowspan='.$rowspan.'>' . $premium . '</td>') : ($premium == 0 ? "" : '<td>' . $premium . '</td>') );
$temp_data .= (($gst_forself != 0 && count($item) != 1) ? ('<td rowspan='.$rowspan.'>' . $gst_forself . '</td>') : ($gst_forself == 0 ? "" : '<td>' . $gst_forself . '</td>') );
}else{
$temp_data .= (($si != 0 && count($item) != 1) ? ('<td rowspan='.$rowspan.'>' . $si . '</td>') : ($si == 0 ? "" : '<td>' . $si . '</td>') );
$temp_data .= '<td>' . $premium . '</td>';
$temp_data .= '<td>' . $gst_forself . '</td>';
}
$self_si_amount = 0;
$self_premium = 0;
$self_gst = 0;
}
$temp_data .= '</tr>'; $temp_data .= '</tr>';

View File

@ -54,6 +54,39 @@ class ClientPolicyModel extends Model
"is_member_modify_allowed", "is_member_modify_allowed",
]; ];
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = ["checkAndADDCreatedByValue"];
protected $afterInsert = [];
protected $beforeUpdate = ["checkAndUpdateUpdatedByValue"];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
protected function checkAndADDCreatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['created_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['created_by'] = get_session_userid();
}
return $data;
}
protected function checkAndUpdateUpdatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['updated_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['updated_by'] = get_session_userid();
}
return $data;
}
public function getClientPolicyById($id){ public function getClientPolicyById($id){
return $this->db->table('client_policy') return $this->db->table('client_policy')

View File

@ -557,7 +557,7 @@ class EmployeePolicyModel extends Model
} }
public function getDeletionEmployeeDataForExportExcel($ref_data) public function getDeletionEmployeeDataForExportExcel($ref_data, $return_type = 0)
{ {
$client_id = $ref_data['client_id']; $client_id = $ref_data['client_id'];
@ -618,8 +618,7 @@ class EmployeePolicyModel extends Model
employee_polices.basic_cover_si, employee_polices.basic_cover_si,
employee_polices.uhid as uhid, employee_polices.uhid as uhid,
employee_polices.policy_end_date, employee_polices.policy_end_date,
employee_polices.premium, employee_polices.rata_premimum as premium,
employee_polices.rata_premimum as pro_rata_premium,
employee_polices.claim_status, employee_polices.claim_status,
batch_data.emp_policy_id AS emp_policy_id, batch_data.emp_policy_id AS emp_policy_id,
@ -714,9 +713,14 @@ class EmployeePolicyModel extends Model
group by group_key group by group_key
"); ");
$result = $query->getResult(); if($return_type == 1){
$result = $query->getResultArray();
}else{
$result = $query->getResult();
}
// dd($this->db->getLastQuery(), $result); // dd($this->db->getLastQuery(), $result);
return $result; return $result;
} }

View File

@ -257,7 +257,6 @@
} }
}) })
var policy_PrimaryKey = $('#client_id_policy').val(); var policy_PrimaryKey = $('#client_id_policy').val();
var policy_client = $('#policy_PrimaryKey').val(); var policy_client = $('#policy_PrimaryKey').val();

View File

@ -217,7 +217,7 @@
<div class="form-group col-md-8"> <div class="form-group col-md-8">
<label for="name">Name<span class="text-danger">*</span></label> <label for="name">Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="name" placeholder="Ente Name" readonly> <input type="text" class="form-control" name="name" id="name" placeholder="Ente Name">
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
@ -264,7 +264,7 @@
$(document).ready(function(){ $(document).ready(function(){
var dob = flatpickr("#dob", { var dob = flatpickr("#dob", {
dateFormat: "d/m/Y", dateFormat: "d/M/Y",
allowInput: false allowInput: false
}); });
}) })

View File

@ -332,7 +332,7 @@ table.dataTable tbody td {
<td><input type="number" class="form-control" name="received_amount[]" placeholder="Enter Amount" required onchange="checkInvAmont(event)"></td> <td><input type="number" class="form-control" name="received_amount[]" placeholder="Enter Amount" required onchange="checkInvAmont(event)"></td>
<td><input type="number" class="form-control" name="tds[]" placeholder="Enter TDS" onchange="checkInvAmont(event)" required></td> <td><input type="number" class="form-control" name="tds[]" placeholder="Enter TDS" onchange="checkInvAmont(event)" required></td>
<td><input type="text" class="form-control" name="utr_no[]" placeholder="Enter UTR No" required></td> <td><input type="text" class="form-control" name="utr_no[]" placeholder="Enter UTR No" required></td>
<td><input type="text" class="form-control payment_date" name="payment_date[]" value="<?php echo date('d-m-Y'); ?>" placeholder="dd-mm-yyyy" required readonly></td> <td><input type="text" class="form-control payment_date" name="payment_date[]" value="<?php echo date('d/m/Y'); ?>" placeholder="dd/mm/yyyy" required readonly></td>
<td><i class="fa fa-trash mr-2 font-18 vertical-middle text-danger remove-row" style="text-align: center;"></i></td> <td><i class="fa fa-trash mr-2 font-18 vertical-middle text-danger remove-row" style="text-align: center;"></i></td>
</tr> </tr>
</tbody> </tbody>
@ -515,13 +515,13 @@ table.dataTable tbody td {
<td><input type="number" class="form-control" name="received_amount[]" placeholder="Enter Amount" onchange="checkInvAmont(event)" required></td> <td><input type="number" class="form-control" name="received_amount[]" placeholder="Enter Amount" onchange="checkInvAmont(event)" required></td>
<td><input type="number" class="form-control" name="tds[]" placeholder="Enter TDS" onchange="checkInvAmont(event)" required></td> <td><input type="number" class="form-control" name="tds[]" placeholder="Enter TDS" onchange="checkInvAmont(event)" required></td>
<td><input type="text" class="form-control" name="utr_no[]" placeholder="Enter UTR No" required></td> <td><input type="text" class="form-control" name="utr_no[]" placeholder="Enter UTR No" required></td>
<td><input type="text" class="form-control payment_date" value="<?php echo date('d-m-Y'); ?>" name="payment_date[]" placeholder="Enter UTR No" required readonly></td> <td><input type="text" class="form-control payment_date" value="<?php echo date('d/m/Y'); ?>" name="payment_date[]" placeholder="dd/mm/yyyy" required readonly></td>
<td><i class="fa fa-trash mr-2 font-18 vertical-middle text-danger remove-row" style="text-align: center;"></i></td> <td><i class="fa fa-trash mr-2 font-18 vertical-middle text-danger remove-row" style="text-align: center;"></i></td>
`; `;
tableBody.appendChild(newRow); tableBody.appendChild(newRow);
$('.payment_date').datepicker({ $('.payment_date').datepicker({
format: 'dd-mm-yyyy', format: 'dd/mm/yyyy',
autoclose: true autoclose: true
}); });
}); });
@ -579,15 +579,16 @@ function formatDate(date) {
var day = ("0" + date.getDate()).slice(-2); var day = ("0" + date.getDate()).slice(-2);
var month = ("0" + (date.getMonth() + 1)).slice(-2); var month = ("0" + (date.getMonth() + 1)).slice(-2);
var year = date.getFullYear(); var year = date.getFullYear();
return day + "-" + month + "-" + year; return day + "/" + month + "/" + year;
} }
function formatDateToDMY(dateStr) { function formatDateToDMY(dateStr) {
// Split the date string by the hyphen // Split the date string by the hyphen
var parts = dateStr.split('-'); var parts = dateStr.split('-');
return parts[2] + '-' + parts[1] + '-' + parts[0]; // Rearrange to DD-MM-YYYY return parts[2] + '/' + parts[1] + '/' + parts[0]; // Rearrange to DD-MM-YYYY
} }
function showInvoiceStatusModal(event) function showInvoiceStatusModal(event)
{ {
console.log('############ showInvoiceStatusModal function called ##################');
var modal_received_amt_div = document.getElementById('modal_received_amt_div'); var modal_received_amt_div = document.getElementById('modal_received_amt_div');
modal_received_amt_div.style.display = 'none'; modal_received_amt_div.style.display = 'none';
// alert(); // alert();
@ -635,7 +636,7 @@ function showInvoiceStatusModal(event)
// Clear existing rows in the payment table // Clear existing rows in the payment table
var paymentTableBody = document.querySelector('#payment_table_modal tbody'); var paymentTableBody = document.querySelector('#payment_table_modal tbody');
console.log('response.data.payments.length', response.data.payments.length)
// Populate payment table rows // Populate payment table rows
if(response.data.payments.length) if(response.data.payments.length)
{ {
@ -652,7 +653,7 @@ function showInvoiceStatusModal(event)
`; `;
}); });
} }
$('.payment_date').datepicker({ format: 'dd-mm-yyyy',autoclose: true}); $('.payment_date').datepicker({ format: 'dd/mm/yyyy',autoclose: true});
// Show the modal // Show the modal
var myModal = new bootstrap.Modal(document.getElementById('invoice_modal')); var myModal = new bootstrap.Modal(document.getElementById('invoice_modal'));
myModal.show(); myModal.show();
@ -690,7 +691,7 @@ $(document).ready(function(){
$('.payment_date').datepicker({ $('.payment_date').datepicker({
format: 'dd-mm-yyyy', format: 'dd/mm/yyyy',
autoclose: true autoclose: true
}); });
@ -705,7 +706,7 @@ minDate.setDate(today.getDate() - 180);
var maxDate = new Date(); var maxDate = new Date();
maxDate.setDate(today.getDate() + 180); maxDate.setDate(today.getDate() + 180);
$('#invoice_date_modal').datepicker({ $('#invoice_date_modal').datepicker({
format: 'dd-mm-yyyy', format: 'dd/mm/yyyy',
autoclose: true, autoclose: true,
startDate: minDate, startDate: minDate,
endDate: maxDate endDate: maxDate

View File

@ -39,6 +39,7 @@
.form-group-client-policy-masters { .form-group-client-policy-masters {
display: -webkit-box; display: -webkit-box;
max-width: 100% !important; max-width: 100% !important;
margin-left: -23px;
} }
.flex-container { .flex-container {
@ -85,9 +86,9 @@
} }
.s { .s {
/* margin-left: 30px; margin-left: 50px;
width: 689px; */ /* width: 689px; */
margin-left: 141px; /* margin-left: 141px; */
width: 576px; width: 576px;
} }
</style> </style>
@ -221,6 +222,9 @@
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="waiverofpreexistingdiseases_display" id="waiverofpreexistingdiseases_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Waiver of Pre-existing Diseases</label> <label for="totalSumInsured">Waiver of Pre-existing Diseases</label>
</div> </div>
@ -231,6 +235,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;display:none;"> <div class="row" style="margin-bottom: 10px;display:none;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="maternitycoverage_display" id="maternitycoverage_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Maternity Coverage</label> <label for="totalSumInsured">Maternity Coverage</label>
</div> </div>
@ -240,6 +247,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;display:none;"> <div class="row" style="margin-bottom: 10px;display:none;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="twindelivery_display" id="twindelivery_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Twin Delivery</label> <label for="totalSumInsured">Twin Delivery</label>
</div> </div>
@ -249,6 +259,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;display:none;"> <div class="row" style="margin-bottom: 10px;display:none;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="preandpostnatal_display" id="preandpostnatal_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Pre and Post natal</label> <label for="totalSumInsured">Pre and Post natal</label>
</div> </div>
@ -258,6 +271,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;display:none;"> <div class="row" style="margin-bottom: 10px;display:none;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="babyday1cover_display" id="babyday1cover_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Baby Day 1 Cover</label> <label for="totalSumInsured">Baby Day 1 Cover</label>
</div> </div>
@ -266,8 +282,10 @@
</div> </div>
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="9monthwaitingperiodwaived_display" id="9monthwaitingperiodwaived_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">9-month waiting Period waived</label> <label for="totalSumInsured">9-month waiting Period waived</label>
</div> </div>
@ -278,6 +296,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="coverfromthedateofjoining_display" id="coverfromthedateofjoining_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Cover from the date of Joining</label> <label for="totalSumInsured">Cover from the date of Joining</label>
</div> </div>
@ -287,6 +308,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="waiverof1234thyearexclusions_display" id="waiverof1234thyearexclusions_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Waiver of 1, 2, 3 & 4th year Exclusions</label> <label for="totalSumInsured">Waiver of 1, 2, 3 & 4th year Exclusions</label>
</div> </div>
@ -298,6 +322,9 @@
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="waiverof30dayswaitingperiod_display" id="waiverof30dayswaitingperiod_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Waiver of 30 days waiting period</label> <label for="totalSumInsured">Waiver of 30 days waiting period</label>
</div> </div>
@ -308,6 +335,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="prehospitalizationcover_display" id="prehospitalizationcover_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Pre Hospitalization Cover</label> <label for="totalSumInsured">Pre Hospitalization Cover</label>
</div> </div>
@ -317,6 +347,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="posthospitalizationcover_display" id="posthospitalizationcover_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Post Hospitalization Cover</label> <label for="totalSumInsured">Post Hospitalization Cover</label>
</div> </div>
@ -326,6 +359,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="congenitaldiseasesinternal_display" id="congenitaldiseasesinternal_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Congenital Diseases - Internal</label> <label for="totalSumInsured">Congenital Diseases - Internal</label>
</div> </div>
@ -336,6 +372,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="congenitaldiseasesexternal_display" id="congenitaldiseasesexternal_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Congenital Diseases - External</label> <label for="totalSumInsured">Congenital Diseases - External</label>
</div> </div>
@ -345,6 +384,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="copayzonewisecopay_display" id="copayzonewisecopay_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Co-Pay/Zone wise Co Pay</label> <label for="totalSumInsured">Co-Pay/Zone wise Co Pay</label>
</div> </div>
@ -355,6 +397,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;display:none;"> <div class="row" style="margin-bottom: 10px;display:none;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="co_pay_details_display" id="co_pay_details_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Co-pay Details</label> <label for="totalSumInsured">Co-pay Details</label>
</div> </div>
@ -364,6 +409,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="bioabsorbablestenttoriclensmultifocallens_display" id="bioabsorbablestenttoriclensmultifocallens_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Bio absorbable stent / Toric lens/ Multi Focal lens</label> <label for="totalSumInsured">Bio absorbable stent / Toric lens/ Multi Focal lens</label>
</div> </div>
@ -373,6 +421,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="roomrentlimit_display" id="roomrentlimit_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Room Rent Limit</label> <label for="totalSumInsured">Room Rent Limit</label>
</div> </div>
@ -382,6 +433,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="proportionatedeductionclause_display" id="proportionatedeductionclause_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Proportionate Deduction Clause</label> <label for="totalSumInsured">Proportionate Deduction Clause</label>
</div> </div>
@ -404,6 +458,9 @@
</div> --> </div> -->
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="ailmentcapping_display" id="ailmentcapping_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Ailment capping</label> <label for="totalSumInsured">Ailment capping</label>
</div> </div>
@ -414,6 +471,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;display:none;"> <div class="row" style="margin-bottom: 10px;display:none;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="ailment_capping_details_display" id="ailment_capping_details_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Ailment capping Details</label> <label for="totalSumInsured">Ailment capping Details</label>
</div> </div>
@ -423,6 +483,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="corporatebuffer_display" id="corporatebuffer_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Corporate Buffer</label> <label for="totalSumInsured">Corporate Buffer</label>
</div> </div>
@ -432,6 +495,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="sublimitofcorporatebuffer_display" id="sublimitofcorporatebuffer_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Sublimit of Corporate Buffer</label> <label for="totalSumInsured">Sublimit of Corporate Buffer</label>
</div> </div>
@ -441,6 +507,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="ambulancecharges_display" id="ambulancecharges_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Ambulance Charges</label> <label for="totalSumInsured">Ambulance Charges</label>
</div> </div>
@ -450,6 +519,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="airambulance_display" id="airambulance_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Air Ambulance</label> <label for="totalSumInsured">Air Ambulance</label>
</div> </div>
@ -459,6 +531,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="familytransportationbenefit_display" id="familytransportationbenefit_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Family Transportation Benefit</label> <label for="totalSumInsured">Family Transportation Benefit</label>
</div> </div>
@ -468,6 +543,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="reasonableandcustomarycharges_display" id="reasonableandcustomarycharges_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Reasonable and Customary Charges</label> <label for="totalSumInsured">Reasonable and Customary Charges</label>
</div> </div>
@ -478,6 +556,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="daycaretreatment_display" id="daycaretreatment_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Day Care Treatment</label> <label for="totalSumInsured">Day Care Treatment</label>
</div> </div>
@ -488,6 +569,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="ayudhtreatmentcover_display" id="ayudhtreatmentcover_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">AYUSH treatment cover</label> <label for="totalSumInsured">AYUSH treatment cover</label>
</div> </div>
@ -498,6 +582,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;display:none;"> <div class="row" style="margin-bottom: 10px;display:none;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="ayushTreatmentCoverData_display" id="ayushTreatmentCoverData_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">AYUSH treatment cover Limit</label> <label for="totalSumInsured">AYUSH treatment cover Limit</label>
</div> </div>
@ -507,6 +594,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="armdcovered_display" id="armdcovered_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">ARMD Covered</label> <label for="totalSumInsured">ARMD Covered</label>
</div> </div>
@ -516,6 +606,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="suminsuredenhancement_display" id="suminsuredenhancement_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Sum Insured enhancement</label> <label for="totalSumInsured">Sum Insured enhancement</label>
</div> </div>
@ -526,6 +619,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="automaticsuminsuredreinstatement_display" id="automaticsuminsuredreinstatement_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Automatic Sum Insured reinstatement</label> <label for="totalSumInsured">Automatic Sum Insured reinstatement</label>
</div> </div>
@ -535,6 +631,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="additionalsicknessbenefit_display" id="additionalsicknessbenefit_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Additional Sickness Benefit</label> <label for="totalSumInsured">Additional Sickness Benefit</label>
</div> </div>
@ -544,6 +643,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="lasiksurgery_display" id="lasiksurgery_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Lasik Surgery</label> <label for="totalSumInsured">Lasik Surgery</label>
</div> </div>
@ -553,6 +655,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="midterminclusion_display" id="midterminclusion_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Mid Term inclusion</label> <label for="totalSumInsured">Mid Term inclusion</label>
</div> </div>
@ -562,6 +667,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="capd_display" id="capd_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">CAPD</label> <label for="totalSumInsured">CAPD</label>
</div> </div>
@ -571,6 +679,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="organdonorexpenses_display" id="organdonorexpenses_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Organ donor expenses</label> <label for="totalSumInsured">Organ donor expenses</label>
</div> </div>
@ -580,6 +691,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="moderntreatmentsasperirdai_display" id="moderntreatmentsasperirdai_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Modern treatments as per IRDAI</label> <label for="totalSumInsured">Modern treatments as per IRDAI</label>
</div> </div>
@ -589,6 +703,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="Wellness_display" id="Wellness_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Wellness</label> <label for="totalSumInsured">Wellness</label>
</div> </div>
@ -598,6 +715,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="days_of_discharge_display" id="days_of_discharge_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Claim Intimation Clause</label> <label for="totalSumInsured">Claim Intimation Clause</label>
</div> </div>
@ -608,6 +728,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="days_from_dod_display" id="days_from_dod_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Claim Submission</label> <label for="totalSumInsured">Claim Submission</label>
</div> </div>
@ -618,6 +741,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="cataract_display" id="cataract_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Cataract</label> <label for="totalSumInsured">Cataract</label>
</div> </div>
@ -628,6 +754,9 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;display:none;"> <div class="row" style="margin-bottom: 10px;display:none;">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="cataractData_display" id="cataractData_display" checked>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="totalSumInsured">Cataract Limit</label> <label for="totalSumInsured">Cataract Limit</label>
</div> </div>
@ -1173,6 +1302,7 @@
}); });
} }
$("#sum_insured").trigger("keyup"); $("#sum_insured").trigger("keyup");
$(".multiple_sum_insured").trigger("keyup"); $(".multiple_sum_insured").trigger("keyup");
@ -1350,6 +1480,9 @@
var index = $('.modifyclassinput').length; var index = $('.modifyclassinput').length;
var appendElement = `<div class="form-group col-md-6 form-group-client-policy-masters removeDom"> var appendElement = `<div class="form-group col-md-6 form-group-client-policy-masters removeDom">
<div class="col-md-1">
<input type="checkbox" style="margin-top: 12px" name="special_condition_display_input[]" id="special_condition_display_input" checked>
</div>
<label for="specialconditionlabel" class="special_condition_label[]" style="width: 450px;position: relative;bottom: 6px;"> <label for="specialconditionlabel" class="special_condition_label[]" style="width: 450px;position: relative;bottom: 6px;">
<input class="form-control" name="special_condition_label[]" id="special_condition_label[]" style="position: relative;right: 5px;"> <input class="form-control" name="special_condition_label[]" id="special_condition_label[]" style="position: relative;right: 5px;">
<span class="specialConditionClose" style="color: red; float: right;position: relative;bottom: 28px;left: 15px;">X</span> <span class="specialConditionClose" style="color: red; float: right;position: relative;bottom: 28px;left: 15px;">X</span>

View File

@ -41,6 +41,10 @@ table.dataTable tbody td {
padding: 10px; padding: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.addbtnStyle{
margin-left: 20px !important;
}
</style> </style>
<style> <style>
@ -240,7 +244,7 @@ table.dataTable tbody td {
</div> </div>
<div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;"> <div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;">
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="hide_list_show_add();">Add</button> <!-- <button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="hide_list_show_add();">Add</button> -->
</div> </div>
</div> </div>
<div> <div>
@ -420,17 +424,27 @@ $(document).ready(function() {
if (ticketsTable.length) { if (ticketsTable.length) {
ticketsTable.DataTable({ ticketsTable.DataTable({
scrollX: true, scrollX: true,
dom: "<'row'<'col-sm-6'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{ buttons: [
extend: 'csv', {
text: 'CSV', extend: 'csv',
title: 'Policy-Tranction-Inception-List', text: 'CSV',
exportOptions: { title: 'Policy-Tranction-Inception-List',
columns: ':not(:last-child)' exportOptions: {
columns: ':not(:last-child)'
},
}, },
}, ], {
text: 'Add',
className: 'buttons-html5 addbtnStyle',
action: function (e, dt, node, config) {
hide_list_show_add();
}
}
],
language: { language: {
search: "_INPUT_", search: "_INPUT_",
searchPlaceholder: "Search..." searchPlaceholder: "Search..."