CHANGE_SEND_NOTIFICATION_HELPER_FUNCTION_AND_DMS_SEARCH_AND_OTHERS : RV

This commit is contained in:
VENKATESHWARAN 2024-10-08 18:30:45 +05:30
parent 094e1fbb1a
commit 49674ef5d2
23 changed files with 1459 additions and 1172 deletions

2
.gitignore vendored
View File

@ -25,6 +25,8 @@ writable/**/*.sqlite
writable/e_card_template/*
!writable/e_card_template/.gitkeep
writable/tmp/*
!writable/tmp/.gitkeep
vendor/
build/

File diff suppressed because it is too large Load Diff

View File

@ -165,8 +165,9 @@ class DashboardController extends AdminController
$data['financeTeamCount'] = count($financeTeamData) ?? 0;
// print_r($data);die;
$data['page_name'] = 'Dashboard';
echo view('layout/header');
echo view('layout/header', $data);
echo view('DashBoard', $data);
echo view('layout/footer');
}

View File

@ -1811,6 +1811,7 @@ class EmpDataServiceController extends BaseController
$file_data = $this->getDataByFileId($file_id, 'success');
$this->setPullNotification($file_data);
//import file to upload Google Drive
// if(excelFileGDriveUpload($file_id, 'batch_file')){
// $this->myLogger->logme('error', 'Inception Update Google Drive File Upload -- File Uploaded Successfully');
// }else{
@ -2233,6 +2234,13 @@ class EmpDataServiceController extends BaseController
$this->setPullNotification($file_data);
//import file to upload Google Drive
// if(excelFileGDriveUpload($file_id, 'batch_file')){
// $this->myLogger->logme('error', 'Correction File Update Google Drive File Upload -- File Uploaded Successfully');
// }else{
// $this->myLogger->logme('error', 'Correction File Update Google Drive File Upload -- File Uploaded Field');
// }
return 'Import Correction Updated '. $status_val . '- Updated Count : ' . $emp_count;
}
@ -2847,6 +2855,13 @@ class EmpDataServiceController extends BaseController
'user_id' => $user_id,
]]);
//import file to upload Google Drive
// if(excelFileGDriveUpload($file_id, 'batch_file')){
// $this->myLogger->logme('error', 'SI Enhancement File Update Google Drive File Upload -- File Uploaded Successfully');
// }else{
// $this->myLogger->logme('error', 'SI Enhancement File Update Google Drive File Upload -- File Uploaded Field');
// }
return 'SI Enhancement Update Endorsement ID -- ' . $status_val . '-- Updated Count : ' . $emp_count;
}
@ -3368,6 +3383,13 @@ class EmpDataServiceController extends BaseController
'user_id' => $user_id,
]]);
//import file to upload Google Drive
// if(excelFileGDriveUpload($file_id, 'batch_file')){
// $this->myLogger->logme('error', 'Deletion File Update Google Drive File Upload -- File Uploaded Successfully');
// }else{
// $this->myLogger->logme('error', 'Deletion File Update Google Drive File Upload -- File Uploaded Field');
// }
return 'Deletion Update Endorsement ID -- ' . $status_val . '-- Updated Count : ' . $emp_count;
}

View File

@ -1918,18 +1918,30 @@ class EmployeeRestController extends AdminController
$account_manager_wholeData =sendMailNotification::sendMailNotification('account_maneger_summary_mail', $params);
foreach ($account_manager_wholeData as $key => $value) {
$mail_send_return1 = MailHelper::send_email($value);
$this->myLogger->logme("info", $mail_send_return1);
if ($account_manager_wholeData) {
foreach ($account_manager_wholeData as $key => $value) {
$mail_send_return1 = MailHelper::send_email($value);
$this->myLogger->logme("info", $mail_send_return1);
}
}else{
$this->myLogger->logme("error", 'Account Manager Mail Configuration not Enable for this client');
}
$client_hr_wholeData =sendMailNotification::sendMailNotification('client_hr_summary_mail', $params);
foreach ($client_hr_wholeData as $key => $value) {
$mail_send_return2 = MailHelper::send_email($value);
$this->myLogger->logme("info", $mail_send_return2);
if ($client_hr_wholeData) {
foreach ($client_hr_wholeData as $key => $value) {
$mail_send_return2 = MailHelper::send_email($value);
$this->myLogger->logme("info", $mail_send_return2);
}
}else{
$this->myLogger->logme("error", 'Client HR Mail Configuration not Enable for this client');
}
}
}else{
$this->myLogger->logme("error", 'Member Review Mail Configuration not Enable for this client');
}
}

View File

@ -266,7 +266,7 @@ class GoogleDriveController extends BaseController
'fields' => 'id' // Specify fields to return
]);
if($createdFile->id)
if($createdFile->id && $doc_type !== 'UPLOADS')
{
unlink($file_path);
}

View File

@ -29,6 +29,8 @@ use App\Models\UserModel;
use App\Models\EmployeePolicyModel;
use App\Models\InsurerStatements;
use App\Models\InvPaymentDetailsModel;
use App\Models\BatchFileModel;
use App\Models\FileModel;
use Kint;
class PolicyTransactionController extends BaseController
@ -58,6 +60,8 @@ class PolicyTransactionController extends BaseController
protected $insurerStatements;
protected $invoiceStatus;
protected $invPaymentDetailsModel;
protected $batchFileModel;
protected $filesModel;
public function __construct()
{
@ -85,6 +89,8 @@ class PolicyTransactionController extends BaseController
$this->employeePolicyModel = new EmployeePolicyModel();
$this->insurerStatements = new InsurerStatements();
$this->invPaymentDetailsModel = new InvPaymentDetailsModel();
$this->batchFileModel = new BatchFileModel();
$this->filesModel = new FileModel();
$this->invoiceStatus = [
'pending' => 'Pending',
'generated' => 'Generated',
@ -1498,6 +1504,8 @@ class PolicyTransactionController extends BaseController
->findAll();
// dd( $this->insurerStatements->getLastQuery());
$data['page_name'] = 'Statement Upload';
$this->loadLayout('insurer_statement_list', $data);
}
@ -1969,12 +1977,17 @@ class PolicyTransactionController extends BaseController
$policy_doc_name = $this->request->getPost('policy_doc_name');
$pt_files = [];
$kyc_files = [];
$batch_files = [];
$files = [];
// print_r($jsonData);die();
if($policy_id != "")
{
//get policy docs from policy transation related tables
$pt_files = $this->PTFileModel->getPolicyDriveFilesIndex($policy_id,$policy_doc_name);
// ~dd($this->PTFileModel->getLastQuery());
$batch_files = $this->batchFileModel->getBatchFilesDataForDocumentSearch($policy_id,$policy_doc_name);
$files = $this->filesModel->getFilesDataForDocumentSearch($policy_id,$policy_doc_name);
// dd($files);
// dd($this->PTFileModel->getLastQuery());
// ~dd($pt_files);
}
if($customer_id != "")
@ -1984,11 +1997,12 @@ class PolicyTransactionController extends BaseController
// !dd($kyc_files);
}
$data['files'] = array_merge($pt_files,$kyc_files);
// dd($data['files']);
$data['files'] = array_merge($pt_files,$kyc_files,$batch_files,$files);
// dd($data['files']);
}
$data['page_name'] = 'Documents Search';
$data['customers'] = $this->clientModel->select('id,client_name,short_name as display_value')->where('is_active',1)->get()->getResultarray();
$data['policies'] = $this->clientPolicyModel->select("client_policy.id,client_policy.policy_no,policy_type.policy_type,concat(policy_type.policy_type,' - ',client_policy.policy_no) as display_value")
->join('policy_type','client_policy.policy_type_id = policy_type.id')
@ -1999,5 +2013,4 @@ class PolicyTransactionController extends BaseController
}
}

View File

@ -160,7 +160,10 @@ class sendMailNotification
$client_data =$clientModel->where('id', $client_id)->first();
$notification_data = $notificationModel->where('client_id' ,$client_id)->where('template_name', $action)->first();
// dd($notification_data);
if (isset($notification_data) && $notification_data['enabled'] == 1) {
$mail_content = $notification_data['mail_content'];
$subject = $notification_data['subject'];
$app_link = $_ENV['App_Url'];
@ -183,63 +186,114 @@ class sendMailNotification
$Addon_list = [];
$name = '';
$emp_code = '';
foreach ($array_list as $item) {
if(count($item) != 0){
$table_content .= '<div style="text-align: left;"><div style="text-align:left;"><h4>Policy Name : ';
$temp_data ='';
$policy_name ='';
$is_addon ='';
foreach ($item as $inner_item) {
$policy_name = $inner_item['policy_name'];
$temp_data .= '<tr ><td style="width:20%">' . $inner_item['name'] . '</td><td style="width:20%">'.$inner_item['relationship'].'</td><td>'. \DateTime::createFromFormat('Y-m-d', $inner_item['dob'])->format('d-m-Y') .'</td><td style="width:20%">₹'.format_indian_number($inner_item['basic_cover_si']).'</td><td style="width:20%">₹'.format_indian_number($inner_item['premium']).'</td><td>₹'. format_indian_number($inner_item['gst']) .'</td></tr><tr>';
if($inner_item['relationship'] == 'Self' || $inner_item['relationship'] == 'self'){
$mail = $inner_item['email_corporate'];
$name = $inner_item['name'];
$emp_code = $inner_item['emp_code'];
}
$is_addon = $inner_item['is_addon'];
if (count($item) != 0) {
$table_content .= '<div style="text-align: left; font-size: 12px; ">';
$table_content .= '<div style="text-align:left;"><h4 style="font-size: 12px; ">Policy Name : ';
$temp_data = '';
$policy_name = '';
$is_addon = '';
if($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3){
$addtional_premium = $inner_item['rata_premimum'] + $addtional_premium;
$gst = $inner_item['gst'] + $gst;
}
}
// echo $policy_name;die;
$table_content .= $policy_name.'</h4></div><table style="width:60%"><thead style="background-color: #02a8b5;"><tr><th style="width:20%">Name</th><th>Relation</th><th style="width:15%">Date Of Birth</th><th>Sum Insure</th><th>Premium</th><tj>GST</th></tr></thead><tbody>';
$table_content .= $temp_data;
$table_content .= '</tbody></table></div>';
if ($is_addon == 2 || $is_addon == 3) {
$addon_list_array = [
'policy_name'=>$policy_name,
'addtional_premium'=>$addtional_premium,
'gst'=>$gst
];
$Addon_list[]= $addon_list_array;
}
foreach ($item as $inner_item) {
$policy_name = $inner_item['policy_name'];
$temp_data .= '<tr style="font-size: 12px; ">';
$temp_data .= '<td>' . $inner_item['name'] . '</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>₹' . format_indian_number($inner_item['basic_cover_si']) . '</td>';
$temp_data = '';
$addtional_premium = 0;
$gst = 0;
//Only Display SI Topup and Dependent Addon
if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) {
$temp_data .= '<td>₹' . format_indian_number($inner_item['premium']) . '</td>';
$temp_data .= '<td>₹' . format_indian_number($inner_item['gst']) . '</td>';
}
$temp_data .= '</tr>';
if ($inner_item['relationship'] == 'Self' || $inner_item['relationship'] == 'self') {
$mail = $inner_item['email_corporate'];
$name = $inner_item['name'];
$emp_code = $inner_item['emp_code'];
}
$is_addon = $inner_item['is_addon'];
if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) {
$addtional_premium = $inner_item['rata_premimum'] + $addtional_premium;
$gst = $inner_item['gst'] + $gst;
}
}
$table_content .= $policy_name . '</h4></div>';
$table_content .= '<table border="1" cellpadding="5" cellspacing="0" style="width:100%; border-collapse: collapse; font-size: 12px;">';
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff;">';
$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>';
//Only Display SI Topup and Dependent Addon
if ($is_addon == 2 || $is_addon == 3) {
$table_content .= '<th>Premium</th>';
$table_content .= '<th>GST</th>';
}
$table_content .= '</tr>';
$table_content .= '</thead>';
$table_content .= '<tbody>' . $temp_data . '</tbody>';
$table_content .= '</table></div>';
if ($is_addon == 2 || $is_addon == 3) {
$addon_list_array = [
'policy_name' => $policy_name,
'addtional_premium' => $addtional_premium,
'gst' => $gst
];
$Addon_list[] = $addon_list_array;
}
$temp_data = '';
$addtional_premium = 0;
$gst = 0;
}
}
if(count($Addon_list) != 0 && count($Addon_list) > 0){
$table_content .='<br><div style="text-align: left;"><div style="text-align:left;"><table style="width:60%"><thead style="background-color: #e26828;"><tr><th>Policy Name</th><th> Additional Premium</th><th>GST</th><th>Total</th></tr></thead><tbody>';
if (count($Addon_list) != 0 && count($Addon_list) > 0) {
$table_content .= '<br><div style="text-align: left; font-size: 12px; ">';
$table_content .= '<div style="text-align:left;">';
$table_content .= '<table border="1" cellpadding="5" cellspacing="0" style="width:100%; border-collapse: collapse; font-size: 12px;">';
$table_content .= '<thead style="background-color: #e26828; color: #ffffff;">';
$table_content .= '<tr style="font-size: 12px;" ><th>Policy Name</th><th>Additional Premium</th><th>GST</th><th>Total</th></tr>';
$table_content .= '</thead><tbody>';
$sum_tolal = 0;
foreach ($Addon_list as $key => $value) {
$sum_tolal = $value['gst'] + $value['addtional_premium'] + $sum_tolal;
$table_content .= '<tr><td>'.$value['policy_name'].'</td><td>₹'.$value['addtional_premium'].'</td><td>'.$value['gst'].'</td><td>'.$value['gst'] + $value['addtional_premium'] .'</td></tr>';
$table_content .= '<tr style="font-size: 12px; "><td>' . $value['policy_name'] . '</td>';
$table_content .= '<td>₹' . $value['addtional_premium'] . '</td>';
$table_content .= '<td>₹' . $value['gst'] . '</td>';
$table_content .= '<td>₹' . ($value['gst'] + $value['addtional_premium']) . '</td></tr>';
}
$sum_total_words = numberToWords($sum_tolal);
$table_content .= '<tr><td></td><td></td><td><h4>Total</h4></td><td>'.format_indian_number($sum_tolal).'</td></tr>';
$table_content .= '</tbody></table></div></div>';
$table_content .= '<div style="width:60%;text-align:right">'. $sum_total_words .'</div>';
$sum_total_words = numberToWords($sum_tolal);
$table_content .= '<tr style="font-size: 12px;"><td></td><td></td><td><b>Total</b></td><td>₹' . format_indian_number($sum_tolal) . '</td></tr>';
$table_content .= '</tbody></table></div></div>';
$table_content .= '<div style="width:100%; text-align:right; font-size: 12px; ">' . $sum_total_words . '</div>';
}
// print_r($table_content); die;
$mail_content = str_replace("[[member_name]]", $name . ' (' . $emp_code . ')' , $mail_content);
$mail_content = str_replace("[[member_summary]]", $table_content , $mail_content);
// print_r($mail_content); die;
// $mail = "aadhavanvalli@gmail.com";
// if (isset($mail) && !empty($mail)) {
$wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];
@ -248,6 +302,7 @@ class sendMailNotification
return $wholeData;
}
} else if($action == 'account_maneger_summary_mail'){
$client_id = $params['client_id'];
@ -259,7 +314,8 @@ class sendMailNotification
$client_data =$clientModel->where('id', $client_id)->first();
$notification_data = $notificationModel->where('client_id' ,$client_id)->where('template_name', $action)->first();
if (isset($notification_data) && $notification_data['enabled'] == 1) {
if (isset($notification_data) && $notification_data['enabled'] == 1) {
$client_rm_data= $clientRMModel->where('client_id', $client_id)->where('is_active',1)->findAll();
$user_list= [];
foreach ($client_rm_data as $key => $value) {
@ -270,8 +326,6 @@ class sendMailNotification
}
}
$mail_content = $notification_data['mail_content'];
$subject = $notification_data['subject'];
$app_link = $_ENV['App_Url'];
@ -293,64 +347,117 @@ class sendMailNotification
$gst = 0;
$array_list = $params['array_list'];
$Addon_list = [];
foreach ($array_list as $item) {
if(count($item) != 0){
$table_content .= '<div style="text-align: left;"><div style="text-align:left;"><h4>Policy Name : ';
$temp_data ='';
$policy_name ='';
$is_addon ='';
foreach ($item as $inner_item) {
$policy_name = $inner_item['policy_name'];
if($inner_item['relationship'] == 'Self'){
$emp_code = ' ('. $inner_item['emp_code'] . ')';
}else{
$emp_code ='';
}
$temp_data .= '<tr ><td style="width:20%">' . $inner_item['name'] . $emp_code . '</td><td style="width:20%">'.$inner_item['relationship'].'</td><td>'. \DateTime::createFromFormat('Y-m-d', $inner_item['dob'])->format('d-m-Y') .'</td><td style="width:20%">₹'.format_indian_number($inner_item['basic_cover_si']).'</td><td style="width:20%">₹'.format_indian_number($inner_item['premium']).'</td><td>₹'. format_indian_number($inner_item['gst']) .'</td></tr><tr>';
$is_addon = $inner_item['is_addon'];
if($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3){
if (count($item) != 0) {
$table_content .= '<div style="text-align: left; font-size: 12px;"><div style="text-align:left;"><h4>Policy Name : ';
$temp_data = '';
$policy_name = '';
$is_addon = '';
foreach ($item as $inner_item) {
$policy_name = $inner_item['policy_name'];
if ($inner_item['relationship'] == 'Self') {
$emp_code = ' (' . $inner_item['emp_code'] . ')';
} else {
$emp_code = '';
}
$temp_data .= '<tr>';
$temp_data .= '<td>' . $inner_item['name'] . $emp_code . '</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>₹' . format_indian_number($inner_item['basic_cover_si']) . '</td>';
$addtional_premium = $inner_item['rata_premimum'] + $addtional_premium;
$gst = $inner_item['gst'] + $gst;
//Only Display SI Topup and Dependent Addon
if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) {
$temp_data .= '<td>₹' . format_indian_number($inner_item['premium']) . '</td>';
$temp_data .= '<td>₹' . format_indian_number($inner_item['gst']) . '</td>';
}
$temp_data .= '</tr>';
$is_addon = $inner_item['is_addon'];
if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) {
$addtional_premium = $inner_item['rata_premimum'] + $addtional_premium;
$gst = $inner_item['gst'] + $gst;
}
}
}
$table_content .= $policy_name.'</h4></div><table style="width:60%"><thead style="background-color: #02a8b5;"><tr><th style="width:20%">Name</th><th>Relation</th><th style="width:15%">Date Of Birth</th><th>Sum Insure</th><th>Premium</th><tj>GST</th></tr></thead><tbody>';
$table_content .= $temp_data;
$table_content .= '</tbody></table></div>';
if ($is_addon == 2 || $is_addon == 3) {
$addon_list_array = [
'policy_name'=>$policy_name,
'addtional_premium'=>$addtional_premium,
'gst'=>$gst
];
$Addon_list[]= $addon_list_array;
$table_content .= $policy_name . '</h4></div>';
$table_content .= '<table border="1" cellpadding="5" cellspacing="0" style="width:100%; border-collapse: collapse; font-size: 12px;">';
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff;">';
$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>';
}
//Only Display SI Topup and Dependent Addon
if ($is_addon == 2 || $is_addon == 3) {
$table_content .= '<th>Premium</th>';
$table_content .= '<th>GST</th>';
}
$temp_data = '';
$addtional_premium = 0;
$gst = 0;
$table_content .= '</tr>';
$table_content .= '</thead>';
$table_content .= '<tbody>' . $temp_data . '</tbody>';
$table_content .= '</table></div>';
if ($is_addon == 2 || $is_addon == 3) {
$addon_list_array = [
'policy_name' => $policy_name,
'addtional_premium' => $addtional_premium,
'gst' => $gst
];
$Addon_list[] = $addon_list_array;
}
$temp_data = '';
$addtional_premium = 0;
$gst = 0;
}
}
if(count($Addon_list) != 0 && count($Addon_list) > 0){
$table_content .='<br><div style="text-align: left;"><div style="text-align:left;"><table style="width:60%"><thead style="background-color: #e26828;"><tr><th>Policy Name</th><th> Additional Premium</th><th>GST</th><th>Total</th></tr></thead><tbody>';
$sum_tolal = 0;
if (count($Addon_list) > 0) {
$table_content .= '<br><div style="text-align: left; font-size: 12px;"><div style="text-align:left;">';
$table_content .= '<table border="1" cellpadding="5" cellspacing="0" style="width:100%; border-collapse: collapse; font-size: 12px;">';
$table_content .= '<thead style="background-color: #e26828; color: #ffffff;">';
$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 .= '</tr>';
$table_content .= '</thead>';
$table_content .= '<tbody>';
$sum_total = 0;
foreach ($Addon_list as $key => $value) {
$sum_tolal = $value['gst'] + $value['addtional_premium'] + $sum_tolal;
$table_content .= '<tr><td>'.$value['policy_name'].'</td><td>₹'.$value['addtional_premium'].'</td><td>'.$value['gst'].'</td><td>'.$value['gst'] + $value['addtional_premium'] .'</td></tr>';
$total_addon = $value['gst'] + $value['addtional_premium'];
$sum_total += $total_addon;
$table_content .= '<tr>';
$table_content .= '<td>' . $value['policy_name'] . '</td>';
$table_content .= '<td>₹' . format_indian_number($value['addtional_premium']) . '</td>';
$table_content .= '<td>₹' . format_indian_number($value['gst']) . '</td>';
$table_content .= '<td>₹' . format_indian_number($total_addon) . '</td>';
$table_content .= '</tr>';
}
$sum_total_words = numberToWords($sum_tolal);
$table_content .= '<tr><td></td><td></td><td><h4>Total</h4></td><td>'.format_indian_number($sum_tolal).'</td></tr>';
$table_content .= '</tbody></table></div></div>';
$table_content .= '<div style="width:60%;text-align:right">'. $sum_total_words .'</div>';
$sum_total_words = numberToWords($sum_total);
$table_content .= '<tr>';
$table_content .= '<td></td><td></td><td><b>Total</b></td>';
$table_content .= '<td>₹' . format_indian_number($sum_total) . '</td>';
$table_content .= '</tr>';
$table_content .= '</tbody>';
$table_content .= '</table></div></div>';
$table_content .= '<div style="width:100%; text-align:right; font-size: 12px;">' . $sum_total_words . '</div>';
}
$mail_content = str_replace("[[member_summary]]", $table_content , $mail_content);
$account_manager_mail_list = [];
@ -412,55 +519,115 @@ class sendMailNotification
$Addon_list = [];
foreach ($array_list as $item) {
$table_content .= '<div style="text-align: left;"><div style="text-align:left;"><h4>Policy Name : ';
$temp_data ='';
foreach ($item as $inner_item) {
$policy_name = $inner_item['policy_name'];
if($inner_item['relationship'] == 'Self'){
$emp_code = ' ('. $inner_item['emp_code'] . ')';
}else{
$emp_code ='';
if (count($item) != 0) {
$table_content .= '<div style="text-align: left; font-size: 12px;"><div style="text-align:left;"><h4>Policy Name : ';
$temp_data = '';
$policy_name = '';
$is_addon = '';
foreach ($item as $inner_item) {
$policy_name = $inner_item['policy_name'];
if ($inner_item['relationship'] == 'Self') {
$emp_code = ' (' . $inner_item['emp_code'] . ')';
} else {
$emp_code = '';
}
$temp_data .= '<tr>';
$temp_data .= '<td>' . $inner_item['name'] . $emp_code . '</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>₹' . format_indian_number($inner_item['basic_cover_si']) . '</td>';
//Only Display SI Topup and Dependent Addon
if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) {
$temp_data .= '<td>₹' . format_indian_number($inner_item['premium']) . '</td>';
$temp_data .= '<td>₹' . format_indian_number($inner_item['gst']) . '</td>';
}
$temp_data .= '</tr>';
$is_addon = $inner_item['is_addon'];
if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) {
$addtional_premium = $inner_item['rata_premimum'] + $addtional_premium;
$gst = $inner_item['gst'] + $gst;
}
}
$temp_data .= '<tr ><td style="width:20%">' . $inner_item['name'] . $emp_code . '</td><td style="width:20%">'.$inner_item['relationship'].'</td><td>'. \DateTime::createFromFormat('Y-m-d', $inner_item['dob'])->format('d-m-Y') .'</td><td style="width:20%">₹'.format_indian_number($inner_item['basic_cover_si']).'</td><td style="width:20%">₹'.format_indian_number($inner_item['premium']).'</td><td>₹'. format_indian_number($inner_item['gst']) .'</td></tr><tr>';
$is_addon = $inner_item['is_addon'];
$table_content .= $policy_name . '</h4></div>';
$table_content .= '<table border="1" cellpadding="5" cellspacing="0" style="width:100%; border-collapse: collapse; font-size: 12px;">';
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff;">';
$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>';
if($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3){
$addtional_premium = $inner_item['rata_premimum'] + $addtional_premium;
$gst = $inner_item['gst'] + $gst;
//Only Display SI Topup and Dependent Addon
if ($is_addon == 2 || $is_addon == 3) {
$table_content .= '<th>Premium</th>';
$table_content .= '<th>GST</th>';
}
}
$table_content .= $policy_name.'</h4></div><table style="width:60%"><thead style="background-color: #02a8b5;"><tr><th style="width:20%">Name</th><th>Relation</th><th style="width:15%">Date Of Birth</th><th>Sum Insure</th><th>Premium</th><tj>GST</th></tr></thead><tbody>';
$table_content .= $temp_data;
$table_content .= '</tbody></table></div>';
if ($is_addon == 2 || $is_addon == 3) {
$addon_list_array = [
'policy_name'=>$policy_name,
'addtional_premium'=>$addtional_premium,
'gst'=>$gst
];
$Addon_list[]= $addon_list_array;
$table_content .= '</tr>';
$table_content .= '</thead>';
$table_content .= '<tbody>' . $temp_data . '</tbody>';
$table_content .= '</table></div>';
if ($is_addon == 2 || $is_addon == 3) {
$addon_list_array = [
'policy_name' => $policy_name,
'addtional_premium' => $addtional_premium,
'gst' => $gst
];
$Addon_list[] = $addon_list_array;
}
$temp_data = '';
$addtional_premium = 0;
$gst = 0;
}
$temp_data = '';
$addtional_premium = 0;
$gst = 0;
}
if(count($Addon_list) != 0 && count($Addon_list) > 0){
$table_content .='<br><div style="text-align: left;"><div style="text-align:left;"><table style="width:60%"><thead style="background-color: #e26828;"><tr><th>Policy Name</th><th> Additional Premium</th><th>GST</th><th>Total</th></tr></thead><tbody>';
$sum_tolal = 0;
if (count($Addon_list) > 0) {
$table_content .= '<br><div style="text-align: left; font-size: 12px;"><div style="text-align:left;">';
$table_content .= '<table border="1" cellpadding="5" cellspacing="0" style="width:100%; border-collapse: collapse; font-size: 12px;">';
$table_content .= '<thead style="background-color: #e26828; color: #ffffff;">';
$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 .= '</tr>';
$table_content .= '</thead>';
$table_content .= '<tbody>';
$sum_total = 0;
foreach ($Addon_list as $key => $value) {
$sum_tolal = $value['gst'] + $value['addtional_premium'] + $sum_tolal;
$table_content .= '<tr><td>'.$value['policy_name'].'</td><td>₹'.$value['addtional_premium'].'</td><td>'.$value['gst'].'</td><td>'.$value['gst'] + $value['addtional_premium'] .'</td></tr>';
$total_addon = $value['gst'] + $value['addtional_premium'];
$sum_total += $total_addon;
$table_content .= '<tr>';
$table_content .= '<td>' . $value['policy_name'] . '</td>';
$table_content .= '<td>₹' . format_indian_number($value['addtional_premium']) . '</td>';
$table_content .= '<td>₹' . format_indian_number($value['gst']) . '</td>';
$table_content .= '<td>₹' . format_indian_number($total_addon) . '</td>';
$table_content .= '</tr>';
}
$sum_total_words = numberToWords($sum_tolal);
$table_content .= '<tr><td></td><td></td><td><h4>Total</h4></td><td>'.format_indian_number($sum_tolal).'</td></tr>';
$table_content .= '</tbody></table></div></div>';
$table_content .= '<div style="width:60%;text-align:right">'. $sum_total_words .'</div>';
$sum_total_words = numberToWords($sum_total);
$table_content .= '<tr>';
$table_content .= '<td></td><td></td><td><b>Total</b></td>';
$table_content .= '<td>₹' . format_indian_number($sum_total) . '</td>';
$table_content .= '</tr>';
$table_content .= '</tbody>';
$table_content .= '</table></div></div>';
$table_content .= '<div style="width:100%; text-align:right; font-size: 12px;">' . $sum_total_words . '</div>';
}
$mail_content = str_replace("[[member_summary]]", $table_content , $mail_content);

View File

@ -59,5 +59,25 @@ class BatchFileModel extends Model
return $data;
}
public function getBatchFilesDataForDocumentSearch($policy_id, $policy_doc_name)
{
$this->select('
"Imported Insurer or TPA Files" as doc_name,
batch_files.file_name,
batch_files.client_id,
batch_files.client_policy_id,
"uploads" as file_type
')
->where('batch_files.client_policy_id', $policy_id)
->where('batch_files.is_active', 1);
if (!empty($policy_doc_name)) {
$this->like('batch_files.file_name', $policy_doc_name);
}
return $this->get()->getResultArray();
}
}

View File

@ -106,10 +106,10 @@ class EmployeeModel extends Model
public function getEmpFamilybyEmpCode(string $client_policy_id = null,string $emp_code = null,string $client_id = null,array $emp_status = [],array $policy_status = [],array $relationship = [],array $client_branch_id = [])
{
$result = $this->select(['employees.id as emp_id', 'employees.client_id','employees.client_branch_id', 'employees.relationship', 'employees.relationship_code', 'employees.change_event', 'employees.emp_code', 'employees.name', 'employees.email_personal', 'employees.email_corporate', 'employees.mobile', 'employees.gender', 'employees.dob', 'employees.doj', 'employees.basic_pay', 'employees.band', 'employees.designation', 'employees.emp_status','employees.unit','employee_polices.id as emp_policy_id', 'employee_polices.employee_id', 'employee_polices.client_policy_id', 'employee_polices.tpa_id', 'employee_polices.uhid', 'employee_polices.batch_code', 'employee_polices.status', 'employee_polices.pre_existing_alignments', 'employee_polices.basic_cover_si', 'employee_polices.date_coverage', 'employee_polices.policy_end_date', 'employee_polices.days', 'employee_polices.premium', 'employee_polices.rata_premimum', 'employee_polices.gst', 'employee_polices.date_of_exit', 'employee_polices.reason_for_exit','policies.name as policy_name','client_policy.is_addon'])
$result = $this->select(['employees.id as emp_id', 'employees.client_id','employees.client_branch_id', 'employees.relationship', 'employees.relationship_code', 'employees.change_event', 'employees.emp_code', 'employees.name', 'employees.email_personal', 'employees.email_corporate', 'employees.mobile', 'employees.gender', 'employees.dob', 'employees.doj', 'employees.basic_pay', 'employees.band', 'employees.designation', 'employees.emp_status','employees.unit','employee_polices.id as emp_policy_id', 'employee_polices.employee_id', 'employee_polices.client_policy_id', 'employee_polices.tpa_id', 'employee_polices.uhid', 'employee_polices.batch_code', 'employee_polices.status', 'employee_polices.pre_existing_alignments', 'employee_polices.basic_cover_si', 'employee_polices.date_coverage', 'employee_polices.policy_end_date', 'employee_polices.days', 'employee_polices.premium', 'employee_polices.rata_premimum', 'employee_polices.gst', 'employee_polices.date_of_exit', 'employee_polices.reason_for_exit','policy_type.long_name as policy_name','client_policy.is_addon'])
->join('employee_polices', 'employee_polices.employee_id = employees.id')
->join('client_policy', 'client_policy.id = employee_polices.client_policy_id')
->join('policies', 'policies.id = client_policy.policy_id','left')
->join('policy_type', 'policy_type.id = client_policy.policy_type_id','left')
->where('employees.is_active',1)
->when($client_policy_id, function($query) use ($client_policy_id){
return $query->where('employee_polices.client_policy_id',$client_policy_id);

View File

@ -23,4 +23,24 @@ class FileModel extends Model
];
public function getFilesDataForDocumentSearch($policy_id, $policy_doc_name)
{
$this->select('
files.action as doc_name,
files.file_name,
files.client_id,
files.policy_id as client_policy_id,
"uploads" as file_type
')
->where('files.policy_id', $policy_id)
->where('files.is_active', 1);
if (!empty($policy_doc_name)) {
$this->like('files.action', $policy_doc_name);
}
return $this->get()->getResultArray();
}
}

View File

@ -1,3 +1,142 @@
<!-- Bootstrap CSS -->
<!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css" rel="stylesheet"> -->
<!-- jQuery -->
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> -->
<!-- Bootstrap JS -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.bundle.min.js"></script> -->
<!-- Bootstrap JS (ensure this is included) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.min.js"></script>
<!-- Remove one of these -->
<style>
.carousel-control-next {
right: -18px;
}
.carousel-control-prev {
left: -24px;
}
.status-option {
padding: 0.5rem !important;
background-color: darkgrey;
}
.emp-count-view-click {
cursor: pointer;
}
.emp-status .col-6 {
padding-bottom: 0.3rem;
}
.emp-status label {
font-weight: bold;
}
.client-branch-label {
padding: 0.2rem;
border-radius: 0.2rem;
display: inline-block;
}
.scroll-container {
display: flex;
overflow-x: auto;
white-space: nowrap;
}
.scroll-item {
flex: 0 0 auto;
width: 30%; /* Adjust based on the number of items you want to show */
box-sizing: border-box;
padding: 0 10px;
}
@media (min-width: 1200px) {
.col-xl-3 {
max-width: 30% !important;
}
}
.center_text {
text-align: center;
}
.card-body {
padding: 1rem;
}
.number_css {
font-family: Roboto, sans-serif;
color: #343a40;
text-align: center;
}
.label_bottom_reduce {
margin-bottom: .0rem;
}
.search-input {
margin-bottom: 1rem;
padding: 0.5rem;
border-radius: 0.25rem;
border: 1px solid #ced4da;
width: 100%;
}
.carousel-inner {
position: relative;
overflow: hidden;
}
.carousel-item {
height: auto; /* Adjust if needed */
margin-left: 57px;
}
.card {
margin: 0 auto; /* Center card in carousel item */
}
.carousel-control-prev, .carousel-control-next {
width: 5%;
height: 100%;
}
/* .carousel-control-prev-icon, .carousel-control-next-icon {
background-color: rgba(0,0,0,0.5);
} */
.carousel-control-prev-icon {
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns%3D"http://www.w3.org/2000/svg" fill%3D"%23000000" viewBox%3D"0 0 8 8"%3E%3Cpath d%3D"M2.5 0L4 1.5 1.5 4 4 6.5 2.5 8 0 4 2.5 0z"/%3E%3C/svg%3E');
}
.carousel-control-next-icon {
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns%3D"http://www.w3.org/2000/svg" fill%3D"%23000000" viewBox%3D"0 0 8 8"%3E%3Cpath d%3D"M5.5 8L4 6.5 6.5 4 4 1.5 5.5 0l4 4-4 4z"/%3E%3C/svg%3E');
}
.show-item {
display: inline-block !important;
}
.hide-item {
display: none !important;
}
.content-page {
background-color: #e8eff5;
}
html {
background-color: #e8eff5;
}
</style>
<style>
body {
@ -62,7 +201,7 @@ body {
<span class="d-none d-sm-inline-block">Enrolment</span>
</a>
</li>
<!--
<?php if(get_role_id() == 1 || get_role_id() == 5) { ?>
<li class="nav-item">
@ -72,13 +211,13 @@ body {
</a>
</li>
<?php } ?>
<?php } ?> -->
</ul>
<div class="tab-content">
<?php include('enrollment_dash.php'); ?>
<?php include('endorsement_dash.php'); ?>
<?php include('bds_dash.php'); ?>
<!-- <?php include('bds_dash.php'); ?> -->
<?php include('enrollment_dash.php'); ?>
</div>
</div>
<!-- </div> -->

View File

@ -140,7 +140,7 @@ body{
</style>
<div class="tab-pane fade" id="bds-dash-tab" style="/*padding-left: 35px;*/padding-right: 35px;">
<div class="tab-pane fade" id="bds-dash-tab" style="padding-right: 35px;">
<div class="row">
<?php if (in_array(BUSINESS_TEAM_ID, user_team())) { ?>

View File

@ -174,13 +174,13 @@
$('#name_'+item.kyc_doc_type_id).html(item.file_name);
$('#form_'+item.kyc_doc_type_id).hide();
var url = "<?= base_url('/downloadGdriveFile'); ?>" +
"?client_id=" + item.client_id +
"&file_type=kyc" +
"&file_name=" + item.file_name +
"&client_policy_id=client_policy_id";
// var url = "<?= base_url('/downloadGdriveFile'); ?>" +
// "?client_id=" + item.client_id +
// "&file_type=kyc" +
// "&file_name=" + item.file_name +
// "&client_policy_id=client_policy_id";
// var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
// console.log('step 1')
@ -293,14 +293,14 @@
other_docs_count++;
}
var url = "<?= base_url('/downloadGdriveFile'); ?>" +
"?client_id=" + item.client_id +
"&file_type=kyc" +
"&file_name=" + item.file_name +
"&client_policy_id=client_policy_id";
// var url = "<?= base_url('/downloadGdriveFile'); ?>" +
// "?client_id=" + item.client_id +
// "&file_type=kyc" +
// "&file_name=" + item.file_name +
// "&client_policy_id=client_policy_id";
// var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
// console.log("Current item:", item);
if (item.kyc_doc_type_id == '0') {
@ -465,13 +465,13 @@
}
var url = "<?= base_url('/downloadGdriveFile'); ?>" +
"?client_id=" + item.client_id +
"&file_type=kyc" +
"&file_name=" + item.file_name +
"&client_policy_id=client_policy_id";
// var url = "<?= base_url('/downloadGdriveFile'); ?>" +
// "?client_id=" + item.client_id +
// "&file_type=kyc" +
// "&file_name=" + item.file_name +
// "&client_policy_id=client_policy_id";
// var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
if(item.kyc_doc_type_id == '0'){
@ -508,13 +508,13 @@
// console.log('step 1')
var url = "<?= base_url('/downloadGdriveFile'); ?>" +
"?client_id=" + item.client_id +
"&file_type=kyc" +
"&file_name=" + item.file_name +
"&client_policy_id=client_policy_id";
// var url = "<?= base_url('/downloadGdriveFile'); ?>" +
// "?client_id=" + item.client_id +
// "&file_type=kyc" +
// "&file_name=" + item.file_name +
// "&client_policy_id=client_policy_id";
// var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
if(item.file_name != null && item.file_name != ""){

View File

@ -99,7 +99,7 @@
</div>
<div class="table-responsive" style="overflow-x: auto;">
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
<table id="scroll-horizontal-datatable" class="table w-100">
<thead class="bg-light">
<tr>
<th>S.No</th>
@ -152,6 +152,26 @@ $(document).ready(function() {
})
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
});
} else {
console.error("Table not found.");
}
});
function showSuggestions(inputID, suggestionBoxID,hiddenInputID,suggestions) {
// console.log('showSuggestions');

View File

@ -1,143 +1,3 @@
<!-- Bootstrap CSS -->
<!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css" rel="stylesheet"> -->
<!-- jQuery -->
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> -->
<!-- Bootstrap JS -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.bundle.min.js"></script> -->
<!-- Bootstrap JS (ensure this is included) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.min.js"></script>
<!-- Remove one of these -->
<style>
.carousel-control-next {
right: -18px;
}
.carousel-control-prev {
left: -24px;
}
.status-option {
padding: 0.5rem !important;
background-color: darkgrey;
}
.emp-count-view-click {
cursor: pointer;
}
.emp-status .col-6 {
padding-bottom: 0.3rem;
}
.emp-status label {
font-weight: bold;
}
.client-branch-label {
padding: 0.2rem;
border-radius: 0.2rem;
display: inline-block;
}
.scroll-container {
display: flex;
overflow-x: auto;
white-space: nowrap;
}
.scroll-item {
flex: 0 0 auto;
width: 30%; /* Adjust based on the number of items you want to show */
box-sizing: border-box;
padding: 0 10px;
}
@media (min-width: 1200px) {
.col-xl-3 {
max-width: 30% !important;
}
}
.center_text {
text-align: center;
}
.card-body {
padding: 1rem;
}
.number_css {
font-family: Roboto, sans-serif;
color: #343a40;
text-align: center;
}
.label_bottom_reduce {
margin-bottom: .0rem;
}
.search-input {
margin-bottom: 1rem;
padding: 0.5rem;
border-radius: 0.25rem;
border: 1px solid #ced4da;
width: 100%;
}
.carousel-inner {
position: relative;
overflow: hidden;
}
.carousel-item {
height: auto; /* Adjust if needed */
margin-left: 57px;
}
.card {
margin: 0 auto; /* Center card in carousel item */
}
.carousel-control-prev, .carousel-control-next {
width: 5%;
height: 100%;
}
/* .carousel-control-prev-icon, .carousel-control-next-icon {
background-color: rgba(0,0,0,0.5);
} */
.carousel-control-prev-icon {
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns%3D"http://www.w3.org/2000/svg" fill%3D"%23000000" viewBox%3D"0 0 8 8"%3E%3Cpath d%3D"M2.5 0L4 1.5 1.5 4 4 6.5 2.5 8 0 4 2.5 0z"/%3E%3C/svg%3E');
}
.carousel-control-next-icon {
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns%3D"http://www.w3.org/2000/svg" fill%3D"%23000000" viewBox%3D"0 0 8 8"%3E%3Cpath d%3D"M5.5 8L4 6.5 6.5 4 4 1.5 5.5 0l4 4-4 4z"/%3E%3C/svg%3E');
}
.show-item {
display: inline-block !important;
}
.hide-item {
display: none !important;
}
.content-page {
background-color: #e8eff5;
}
html {
background-color: #e8eff5;
}
</style>
<div class="tab-pane fade" id="enrollment-dash-tab">
<div class="row visa_status_count_view">

View File

@ -655,7 +655,7 @@
</div>
</li>
<?php if(get_role_id() == 1 || get_role_id() == 5) { ?>
<!-- <?php if(get_role_id() == 1 || get_role_id() == 5) { ?>
<li>
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect">
@ -710,7 +710,7 @@
</div>
</li>
<?php } ?>
<?php } ?> -->
</ul>
</div>

11
writable/tmp/.gitkeep Executable file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB