Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev

This commit is contained in:
Smart 2024-10-10 15:42:07 +05:30
commit 838019814f
24 changed files with 1489 additions and 1183 deletions

2
.gitignore vendored
View File

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

View File

@ -1,6 +1,7 @@
<?php <?php
namespace App\Controllers; namespace App\Controllers;
use App\Helpers\DepositHelper; use App\Helpers\DepositHelper;
use App\Helpers\MailHelper; use App\Helpers\MailHelper;
use App\helpers\JWTToken; use App\helpers\JWTToken;
@ -41,6 +42,9 @@ use App\Models\VehicleModel;
use App\Controllers\EmpDataServiceController; use App\Controllers\EmpDataServiceController;
use App\Controllers\GoogleDriveController; use App\Controllers\GoogleDriveController;
use App\Helpers\sendMailNotification;
class ClientController extends AdminController class ClientController extends AdminController
{ {
@ -109,19 +113,74 @@ class ClientController extends AdminController
$this->policyTransactionModel = new PolicyTransactionModel(); $this->policyTransactionModel = new PolicyTransactionModel();
$this->policyTransactionStatusModel = new PolicyTransactionStatusModel(); $this->policyTransactionStatusModel = new PolicyTransactionStatusModel();
$this->vehicleModel = new VehicleModel(); $this->vehicleModel = new VehicleModel();
} }
public function Testing() //this function for only tsesting some logics not use for business logic public function Testing() //this function for only tsesting some logics not use for business logic
{ {
// $empDataServiceController = new EmpDataServiceController(); $emp_code = 'MGL-004';
// $empDataServiceController->storeEndorsementNumber(23, '00000000000000000560'); $client_id = 77;
$client_policy_id = 206;
$array_list = [];
$find = $this->employeeModel->getEmpFamilybyEmpCode(client_policy_id: $client_policy_id, emp_code: $emp_code, client_id: $client_id, emp_status: ['draft', 'enrolled'], policy_status: ['draft', 'enrolled']);
if (count($find) > 0) {
$array_list[] = $find;
}
// dd($array_list);
$notification = $this->notificationModel->where('client_id', $client_id)->where('template_name', 'member_review_and_summary_mail')->first();
// dd($notification);
if (isset($notification) && $notification['enabled'] == 1) {
$params['array_list'] = $array_list;
$params['client_policy_id'] = $client_policy_id;
$params['emp_code'] = $emp_code;
$params['client_id'] = $client_id;
$params['notification'] = $notification;
// print_r($params);die;
$wholeData = sendMailNotification::sendMailNotification('member_review_and_summary_mail', $params);
// print_r($wholeData); die;
$mail_send_return = MailHelper::send_email($wholeData[0]);
$this->myLogger->logme("info", $mail_send_return);
if (isset($wholeData[0])) {
$account_manager_wholeData = sendMailNotification::sendMailNotification('account_maneger_summary_mail', $params);
// print_r($account_manager_wholeData); die;
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);
$this->myLogger->logme("info", $mail_send_return1);
}
}
$client_hr_wholeData = sendMailNotification::sendMailNotification('client_hr_summary_mail', $params);
// print_r($client_hr_wholeData); die;
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);
}
}
}
}
return $this->respond(['status' => 'success', 'code' => 200, 'data' => []], 200);
} }
public function index() public function index()
@ -146,7 +205,6 @@ class ClientController extends AdminController
$return = $this->clientPolicyModel->updateStatus(); $return = $this->clientPolicyModel->updateStatus();
$this->myLogger->logme('error', 'Client Policy Status Update Count: {data}', ['data' => $return['client']]); $this->myLogger->logme('error', 'Client Policy Status Update Count: {data}', ['data' => $return['client']]);
$this->myLogger->logme('error', 'Employee Policy Status Update Count: {data}', ['data' => $return['emp']]); $this->myLogger->logme('error', 'Employee Policy Status Update Count: {data}', ['data' => $return['emp']]);
} }
public function updatePolicyTermsForCorrections() public function updatePolicyTermsForCorrections()
@ -218,12 +276,10 @@ class ClientController extends AdminController
$data['is_active'] = 0; $data['is_active'] = 0;
$update = $this->clientModel->update($id, $data); $update = $this->clientModel->update($id, $data);
return $this->respond(['status' => true, 'code' => 200], 200); return $this->respond(['status' => true, 'code' => 200], 200);
} else { } else {
return $this->respond(['status' => false, 'code' => 404, 'message' => 'The Client has active policy'], 200); return $this->respond(['status' => false, 'code' => 404, 'message' => 'The Client has active policy'], 200);
} }
} }
public function removeClientBranch($id = null) public function removeClientBranch($id = null)
@ -277,7 +333,6 @@ class ClientController extends AdminController
echo view('layout/header', $headerData); echo view('layout/header', $headerData);
echo view('client_onboarding', $data); echo view('client_onboarding', $data);
echo view('layout/footer'); echo view('layout/footer');
} }
// In your controller // In your controller
@ -418,7 +473,6 @@ class ClientController extends AdminController
echo view('layout/header', $headerData); echo view('layout/header', $headerData);
echo view('client_onboarding', $editData); echo view('client_onboarding', $editData);
echo view('layout/footer'); echo view('layout/footer');
} }
public function createClientGeneralInfo() public function createClientGeneralInfo()
@ -443,10 +497,8 @@ class ClientController extends AdminController
if ($insert) { if ($insert) {
$client_data = $this->clientModel->where(['id' => $insert, 'is_active' => 1])->first(); $client_data = $this->clientModel->where(['id' => $insert, 'is_active' => 1])->first();
return $this->respond(['status' => true, 'code' => 200, 'data' => $client_data], 200); return $this->respond(['status' => true, 'code' => 200, 'data' => $client_data], 200);
} else { } else {
return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200); return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200);
} }
} }
@ -495,10 +547,9 @@ class ClientController extends AdminController
if (!empty($File)) { if (!empty($File)) {
$data['file_name'] = $File; $data['file_name'] = $File;
$uploadFilePath = $uploadFilePath . '/' .$File; // $uploadFilePath = $uploadFilePath . '/' . $File;
$GoogleDriveController = new GoogleDriveController(); // $GoogleDriveController = new GoogleDriveController();
$GoogleDriveController->uploadFiletoGdrive(client_id: $data['client_id'], doc_type: 'KYC', file_path: $uploadFilePath, file_name: $data['file_name']); // $GoogleDriveController->uploadFiletoGdrive(client_id: $data['client_id'], doc_type: 'KYC', file_path: $uploadFilePath, file_name: $data['file_name']);
} }
$data['created_by'] = get_session_userid(); $data['created_by'] = get_session_userid();
@ -531,7 +582,6 @@ class ClientController extends AdminController
return $this->respond(['status' => true, 'code' => 200, 'data' => $kycDocs], 200); return $this->respond(['status' => true, 'code' => 200, 'data' => $kycDocs], 200);
} else { } else {
return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200); return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200);
} }
} }
@ -892,7 +942,6 @@ class ClientController extends AdminController
$data['open_date'] = change_date_format($this->request->getPost('open_date'), 'd-m-Y', 'Y-m-d'); $data['open_date'] = change_date_format($this->request->getPost('open_date'), 'd-m-Y', 'Y-m-d');
$data['close_date'] = change_date_format($this->request->getPost('close_date'), 'd-m-Y', 'Y-m-d'); $data['close_date'] = change_date_format($this->request->getPost('close_date'), 'd-m-Y', 'Y-m-d');
$data['reminder_date'] = change_date_format($this->request->getPost('reminder_date'), 'd-m-Y', 'Y-m-d'); $data['reminder_date'] = change_date_format($this->request->getPost('reminder_date'), 'd-m-Y', 'Y-m-d');
} else { } else {
$data['open_date'] = null; $data['open_date'] = null;
$data['closedate'] = null; $data['closedate'] = null;
@ -1108,13 +1157,10 @@ class ClientController extends AdminController
} else { } else {
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to remove policy'], 200); return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to remove policy'], 200);
} }
} else { } else {
return $this->respond(['status' => false, 'code' => 404, 'message' => 'The policy has active employees'], 200); return $this->respond(['status' => false, 'code' => 404, 'message' => 'The policy has active employees'], 200);
} }
} }
public function createClientPolicyPremium() public function createClientPolicyPremium()
@ -1214,7 +1260,6 @@ class ClientController extends AdminController
$policyPremium = $this->policyPremium1Model->insert($data); $policyPremium = $this->policyPremium1Model->insert($data);
} }
} else if ($si_or_bp == '3') { } else if ($si_or_bp == '3') {
$premium = str_replace(',', '', $this->request->getPost('gpa_sum_premium2[]')); $premium = str_replace(',', '', $this->request->getPost('gpa_sum_premium2[]'));
@ -1238,7 +1283,6 @@ class ClientController extends AdminController
$policyPremium = $this->policyPremium1Model->insert($data); $policyPremium = $this->policyPremium1Model->insert($data);
} }
} else if ($si_or_bp == '2') { } else if ($si_or_bp == '2') {
$premium = str_replace(',', '', $this->request->getPost('gpa_basic_premium[]')); $premium = str_replace(',', '', $this->request->getPost('gpa_basic_premium[]'));
@ -1263,7 +1307,6 @@ class ClientController extends AdminController
$policyPremium = $this->policyPremium1Model->insert($data); $policyPremium = $this->policyPremium1Model->insert($data);
} }
} else { } else {
$data['premium'] = str_replace(',', '', $this->request->getPost('gpa_basic_premium')); $data['premium'] = str_replace(',', '', $this->request->getPost('gpa_basic_premium'));
@ -1278,7 +1321,6 @@ class ClientController extends AdminController
$data = $this->request->getPost(); $data = $this->request->getPost();
$insert = true; $insert = true;
} else if ($policy_grid_id == '2') { } else if ($policy_grid_id == '2') {
$premium = $this->request->getPost('gpa_premium29[]'); $premium = $this->request->getPost('gpa_premium29[]');
@ -1298,7 +1340,6 @@ class ClientController extends AdminController
$data = $this->request->getPost(); $data = $this->request->getPost();
$insert = true; $insert = true;
} else if ($policy_grid_id == '3') { } else if ($policy_grid_id == '3') {
$premium = $this->request->getPost('3_premium[]'); $premium = $this->request->getPost('3_premium[]');
@ -1317,7 +1358,6 @@ class ClientController extends AdminController
} }
$data = $this->request->getPost(); $data = $this->request->getPost();
$insert = true; $insert = true;
} else if ($policy_grid_id == '4') { } else if ($policy_grid_id == '4') {
$premium = $this->request->getPost('4_premium[]'); $premium = $this->request->getPost('4_premium[]');
@ -1341,8 +1381,6 @@ class ClientController extends AdminController
} }
$data = $this->request->getPost(); $data = $this->request->getPost();
$insert = true; $insert = true;
} else if ($policy_grid_id == '5') { } else if ($policy_grid_id == '5') {
$premium = $this->request->getPost('5_premium[]'); $premium = $this->request->getPost('5_premium[]');
@ -1367,7 +1405,6 @@ class ClientController extends AdminController
$data = $this->request->getPost(); $data = $this->request->getPost();
$insert = true; $insert = true;
} else if ($policy_grid_id == '6') { } else if ($policy_grid_id == '6') {
$premium = $this->request->getPost('6_premium[]'); $premium = $this->request->getPost('6_premium[]');
@ -1391,8 +1428,6 @@ class ClientController extends AdminController
} }
$data = $this->request->getPost(); $data = $this->request->getPost();
$insert = true; $insert = true;
} else if ($policy_grid_id == '7') { } else if ($policy_grid_id == '7') {
$premium = $this->request->getPost('7_premium[]'); $premium = $this->request->getPost('7_premium[]');
$sum_insure = $this->request->getPost('7_si[]'); $sum_insure = $this->request->getPost('7_si[]');
@ -1454,7 +1489,6 @@ class ClientController extends AdminController
$data = $this->request->getPost(); $data = $this->request->getPost();
$insert = true; $insert = true;
} else if ($policy_grid_id == '10') { } else if ($policy_grid_id == '10') {
$premium = $this->request->getPost('10_premium[]'); $premium = $this->request->getPost('10_premium[]');
$sum_insure = $this->request->getPost('10_si[]'); $sum_insure = $this->request->getPost('10_si[]');
@ -1554,7 +1588,6 @@ class ClientController extends AdminController
} else { } else {
return $this->respond(['status' => false, 'code' => 404, 'data' => $data, 'message' => 'no data found'], 200); return $this->respond(['status' => false, 'code' => 404, 'data' => $data, 'message' => 'no data found'], 200);
} }
} catch (\Exception $e) { } catch (\Exception $e) {
echo 'Error: ' . $e->getMessage() . ' at line no ' . $e->getLine(); echo 'Error: ' . $e->getMessage() . ' at line no ' . $e->getLine();
} }
@ -1621,19 +1654,11 @@ class ClientController extends AdminController
} }
public function editUploadVehicleFile() public function editUploadVehicleFile() {}
{
} public function listVehicleFiles() {}
public function listVehicleFiles() public function deleteVehicleFiles() {}
{
}
public function deleteVehicleFiles(){
}
@ -1678,7 +1703,6 @@ class ClientController extends AdminController
} else { } else {
return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200); return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200);
} }
} }
public function getClientPolicyById($id = null) public function getClientPolicyById($id = null)
@ -1710,7 +1734,6 @@ class ClientController extends AdminController
} else { } else {
return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200); return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200);
} }
} }
public function getpolicyGridData() public function getpolicyGridData()
@ -1777,8 +1800,6 @@ class ClientController extends AdminController
foreach ($rackRateJson as $value) { foreach ($rackRateJson as $value) {
$jsonArray[$value['rack_rate_name']] = json_decode($value['additional_relationship']); $jsonArray[$value['rack_rate_name']] = json_decode($value['additional_relationship']);
} }
} else { } else {
$premiumData = ""; $premiumData = "";
@ -1868,7 +1889,6 @@ class ClientController extends AdminController
'branch_units' => $branch_units, 'branch_units' => $branch_units,
'jsonArray' => $jsonArray, 'jsonArray' => $jsonArray,
], 200); ], 200);
} else if ($search_term === 'GPA' || $policy_type_id == 6 || $policy_type_id == 7) { } else if ($search_term === 'GPA' || $policy_type_id == 6 || $policy_type_id == 7) {
return $this->respond([ return $this->respond([
@ -2103,7 +2123,6 @@ class ClientController extends AdminController
// Log the error // Log the error
log_message('error', 'Failed to insert data: ' . $e->getMessage()); log_message('error', 'Failed to insert data: ' . $e->getMessage());
} }
} }
public function getterms() public function getterms()
@ -2125,17 +2144,19 @@ class ClientController extends AdminController
if ($record) { if ($record) {
return $this->respond([ return $this->respond(
[
'Status' => true, 'Status' => true,
'code' => 200, 'code' => 200,
'data' => $record['policy_terms'], 'data' => $record['policy_terms'],
'policy_addon' => $record['is_addon'], 'policy_addon' => $record['is_addon'],
'emp_count_by_policy'=>$emp_count_by_policy], 'emp_count_by_policy' => $emp_count_by_policy
200); ],
200
);
} else { } else {
return $this->respond(['Status' => false, 'code' => 200, 'message' => 'Record not found.'], 200); return $this->respond(['Status' => false, 'code' => 200, 'message' => 'Record not found.'], 200);
} }
} }
public function policyGPATerms() public function policyGPATerms()
@ -2227,10 +2248,10 @@ class ClientController extends AdminController
echo "Failed to insert data: " . $e->getMessage(); echo "Failed to insert data: " . $e->getMessage();
log_message('error', 'Failed to insert data: ' . $e->getMessage()); log_message('error', 'Failed to insert data: ' . $e->getMessage());
} }
} }
public function getPolicyGPATerms(){ public function getPolicyGPATerms()
{
$client_id = $this->request->getVar('client_id'); $client_id = $this->request->getVar('client_id');
$policy_id = $this->request->getVar('policy_id'); $policy_id = $this->request->getVar('policy_id');
@ -2238,11 +2259,9 @@ class ClientController extends AdminController
if ($record) { if ($record) {
echo $record['policy_terms']; echo $record['policy_terms'];
} else { } else {
echo "Record not found."; echo "Record not found.";
} }
} }
public function updateClientPolicyStatus() public function updateClientPolicyStatus()
@ -2336,7 +2355,6 @@ class ClientController extends AdminController
} else { } else {
return $this->respond(['Status' => false, 'code' => 200, 'message' => 'Record not found.'], 200); return $this->respond(['Status' => false, 'code' => 200, 'message' => 'Record not found.'], 200);
} }
} }
public function fetchPolicyDataForPolicyType($client_policy_id) public function fetchPolicyDataForPolicyType($client_policy_id)
@ -2362,15 +2380,12 @@ class ClientController extends AdminController
->join('policy_type', 'policy_type.id = policies.policy_type_id') ->join('policy_type', 'policy_type.id = policies.policy_type_id')
->whereIn('policy_type.policy_type', ['GMC - Parents', 'GMC - Top-up(Parents)']) ->whereIn('policy_type.policy_type', ['GMC - Parents', 'GMC - Top-up(Parents)'])
->where(['policies.insurer_id' => $insurer_id, 'policies.is_active' => 1])->findAll(); ->where(['policies.insurer_id' => $insurer_id, 'policies.is_active' => 1])->findAll();
} }
$data = $this->clientPolicyModel->getClientPolicyByPolicyType($client_id['client_id'], $policy_type); $data = $this->clientPolicyModel->getClientPolicyByPolicyType($client_id['client_id'], $policy_type);
return $this->respond(['Status' => true, 'code' => 200, 'data' => $data, 'client_policy_id' => $client_policy_id, 'policy' => $polices], 200); return $this->respond(['Status' => true, 'code' => 200, 'data' => $data, 'client_policy_id' => $client_policy_id, 'policy' => $polices], 200);
} }
public function downloadKYCDocument($file_name) public function downloadKYCDocument($file_name)
@ -2602,7 +2617,6 @@ class ClientController extends AdminController
$html = view('client_info', $data); $html = view('client_info', $data);
return $this->respond(['status' => true, 'code' => 200, 'data' => $html], 200); return $this->respond(['status' => true, 'code' => 200, 'data' => $html], 200);
} }
public function transformArray($data, $mapping) public function transformArray($data, $mapping)
@ -2627,7 +2641,6 @@ class ClientController extends AdminController
$transformedData[$value] = $data['special_condition_input'][$key]; $transformedData[$value] = $data['special_condition_input'][$key];
} }
} }
} else if ($key == 'gpa_special_condition_label') { } else if ($key == 'gpa_special_condition_label') {
if (is_array($value)) { if (is_array($value)) {
foreach ($value as $key => $value) { foreach ($value as $key => $value) {
@ -2714,7 +2727,6 @@ class ClientController extends AdminController
log_message('error', $e->getMessage()); log_message('error', $e->getMessage());
return $this->respond(['status' => false, 'code' => 200, 'message' => 'Failed to update the record.'], 200); return $this->respond(['status' => false, 'code' => 200, 'message' => 'Failed to update the record.'], 200);
} }
return $this->respond(['status' => true, 'code' => 200, 'message' => 'Additionaly Rack Rate Data Remove Successfully'], 200); return $this->respond(['status' => true, 'code' => 200, 'message' => 'Additionaly Rack Rate Data Remove Successfully'], 200);
@ -2734,7 +2746,6 @@ class ClientController extends AdminController
} else { } else {
return $this->respond(['status' => false, 'code' => 404, 'insurer_id' => $insurer_id, 'client_id' => $client_id], 200); return $this->respond(['status' => false, 'code' => 404, 'insurer_id' => $insurer_id, 'client_id' => $client_id], 200);
} }
} }
public function otherPolicyTermsFormSubmit() public function otherPolicyTermsFormSubmit()
@ -2775,7 +2786,6 @@ class ClientController extends AdminController
} else { } else {
return $this->respond(['status' => false, 'code' => 200, 'client_id' => $client_id, 'client_branch_id' => $client_branch_id, 'policy_type_id' => $policy_type_id], 200); return $this->respond(['status' => false, 'code' => 200, 'client_id' => $client_id, 'client_branch_id' => $client_branch_id, 'policy_type_id' => $policy_type_id], 200);
} }
} }
public function getPolicyTerms($client_policy_id) public function getPolicyTerms($client_policy_id)
@ -2791,7 +2801,6 @@ class ClientController extends AdminController
if (!isset($policy_terms['policy_terms'])) { if (!isset($policy_terms['policy_terms'])) {
// return $this->respond(['status' => false, 'error' => 'Policy terms not found in array'], 500); // return $this->respond(['status' => false, 'error' => 'Policy terms not found in array'], 500);
return []; return [];
} }
$JSON = json_decode($policy_terms['policy_terms']); $JSON = json_decode($policy_terms['policy_terms']);
} elseif (is_object($policy_terms)) { } elseif (is_object($policy_terms)) {
@ -2880,7 +2889,6 @@ class ClientController extends AdminController
$result = $this->clientPolicyModel->getPolicyTypeForPolicyBinding($client_id); $result = $this->clientPolicyModel->getPolicyTypeForPolicyBinding($client_id);
return $this->respond(['status' => true, 'data' => $result], 200); return $this->respond(['status' => true, 'data' => $result], 200);
} }
public function getClientDetails($client_id) public function getClientDetails($client_id)
@ -2899,7 +2907,6 @@ class ClientController extends AdminController
} else { } else {
return []; return [];
} }
} }
public function updateRackRateJson() public function updateRackRateJson()
@ -2929,14 +2936,12 @@ class ClientController extends AdminController
$json = []; $json = [];
$json1 = []; $json1 = [];
foreach ($results as $key => $result) foreach ($results as $key => $result) {
{
$client_policy_id = $result['client_policy_id']; $client_policy_id = $result['client_policy_id'];
$client_policy_data = $this->clientPolicyModel->where('id', $client_policy_id)->first(); $client_policy_data = $this->clientPolicyModel->where('id', $client_policy_id)->first();
$policy_terms = []; $policy_terms = [];
if(isset($client_policy_data['policy_terms'])) if (isset($client_policy_data['policy_terms'])) {
{
$policy_terms = json_decode($client_policy_data['policy_terms'], true); $policy_terms = json_decode($client_policy_data['policy_terms'], true);
} }
@ -2995,8 +3000,7 @@ class ClientController extends AdminController
} }
} }
foreach ($results2 as $key => $result) foreach ($results2 as $key => $result) {
{
$client_policy_id = $result['client_policy_id']; $client_policy_id = $result['client_policy_id'];
$client_policy_data = $this->clientPolicyModel->where('id', $client_policy_id)->first(); $client_policy_data = $this->clientPolicyModel->where('id', $client_policy_id)->first();
@ -3043,7 +3047,6 @@ class ClientController extends AdminController
} else { } else {
echo 'There is no records to be update.'; echo 'There is no records to be update.';
} }
} }
public function removeRackRate($rack_rate_name = null, $client_policy_id = null) public function removeRackRate($rack_rate_name = null, $client_policy_id = null)
@ -3076,7 +3079,6 @@ class ClientController extends AdminController
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Rack Rate not available', 'rr_count' => $rackRateData], 200); return $this->respond(['status' => false, 'code' => 404, 'message' => 'Rack Rate not available', 'rr_count' => $rackRateData], 200);
} }
} }
public function renameRackRateTab($rack_rate_name = null, $new_rack_rate_name = null, $client_policy_id = null) public function renameRackRateTab($rack_rate_name = null, $new_rack_rate_name = null, $client_policy_id = null)
@ -3119,8 +3121,7 @@ class ClientController extends AdminController
{ {
$branch_list = $this->clientBranchModel->where('client_id', $client_id)->where('is_active', 1)->findAll(); $branch_list = $this->clientBranchModel->where('client_id', $client_id)->where('is_active', 1)->findAll();
$policy_list = []; $policy_list = [];
foreach ($branch_list as $value) foreach ($branch_list as $value) {
{
$policy_data = $this->clientPolicyModel $policy_data = $this->clientPolicyModel
->select('client_policy.*, policy_type.policy_type') ->select('client_policy.*, policy_type.policy_type')
->join('policy_type', 'policy_type.id = client_policy.policy_type_id') ->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
@ -3302,7 +3303,6 @@ class ClientController extends AdminController
} else { } else {
return $this->respond(['status' => false, 'message' => 'Failed to update vehicle details'], 200); return $this->respond(['status' => false, 'message' => 'Failed to update vehicle details'], 200);
} }
} else { } else {
$vehicle_insert = $this->vehicleModel->insert($data); $vehicle_insert = $this->vehicleModel->insert($data);
@ -3317,7 +3317,8 @@ class ClientController extends AdminController
'owner_type' => $data['Owner_type'], 'owner_type' => $data['Owner_type'],
'vehicles' => $vehicles, 'vehicles' => $vehicles,
'message' => 'Vehicle created successfully 'message' => 'Vehicle created successfully
'], 200); '
], 200);
} else { } else {
return $this->respond(['status' => false, 'message' => 'Failed to created vehicle'], 200); return $this->respond(['status' => false, 'message' => 'Failed to created vehicle'], 200);
} }
@ -3435,5 +3436,4 @@ class ClientController extends AdminController
return $this->respond(['status' => false, 'message' => 'No Data Found', 'code' => 404], 200); return $this->respond(['status' => false, 'message' => 'No Data Found', 'code' => 404], 200);
} }
} }
} }

View File

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

View File

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

View File

@ -1891,6 +1891,8 @@ class EmployeeRestController extends AdminController
$mail_send_return1 = MailHelper::send_email($value); $mail_send_return1 = MailHelper::send_email($value);
$this->myLogger->logme("info", $mail_send_return1); $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); $client_hr_wholeData =sendMailNotification::sendMailNotification('client_hr_summary_mail', $params);
@ -1901,8 +1903,12 @@ class EmployeeRestController extends AdminController
$mail_send_return2 = MailHelper::send_email($value); $mail_send_return2 = MailHelper::send_email($value);
$this->myLogger->logme("info", $mail_send_return2); $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 'fields' => 'id' // Specify fields to return
]); ]);
if($createdFile->id) if($createdFile->id && $doc_type !== 'UPLOADS')
{ {
unlink($file_path); unlink($file_path);
} }

View File

@ -29,6 +29,8 @@ use App\Models\UserModel;
use App\Models\EmployeePolicyModel; use App\Models\EmployeePolicyModel;
use App\Models\InsurerStatements; use App\Models\InsurerStatements;
use App\Models\InvPaymentDetailsModel; use App\Models\InvPaymentDetailsModel;
use App\Models\BatchFileModel;
use App\Models\FileModel;
use Kint; use Kint;
class PolicyTransactionController extends BaseController class PolicyTransactionController extends BaseController
@ -58,6 +60,8 @@ class PolicyTransactionController extends BaseController
protected $insurerStatements; protected $insurerStatements;
protected $invoiceStatus; protected $invoiceStatus;
protected $invPaymentDetailsModel; protected $invPaymentDetailsModel;
protected $batchFileModel;
protected $filesModel;
public function __construct() public function __construct()
{ {
@ -85,6 +89,8 @@ class PolicyTransactionController extends BaseController
$this->employeePolicyModel = new EmployeePolicyModel(); $this->employeePolicyModel = new EmployeePolicyModel();
$this->insurerStatements = new InsurerStatements(); $this->insurerStatements = new InsurerStatements();
$this->invPaymentDetailsModel = new InvPaymentDetailsModel(); $this->invPaymentDetailsModel = new InvPaymentDetailsModel();
$this->batchFileModel = new BatchFileModel();
$this->filesModel = new FileModel();
$this->invoiceStatus = [ $this->invoiceStatus = [
'pending' => 'Pending', 'pending' => 'Pending',
'generated' => 'Generated', 'generated' => 'Generated',
@ -1498,6 +1504,8 @@ class PolicyTransactionController extends BaseController
->findAll(); ->findAll();
// dd( $this->insurerStatements->getLastQuery()); // dd( $this->insurerStatements->getLastQuery());
$data['page_name'] = 'Statement Upload';
$this->loadLayout('insurer_statement_list', $data); $this->loadLayout('insurer_statement_list', $data);
} }
@ -1969,12 +1977,17 @@ class PolicyTransactionController extends BaseController
$policy_doc_name = $this->request->getPost('policy_doc_name'); $policy_doc_name = $this->request->getPost('policy_doc_name');
$pt_files = []; $pt_files = [];
$kyc_files = []; $kyc_files = [];
$batch_files = [];
$files = [];
// print_r($jsonData);die(); // print_r($jsonData);die();
if($policy_id != "") if($policy_id != "")
{ {
//get policy docs from policy transation related tables //get policy docs from policy transation related tables
$pt_files = $this->PTFileModel->getPolicyDriveFilesIndex($policy_id,$policy_doc_name); $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); // ~dd($pt_files);
} }
if($customer_id != "") if($customer_id != "")
@ -1984,10 +1997,11 @@ class PolicyTransactionController extends BaseController
// !dd($kyc_files); // !dd($kyc_files);
} }
$data['files'] = array_merge($pt_files,$kyc_files); $data['files'] = array_merge($pt_files,$kyc_files,$batch_files,$files);
// dd($data['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['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") $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")
@ -1999,5 +2013,4 @@ class PolicyTransactionController extends BaseController
} }
} }

View File

@ -160,7 +160,10 @@ class sendMailNotification
$client_data =$clientModel->where('id', $client_id)->first(); $client_data =$clientModel->where('id', $client_id)->first();
$notification_data = $notificationModel->where('client_id' ,$client_id)->where('template_name', $action)->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) { if (isset($notification_data) && $notification_data['enabled'] == 1) {
$mail_content = $notification_data['mail_content']; $mail_content = $notification_data['mail_content'];
$subject = $notification_data['subject']; $subject = $notification_data['subject'];
$app_link = $_ENV['App_Url']; $app_link = $_ENV['App_Url'];
@ -183,20 +186,37 @@ class sendMailNotification
$Addon_list = []; $Addon_list = [];
$name = ''; $name = '';
$emp_code = ''; $emp_code = '';
foreach ($array_list as $item) { foreach ($array_list as $item) {
if (count($item) != 0) { if (count($item) != 0) {
$table_content .= '<div style="text-align: left;"><div style="text-align:left;"><h4>Policy Name : '; $table_content .= '<div style="text-align: left; font-size: 12px;"><div style="text-align:left;"><h4>Policy Name : ';
$temp_data = ''; $temp_data = '';
$policy_name = ''; $policy_name = '';
$is_addon = ''; $is_addon = '';
foreach ($item as $inner_item) { foreach ($item as $inner_item) {
$policy_name = $inner_item['policy_name']; $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'){ if ($inner_item['relationship'] == 'Self') {
$mail = $inner_item['email_corporate']; $emp_code = ' (' . $inner_item['emp_code'] . ')';
$name = $inner_item['name']; } else {
$emp_code = $inner_item['emp_code']; $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(round($inner_item['premium'])) . '</td>';
$temp_data .= '<td>₹' . format_indian_number(round($inner_item['gst'])) . '</td>';
}
$temp_data .= '</tr>';
$is_addon = $inner_item['is_addon']; $is_addon = $inner_item['is_addon'];
if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) { if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) {
@ -204,42 +224,94 @@ class sendMailNotification
$gst = $inner_item['gst'] + $gst; $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 .= $policy_name . '</h4></div>';
$table_content .= $temp_data; $table_content .= '<table border="1" cellpadding="5" cellspacing="0" style="width:100%; border-collapse: collapse; font-size: 12px;">';
$table_content .= '</tbody></table></div>';
// Add text-align: center to the table head
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
$table_content .= '<tr>';
$table_content .= '<th>Name</th>';
$table_content .= '<th>Relation</th>';
$table_content .= '<th style="width:15%">Date Of Birth</th>';
$table_content .= '<th>Sum Insured</th>';
// 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>';
// Add text-align: center to the table body
$table_content .= '<tbody style="text-align: center;">' . $temp_data . '</tbody>';
$table_content .= '</table></div>';
if ($is_addon == 2 || $is_addon == 3) { if ($is_addon == 2 || $is_addon == 3) {
$addon_list_array = [ $addon_list_array = [
'policy_name' => $policy_name, 'policy_name' => $policy_name,
'addtional_premium'=>$addtional_premium, 'addtional_premium' => round($addtional_premium),
'gst'=>$gst 'gst' => round($gst)
]; ];
$Addon_list[] = $addon_list_array; $Addon_list[] = $addon_list_array;
} }
$temp_data = ''; $temp_data = '';
$addtional_premium = 0; $addtional_premium = 0;
$gst = 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) {
$sum_tolal = 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;">';
// Center align for table header and body
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
$table_content .= '<tr>';
$table_content .= '<th>Policy Name</th>';
$table_content .= '<th>Additional Premium</th>';
$table_content .= '<th>GST</th>';
$table_content .= '<th>Total</th>';
$table_content .= '</tr>';
$table_content .= '</thead>';
$table_content .= '<tbody style="text-align: center;">';
$sum_total = 0;
foreach ($Addon_list as $key => $value) { foreach ($Addon_list as $key => $value) {
$sum_tolal = $value['gst'] + $value['addtional_premium'] + $sum_tolal; $total_addon = $value['gst'] + $value['addtional_premium'];
$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>'; $sum_total += $total_addon;
}
$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>';
$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_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>';
}
// print_r($table_content); die;
$mail_content = str_replace("[[member_name]]", $name . ' (' . $emp_code . ')' , $mail_content); $mail_content = str_replace("[[member_name]]", $name . ' (' . $emp_code . ')' , $mail_content);
$mail_content = str_replace("[[member_summary]]", $table_content , $mail_content); $mail_content = str_replace("[[member_summary]]", $table_content , $mail_content);
// print_r($mail_content); die;
// $mail = "aadhavanvalli@gmail.com"; // $mail = "aadhavanvalli@gmail.com";
// if (isset($mail) && !empty($mail)) { // if (isset($mail) && !empty($mail)) {
$wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']]; $wholeData[] = ['mail' => $mail, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];
@ -248,6 +320,7 @@ class sendMailNotification
return $wholeData; return $wholeData;
} }
} else if($action == 'account_maneger_summary_mail'){ } else if($action == 'account_maneger_summary_mail'){
$client_id = $params['client_id']; $client_id = $params['client_id'];
@ -260,6 +333,7 @@ class sendMailNotification
$notification_data = $notificationModel->where('client_id' ,$client_id)->where('template_name', $action)->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(); $client_rm_data= $clientRMModel->where('client_id', $client_id)->where('is_active',1)->findAll();
$user_list= []; $user_list= [];
foreach ($client_rm_data as $key => $value) { foreach ($client_rm_data as $key => $value) {
@ -270,8 +344,6 @@ class sendMailNotification
} }
} }
$mail_content = $notification_data['mail_content']; $mail_content = $notification_data['mail_content'];
$subject = $notification_data['subject']; $subject = $notification_data['subject'];
$app_link = $_ENV['App_Url']; $app_link = $_ENV['App_Url'];
@ -293,64 +365,124 @@ class sendMailNotification
$gst = 0; $gst = 0;
$array_list = $params['array_list']; $array_list = $params['array_list'];
$Addon_list = []; $Addon_list = [];
foreach ($array_list as $item) { foreach ($array_list as $item) {
if (count($item) != 0) { if (count($item) != 0) {
$table_content .= '<div style="text-align: left;"><div style="text-align:left;"><h4>Policy Name : '; $table_content .= '<div style="text-align: left; font-size: 12px;"><div style="text-align:left;"><h4>Policy Name : ';
$temp_data = ''; $temp_data = '';
$policy_name = ''; $policy_name = '';
$is_addon = ''; $is_addon = '';
foreach ($item as $inner_item) { foreach ($item as $inner_item) {
$policy_name = $inner_item['policy_name']; $policy_name = $inner_item['policy_name'];
if ($inner_item['relationship'] == 'Self') { if ($inner_item['relationship'] == 'Self') {
$emp_code = ' (' . $inner_item['emp_code'] . ')'; $emp_code = ' (' . $inner_item['emp_code'] . ')';
} else { } else {
$emp_code = ''; $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>';
$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(round($inner_item['premium'])) . '</td>';
$temp_data .= '<td>₹' . format_indian_number(round($inner_item['gst'])) . '</td>';
}
$temp_data .= '</tr>';
$is_addon = $inner_item['is_addon']; $is_addon = $inner_item['is_addon'];
if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) { if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) {
$addtional_premium = $inner_item['rata_premimum'] + $addtional_premium; $addtional_premium = $inner_item['rata_premimum'] + $addtional_premium;
$gst = $inner_item['gst'] + $gst; $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 .= $policy_name . '</h4></div>';
$table_content .= '</tbody></table></div>'; $table_content .= '<table border="1" cellpadding="5" cellspacing="0" style="width:100%; border-collapse: collapse; font-size: 12px;">';
// Add text-align: center to the table head
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
$table_content .= '<tr>';
$table_content .= '<th>Name</th>';
$table_content .= '<th>Relation</th>';
$table_content .= '<th style="width:15%">Date Of Birth</th>';
$table_content .= '<th>Sum Insured</th>';
// 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>';
// Add text-align: center to the table body
$table_content .= '<tbody style="text-align: center;">' . $temp_data . '</tbody>';
$table_content .= '</table></div>';
if ($is_addon == 2 || $is_addon == 3) { if ($is_addon == 2 || $is_addon == 3) {
$addon_list_array = [ $addon_list_array = [
'policy_name' => $policy_name, 'policy_name' => $policy_name,
'addtional_premium'=>$addtional_premium, 'addtional_premium' => round($addtional_premium),
'gst'=>$gst 'gst' => round($gst)
]; ];
$Addon_list[] = $addon_list_array; $Addon_list[] = $addon_list_array;
} }
$temp_data = ''; $temp_data = '';
$addtional_premium = 0; $addtional_premium = 0;
$gst = 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) {
$sum_tolal = 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;">';
// Center align for table header and body
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
$table_content .= '<tr>';
$table_content .= '<th>Policy Name</th>';
$table_content .= '<th>Additional Premium</th>';
$table_content .= '<th>GST</th>';
$table_content .= '<th>Total</th>';
$table_content .= '</tr>';
$table_content .= '</thead>';
$table_content .= '<tbody style="text-align: center;">';
$sum_total = 0;
foreach ($Addon_list as $key => $value) { foreach ($Addon_list as $key => $value) {
$sum_tolal = $value['gst'] + $value['addtional_premium'] + $sum_tolal; $total_addon = $value['gst'] + $value['addtional_premium'];
$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>'; $sum_total += $total_addon;
}
$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>';
$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_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); $mail_content = str_replace("[[member_summary]]", $table_content , $mail_content);
$account_manager_mail_list = []; $account_manager_mail_list = [];
@ -412,16 +544,35 @@ class sendMailNotification
$Addon_list = []; $Addon_list = [];
foreach ($array_list as $item) { foreach ($array_list as $item) {
$table_content .= '<div style="text-align: left;"><div style="text-align:left;"><h4>Policy Name : '; if (count($item) != 0) {
$table_content .= '<div style="text-align: left; font-size: 12px;"><div style="text-align:left;"><h4>Policy Name : ';
$temp_data = ''; $temp_data = '';
$policy_name = '';
$is_addon = '';
foreach ($item as $inner_item) { foreach ($item as $inner_item) {
$policy_name = $inner_item['policy_name']; $policy_name = $inner_item['policy_name'];
if ($inner_item['relationship'] == 'Self') { if ($inner_item['relationship'] == 'Self') {
$emp_code = ' (' . $inner_item['emp_code'] . ')'; $emp_code = ' (' . $inner_item['emp_code'] . ')';
} else { } else {
$emp_code = ''; $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>';
$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(round($inner_item['premium'])) . '</td>';
$temp_data .= '<td>₹' . format_indian_number(round($inner_item['gst'])) . '</td>';
}
$temp_data .= '</tr>';
$is_addon = $inner_item['is_addon']; $is_addon = $inner_item['is_addon'];
if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) { if ($inner_item['is_addon'] == 2 || $inner_item['is_addon'] == 3) {
@ -429,38 +580,85 @@ class sendMailNotification
$gst = $inner_item['gst'] + $gst; $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 .= $policy_name . '</h4></div>';
$table_content .= '</tbody></table></div>'; $table_content .= '<table border="1" cellpadding="5" cellspacing="0" style="width:100%; border-collapse: collapse; font-size: 12px;">';
// Add text-align: center to the table head
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
$table_content .= '<tr>';
$table_content .= '<th>Name</th>';
$table_content .= '<th>Relation</th>';
$table_content .= '<th style="width:15%">Date Of Birth</th>';
$table_content .= '<th>Sum Insured</th>';
// 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>';
// Add text-align: center to the table body
$table_content .= '<tbody style="text-align: center;">' . $temp_data . '</tbody>';
$table_content .= '</table></div>';
if ($is_addon == 2 || $is_addon == 3) { if ($is_addon == 2 || $is_addon == 3) {
$addon_list_array = [ $addon_list_array = [
'policy_name' => $policy_name, 'policy_name' => $policy_name,
'addtional_premium'=>$addtional_premium, 'addtional_premium' => round($addtional_premium),
'gst'=>$gst 'gst' => round($gst)
]; ];
$Addon_list[] = $addon_list_array; $Addon_list[] = $addon_list_array;
} }
$temp_data = ''; $temp_data = '';
$addtional_premium = 0; $addtional_premium = 0;
$gst = 0; $gst = 0;
}
}
} if (count($Addon_list) > 0) {
if(count($Addon_list) != 0 && count($Addon_list) > 0){ $table_content .= '<br><div style="text-align: left; font-size: 12px;"><div style="text-align:left;">';
$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>'; $table_content .= '<table border="1" cellpadding="5" cellspacing="0" style="width:100%; border-collapse: collapse; font-size: 12px;">';
$sum_tolal = 0;
// Center align for table header and body
$table_content .= '<thead style="background-color: #02a8b5; color: #ffffff; text-align: center;">';
$table_content .= '<tr>';
$table_content .= '<th>Policy Name</th>';
$table_content .= '<th>Additional Premium</th>';
$table_content .= '<th>GST</th>';
$table_content .= '<th>Total</th>';
$table_content .= '</tr>';
$table_content .= '</thead>';
$table_content .= '<tbody style="text-align: center;">';
$sum_total = 0;
foreach ($Addon_list as $key => $value) { foreach ($Addon_list as $key => $value) {
$sum_tolal = $value['gst'] + $value['addtional_premium'] + $sum_tolal; $total_addon = $value['gst'] + $value['addtional_premium'];
$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>'; $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>'; $sum_total_words = numberToWords($sum_total);
$table_content .= '</tbody></table></div></div>'; $table_content .= '<tr>';
$table_content .= '<div style="width:60%;text-align:right">'. $sum_total_words .'</div>'; $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); $mail_content = str_replace("[[member_summary]]", $table_content , $mail_content);

View File

@ -60,4 +60,24 @@ class BatchFileModel extends Model
return $data; 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 = []) 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('employee_polices', 'employee_polices.employee_id = employees.id')
->join('client_policy', 'client_policy.id = employee_polices.client_policy_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) ->where('employees.is_active',1)
->when($client_policy_id, function($query) use ($client_policy_id){ ->when($client_policy_id, function($query) use ($client_policy_id){
return $query->where('employee_polices.client_policy_id',$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> <style>
body { body {
@ -62,7 +201,7 @@ body {
<span class="d-none d-sm-inline-block">Enrolment</span> <span class="d-none d-sm-inline-block">Enrolment</span>
</a> </a>
</li> </li>
<!--
<?php if(get_role_id() == 1 || get_role_id() == 5) { ?> <?php if(get_role_id() == 1 || get_role_id() == 5) { ?>
<li class="nav-item"> <li class="nav-item">
@ -72,13 +211,13 @@ body {
</a> </a>
</li> </li>
<?php } ?> <?php } ?> -->
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<?php include('enrollment_dash.php'); ?>
<?php include('endorsement_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> </div>
<!-- </div> --> <!-- </div> -->

View File

@ -140,7 +140,7 @@ body{
</style> </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"> <div class="row">
<?php if (in_array(BUSINESS_TEAM_ID, user_team())) { ?> <?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); $('#name_'+item.kyc_doc_type_id).html(item.file_name);
$('#form_'+item.kyc_doc_type_id).hide(); $('#form_'+item.kyc_doc_type_id).hide();
var url = "<?= base_url('/downloadGdriveFile'); ?>" + // var url = "<?= base_url('/downloadGdriveFile'); ?>" +
"?client_id=" + item.client_id + // "?client_id=" + item.client_id +
"&file_type=kyc" + // "&file_type=kyc" +
"&file_name=" + item.file_name + // "&file_name=" + item.file_name +
"&client_policy_id=client_policy_id"; // "&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') // console.log('step 1')
@ -293,14 +293,14 @@
other_docs_count++; other_docs_count++;
} }
var url = "<?= base_url('/downloadGdriveFile'); ?>" + // var url = "<?= base_url('/downloadGdriveFile'); ?>" +
"?client_id=" + item.client_id + // "?client_id=" + item.client_id +
"&file_type=kyc" + // "&file_type=kyc" +
"&file_name=" + item.file_name + // "&file_name=" + item.file_name +
"&client_policy_id=client_policy_id"; // "&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); // console.log("Current item:", item);
if (item.kyc_doc_type_id == '0') { if (item.kyc_doc_type_id == '0') {
@ -465,13 +465,13 @@
} }
var url = "<?= base_url('/downloadGdriveFile'); ?>" + // var url = "<?= base_url('/downloadGdriveFile'); ?>" +
"?client_id=" + item.client_id + // "?client_id=" + item.client_id +
"&file_type=kyc" + // "&file_type=kyc" +
"&file_name=" + item.file_name + // "&file_name=" + item.file_name +
"&client_policy_id=client_policy_id"; // "&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'){ if(item.kyc_doc_type_id == '0'){
@ -508,13 +508,13 @@
// console.log('step 1') // console.log('step 1')
var url = "<?= base_url('/downloadGdriveFile'); ?>" + // var url = "<?= base_url('/downloadGdriveFile'); ?>" +
"?client_id=" + item.client_id + // "?client_id=" + item.client_id +
"&file_type=kyc" + // "&file_type=kyc" +
"&file_name=" + item.file_name + // "&file_name=" + item.file_name +
"&client_policy_id=client_policy_id"; // "&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 != ""){ if(item.file_name != null && item.file_name != ""){

View File

@ -242,12 +242,6 @@
dateFormat: "d-m-Y", dateFormat: "d-m-Y",
defaultDate: today, defaultDate: today,
allowInput: false, allowInput: false,
onChange: function(selectedDates, dateStr, instance) {
var closeDate = new Date(selectedDates[0]);
closeDate.setFullYear(closeDate.getFullYear() + 1);
closeDate.setDate(closeDate.getDate() - 1); // Set end date to last day of selected year
closeDatePicker.setDate(closeDate);
}
}); });
// Calculate the end date (today + 1 year) // Calculate the end date (today + 1 year)
@ -264,13 +258,13 @@
// Initialize Flatpickr for the end date with the calculated end date // Initialize Flatpickr for the end date with the calculated end date
var closeDatePicker = flatpickr("#close_date", { var closeDatePicker = flatpickr("#close_date", {
dateFormat: "d-m-Y", dateFormat: "d-m-Y",
defaultDate: closeDate, defaultDate: today,
allowInput: false allowInput: false
}); });
var reminderDatePicker = flatpickr("#reminder_date", { var reminderDatePicker = flatpickr("#reminder_date", {
dateFormat: "d-m-Y", dateFormat: "d-m-Y",
defaultDate: closeDate, defaultDate: today,
allowInput: false allowInput: false
}); });

View File

@ -99,7 +99,7 @@
</div> </div>
<div class="table-responsive" style="overflow-x: auto;"> <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"> <thead class="bg-light">
<tr> <tr>
<th>S.No</th> <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) { function showSuggestions(inputID, suggestionBoxID,hiddenInputID,suggestions) {
// console.log('showSuggestions'); // 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="tab-pane fade" id="enrollment-dash-tab">
<div class="row visa_status_count_view"> <div class="row visa_status_count_view">

View File

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