Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
9c7c207e94
@ -12,6 +12,8 @@ use CodeIgniter\Filters\SecureHeaders;
|
||||
use App\Filters\AuthMVC;
|
||||
use App\Filters\HttpRequestLog;
|
||||
|
||||
use App\Filters\AuthJWT;
|
||||
|
||||
class Filters extends BaseConfig
|
||||
{
|
||||
/**
|
||||
@ -29,7 +31,8 @@ class Filters extends BaseConfig
|
||||
'invalidchars' => InvalidChars::class,
|
||||
'secureheaders' => SecureHeaders::class,
|
||||
'authMVC' => AuthMVC::class,
|
||||
'HttpRequestLog' => HttpRequestLog::class
|
||||
'HttpRequestLog' => HttpRequestLog::class,
|
||||
'authJWT' => AuthJWT::class
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@ -185,8 +185,20 @@ $routes->group("/util", ["filter" => "authMVC"], function($routes){
|
||||
$routes->get("police-by-insurer/(:any)", "ClientController::getPolicesByInsurerId/$1");
|
||||
$routes->get("get-file-error/(:any)", "EmployeeController::getUploadedFileError/$1");
|
||||
$routes->get("kyc-other-docs-delete/(:any)", "ClientController::deleteClientKycOtherDocs/$1");
|
||||
$routes->get("policy-premium", "ClientController::getpolicyGridData/$1");
|
||||
$routes->get("policy-premium", "ClientController::getpolicyGridData/$1");
|
||||
$routes->get("update-policy-status", "ClientController::updateClientPolicyStatus/$1");
|
||||
});
|
||||
|
||||
$routes->cli('processjob', 'JobWorker::processJob');
|
||||
|
||||
|
||||
|
||||
// $routes->get("/api", "RestAuthenticationController::index");
|
||||
$routes->post("/api/verifyEmployeeNumber", "RestAuthenticationController::verifyEmployeeWithMobileNumber");
|
||||
$routes->post("/api/getVerifiedUserData", "RestAuthenticationController::getVerifiedUserData");
|
||||
|
||||
$routes->group("/api", ["filter" => "authJWT"], function($routes){
|
||||
$routes->post("logined", "RestAuthenticationController::logined");
|
||||
$routes->post("getId", "RestAuthenticationController::getUserIdFromToken");
|
||||
|
||||
});
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Controllers;
|
||||
use App\Helpers\DepositHelper;
|
||||
use App\helpers\JWTToken;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
@ -29,6 +30,8 @@ use App\Models\PolicyPremium1Model;
|
||||
use App\Models\PolicyPremium2Model;
|
||||
use App\Models\EmployeeModel;
|
||||
|
||||
|
||||
|
||||
class ClientController extends AdminController
|
||||
{
|
||||
use ResponseTrait;
|
||||
@ -86,6 +89,15 @@ class ClientController extends AdminController
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
// $token = $_SESSION;
|
||||
// $token = $request->getHeaderLine('Authorization');
|
||||
|
||||
|
||||
// print_r(JWTToken::getIdFromToken($token));
|
||||
|
||||
// die();
|
||||
|
||||
$this->myLogger->logme('error','Client list function called');
|
||||
$headerData['page_name'] = 'Client List';
|
||||
$data['clientList'] = $this->clientModel->getCreatedByUserName();
|
||||
@ -121,81 +133,77 @@ class ClientController extends AdminController
|
||||
echo view('client_onboarding', $data);
|
||||
echo view('layout/footer');
|
||||
|
||||
}
|
||||
// In your controller
|
||||
public function deposit($id = null)
|
||||
{
|
||||
$headerData['page_name'] = 'Client Deposit';
|
||||
|
||||
$data['clientData'] = $this->clientPolicyModel->getinsurerswithclientid($id);
|
||||
$data['depositsummary'] = $this->clientPolicyModel->getDepositlistsummary($id);
|
||||
|
||||
// Fetch associated insurer names and balances
|
||||
$balances = $this->clientPolicyModel->getBalances($id);
|
||||
$data['balances'] = $balances;
|
||||
|
||||
echo view('layout/header', $headerData);
|
||||
echo view('client_deposit_list', $data);
|
||||
echo view('layout/footer');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function view_Deposit($insurerId) {
|
||||
// Load your model to fetch data based on $clientId and $insurerId
|
||||
$subTypeOptions = [
|
||||
1 => 'Deposit',
|
||||
2 => 'Adjustment',
|
||||
3 => 'Deletion',
|
||||
// Add more options as needed
|
||||
];
|
||||
$data['subTypeOptions'] = $subTypeOptions;
|
||||
// In your controller
|
||||
public function deposit($id = null)
|
||||
{
|
||||
$headerData['page_name'] = 'Client Deposit';
|
||||
$data['insurerName']= $this->insurerModel->getInsurerName($insurerId);
|
||||
$loggedInUserID = get_session_userid();
|
||||
// $data['clientData']= $this->clientPolicyModel->getinsurerswithinsurenceid($insurerId);
|
||||
$clientId = $this->request->getGet('client_id');
|
||||
$data['depositdata']= $this->clientPolicyModel->getdepositData($clientId,$insurerId);
|
||||
$data['clientData'] = $this->clientPolicyModel->getClientById($clientId);
|
||||
$data['deposiamount'] = $this->clientPolicyModel->getDepositSummary($clientId, $insurerId);
|
||||
|
||||
|
||||
// print_r($data['depositdata'] );die;
|
||||
// Load the view for the new list page
|
||||
|
||||
$data['clientData'] = $this->clientPolicyModel->getinsurerswithclientid($id);
|
||||
$data['depositsummary'] = $this->clientPolicyModel->getDepositlistsummary($id);
|
||||
|
||||
// Fetch associated insurer names and balances
|
||||
$balances = $this->clientPolicyModel->getBalances($id);
|
||||
$data['balances'] = $balances;
|
||||
|
||||
echo view('layout/header', $headerData);
|
||||
echo view('view_deposit',$data);
|
||||
echo view('client_deposit_list', $data);
|
||||
echo view('layout/footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function view_Deposit($insurerId)
|
||||
{
|
||||
// Load your model to fetch data based on $clientId and $insurerId
|
||||
$subTypeOptions = [
|
||||
1 => 'Deposit',
|
||||
2 => 'Adjustment',
|
||||
3 => 'Deletion',
|
||||
// Add more options as needed
|
||||
];
|
||||
$data['subTypeOptions'] = $subTypeOptions;
|
||||
$headerData['page_name'] = 'Client Deposit';
|
||||
$data['insurerName']= $this->insurerModel->getInsurerName($insurerId);
|
||||
$loggedInUserID = get_session_userid();
|
||||
// $data['clientData']= $this->clientPolicyModel->getinsurerswithinsurenceid($insurerId);
|
||||
$clientId = $this->request->getGet('client_id');
|
||||
$data['depositdata']= $this->clientPolicyModel->getdepositData($clientId,$insurerId);
|
||||
$data['clientData'] = $this->clientPolicyModel->getClientById($clientId);
|
||||
$data['deposiamount'] = $this->clientPolicyModel->getDepositSummary($clientId, $insurerId);
|
||||
|
||||
|
||||
// print_r($data['depositdata'] );die;
|
||||
// Load the view for the new list page
|
||||
echo view('layout/header', $headerData);
|
||||
echo view('view_deposit',$data);
|
||||
echo view('layout/footer');
|
||||
}
|
||||
|
||||
|
||||
public function saveDeposit()
|
||||
{
|
||||
// Retrieve form data from POST request
|
||||
$loggedInUserID = get_session_userid();
|
||||
|
||||
// Prepare the array with data
|
||||
$data = [
|
||||
'amount' => $this->request->getPost('amount'),
|
||||
'sub_type_id' => $this->request->getPost('sub_type_id'),
|
||||
'client_id' => $this->request->getPost('client_id'),
|
||||
'insurer_id' => $this->request->getPost('insurer_id'),
|
||||
'description' => $this->request->getPost('description'),
|
||||
'transaction_type' => $this->request->getPost('transaction_type') ?: 'Credit',
|
||||
'updated_by' => 1, // You need to set the correct value for updated_by
|
||||
];
|
||||
|
||||
// Call the saveDeposit function from DepositHelper
|
||||
$response = DepositHelper::saveDeposit($data, $loggedInUserID);
|
||||
|
||||
// Return a boolean value based on success
|
||||
return $this->response->setJSON(['success' => $response['success']]);
|
||||
}
|
||||
|
||||
|
||||
public function saveDeposit()
|
||||
{
|
||||
// Retrieve form data from POST request
|
||||
$loggedInUserID = get_session_userid();
|
||||
|
||||
// Prepare the array with data
|
||||
$data = [
|
||||
'amount' => $this->request->getPost('amount'),
|
||||
'sub_type_id' => $this->request->getPost('sub_type_id'),
|
||||
'client_id' => $this->request->getPost('client_id'),
|
||||
'insurer_id' => $this->request->getPost('insurer_id'),
|
||||
'description' => $this->request->getPost('description'),
|
||||
'transaction_type' => $this->request->getPost('transaction_type') ?: 'Credit',
|
||||
'updated_by' => 1, // You need to set the correct value for updated_by
|
||||
];
|
||||
|
||||
// Call the saveDeposit function from DepositHelper
|
||||
$response = DepositHelper::saveDeposit($data, $loggedInUserID);
|
||||
|
||||
// Return a boolean value based on success
|
||||
return $this->response->setJSON(['success' => $response['success']]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function editClientOnboarding($id = null)
|
||||
{
|
||||
|
||||
@ -616,11 +624,10 @@ public function saveDeposit()
|
||||
$si = $this->request->getPost('si');
|
||||
}
|
||||
$age_from = isset($this->request->getPost('age_from')[$i]) ? $this->request->getPost('age_from')[$i] : null;
|
||||
$age_to = isset($this->request->getPost('age_to')[$i]) ? $this->request->getPost('age_to')[$i] : null;
|
||||
$premium = isset($premiumData[$i]) ? $premiumData[$i] : null;
|
||||
$grade = isset($this->request->getPost('grade')[$i]) ? $this->request->getPost('grade')[$i] : null;
|
||||
$max_si = isset($this->request->getPost('max_si')[$i]) ? $this->request->getPost('max_si')[$i] : null;
|
||||
$created_by = get_session_userid();
|
||||
$age_to = isset($this->request->getPost('age_to')[$i]) ? $this->request->getPost('age_to')[$i] : null;
|
||||
$premium = isset($premiumData[$i]) ? $premiumData[$i] : null;
|
||||
$grade = isset($this->request->getPost('grade')[$i]) ? $this->request->getPost('grade')[$i] : null;
|
||||
$max_si = isset($this->request->getPost('max_si')[$i]) ? $this->request->getPost('max_si')[$i] : null;
|
||||
|
||||
if ($si !== null) {
|
||||
$data['si'] = $si;
|
||||
@ -663,9 +670,6 @@ public function saveDeposit()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function getKycDocsById($id=null)
|
||||
{
|
||||
|
||||
@ -722,12 +726,12 @@ public function saveDeposit()
|
||||
public function getpolicyGridData()
|
||||
{
|
||||
|
||||
$policy_id = $this->request->getGet('policy_id');
|
||||
$client_id = $this->request->getGet('client_id');
|
||||
$client_policy_id = $this->request->getGet('client_policy_id');
|
||||
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||
|
||||
$emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id")
|
||||
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
|
||||
->where("employees.client_id",$client_id)
|
||||
->where("employees.client_id",$record['client_id'])
|
||||
->where("employees.emp_status",'active')
|
||||
->countAllResults();
|
||||
|
||||
@ -738,7 +742,8 @@ public function saveDeposit()
|
||||
}
|
||||
|
||||
|
||||
$data = $this->policesModel->getPolicyPremium($policy_id);
|
||||
$data = $this->policesModel->getPolicyPremium($record['policy_id']);
|
||||
$policy_name = $data[0]->policy_name;
|
||||
$pattern = '/gmc/i';
|
||||
$subject = $data[0]->policy_type;
|
||||
if (preg_match($pattern, $subject)) {
|
||||
@ -749,15 +754,16 @@ public function saveDeposit()
|
||||
$results = $this->policyGridModel->like('policy_type', $search_term)->findAll();
|
||||
|
||||
if($search_term === 'GPA'){
|
||||
$premiumData = $this->policyPremium1Model->where(['client_id' => $client_id, 'client_policy_id' => $policy_id, 'is_active' => 1])->findAll();
|
||||
$premiumData = $this->policyPremium1Model->where(['client_id' => $record['client_id'], 'client_policy_id' => $client_policy_id, 'is_active' => 1])->findAll();
|
||||
}else{
|
||||
$premiumData = $this->policyPremium2Model->where(['client_id' => $client_id, 'client_policy_id' => $policy_id, 'is_active' => 1])->findAll();
|
||||
$premiumData = $this->policyPremium2Model->where(['client_id' => $record['client_id'], 'client_policy_id' => $client_policy_id, 'is_active' => 1])->findAll();
|
||||
}
|
||||
|
||||
|
||||
// echo '<pre>';
|
||||
// print_r($results);
|
||||
// print_r($data[0]->policy_type); die;
|
||||
return $this->respond(['status' => true,'code' => 200,'data' => $results, 'premiumData' => $premiumData, 'count' => $emp_count], 200);
|
||||
return $this->respond(['status' => true,'code' => 200,'data' => $results, 'premiumData' => $premiumData, 'count' => $emp_count, 'policy_name' => $policy_name], 200);
|
||||
|
||||
}
|
||||
|
||||
@ -765,20 +771,16 @@ public function saveDeposit()
|
||||
{
|
||||
|
||||
try {
|
||||
|
||||
$this->myLogger->logme('error','Terms CREATE function called');
|
||||
// print_r($this->request->getPost());
|
||||
$client_id = $this->request->getPost("client_id");
|
||||
$policy_id = $this->request->getPost("policy_id");
|
||||
|
||||
/*** Client Policy Table Primary Key(ID) ***/
|
||||
$client_policy_id = $this->request->getPost("client_policy_id");
|
||||
|
||||
$data['sum_insured'] =$this->request->getPost("sum_insured");
|
||||
$data['family_floater'] =$this->request->getPost("family_floater");
|
||||
// print_r($data['familyfloater']);
|
||||
if (!$data['family_floater'] || $data['family_floater'] == 0) {
|
||||
$data['corporatebuffer'] = "";
|
||||
$data['family_floaters'] = "";
|
||||
}else{
|
||||
$data['corporatebuffer'] = $this->request->getPost("corporatebuffer");
|
||||
$data['family_floaters'] = $this->request->getPost("family_floaters") ?? [];
|
||||
}
|
||||
|
||||
$data['waiverofpreexistingdiseases'] =$this->request->getPost("waiverofpreexistingdiseases");
|
||||
if ($data['waiverofpreexistingdiseases'] == 1) {
|
||||
@ -830,14 +832,12 @@ public function saveDeposit()
|
||||
$jsonData = json_encode($data);
|
||||
$dataa = array(
|
||||
'policy_terms' => $jsonData,
|
||||
'client_id' => $client_id,
|
||||
'policy_id' => $policy_id
|
||||
);
|
||||
|
||||
$record = $this->clientPolicyModel->where(['client_id' => $client_id, 'policy_id' => $policy_id])->first();
|
||||
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||
|
||||
if ($record) {
|
||||
$update = $this->clientPolicyModel->update($record['id'], $dataa);
|
||||
$update = $this->clientPolicyModel->update($client_policy_id, $dataa);
|
||||
if ($update) {
|
||||
return $this->respond(['status' => true,'code' => 200,'message' => 'Data updated successfully'], 200);
|
||||
} else {
|
||||
@ -862,14 +862,16 @@ public function saveDeposit()
|
||||
|
||||
public function getterms()
|
||||
{
|
||||
$client_id = $this->request->getVar('client_id');
|
||||
$policy_id = $this->request->getVar('policy_id');
|
||||
$record = $this->clientPolicyModel->where(['client_id' => $client_id, 'policy_id' => $policy_id])->first();
|
||||
$client_policy_id = $this->request->getVar('client_policy_id');
|
||||
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||
$policy_name = $this->policesModel->select('name')->where('id', $record['policy_id'])->first();
|
||||
|
||||
$emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id")
|
||||
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
|
||||
->where("employees.client_id",$client_id)
|
||||
->where("employees.emp_status",'active')
|
||||
->countAllResults();
|
||||
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
|
||||
->where("employees.client_id", $record['client_id'])
|
||||
->where("employees.emp_status",'active')
|
||||
->countAllResults();
|
||||
|
||||
if($emp_count = 0){
|
||||
$emp_count = true;
|
||||
}else{
|
||||
@ -877,9 +879,9 @@ public function saveDeposit()
|
||||
}
|
||||
|
||||
if ($record) {
|
||||
return $this->respond(['Status' => true,'code' => 200,'data' => $record['policy_terms'], 'count' => $emp_count], 200);
|
||||
return $this->respond(['Status' => true,'code' => 200,'data' => $record['policy_terms'], 'count' => $emp_count, 'policy_name' => $policy_name], 200);
|
||||
} else {
|
||||
return $this->respond(['Status' => false,'code' => 200,'message' => 'Record not found.', 'count' => $emp_count], 200);
|
||||
return $this->respond(['Status' => false,'code' => 200,'message' => 'Record not found.', 'count' => $emp_count, 'policy_name' => $policy_name], 200);
|
||||
}
|
||||
|
||||
}
|
||||
@ -890,9 +892,8 @@ public function saveDeposit()
|
||||
try {
|
||||
$this->myLogger->logme('error','Policy GPA Terms CREATE function called');
|
||||
|
||||
// print_r($this->request->getPost());
|
||||
$client_id = $this->request->getPost("client_id");
|
||||
$policy_id = $this->request->getPost("policy_id");
|
||||
/*** Client Policy Table Primary Key(ID) ***/
|
||||
$client_policy_id = $this->request->getPost("client_policy_id");
|
||||
|
||||
$data['sumInsured2'] =$this->request->getPost("sumInsured2");
|
||||
$data['totalSumInsured'] =$this->request->getPost("totalSumInsured");
|
||||
@ -942,38 +943,30 @@ public function saveDeposit()
|
||||
$data['terrorism'] = $this->request->getPost("terrorism");
|
||||
$data['worldwideCover'] = $this->request->getPost("worldwideCover");
|
||||
|
||||
$jsonData = json_encode($data);
|
||||
$dataa = array(
|
||||
'policy_terms' => $jsonData,
|
||||
);
|
||||
|
||||
print_r($data);
|
||||
|
||||
// print_r($this->request->getPost());
|
||||
// die();
|
||||
|
||||
$jsonData = json_encode($data);
|
||||
$dataa = array(
|
||||
'policy_terms' => $jsonData,
|
||||
'client_id' => $client_id,
|
||||
'policy_id' => $policy_id
|
||||
);
|
||||
$record = $this->clientPolicyModel->where(['client_id' => $client_id, 'policy_id' => $policy_id])->first();
|
||||
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||
if ($record) {
|
||||
$update = $this->clientPolicyModel->update($record['id'], $dataa);
|
||||
$update = $this->clientPolicyModel->update($client_policy_id, $dataa);
|
||||
if ($update) {
|
||||
return $this->respond(['status' => true,'code' => 200,'message' => 'Data updated successfully'], 200);
|
||||
return $this->respond(['status' => true, 'code' => 200, 'message' => 'Data updated successfully', 'client_policy_id' => $client_policy_id], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false,'code' => 404, 'message' => 'Failed to update data'], 200);
|
||||
}
|
||||
}else{
|
||||
$insert = $this->clientPolicyModel->insert($dataa);
|
||||
if ($insert) {
|
||||
return $this->respond(['status' => true,'code' => 200,'message' => 'Data stored successfully'], 200);
|
||||
return $this->respond(['status' => true,'code' => 200,'message' => 'Data stored successfully', 'client_policy_id' => $client_policy_id], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false,'code' => 404, 'message' => 'Failed to store data'], 200);
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// Handle the exception
|
||||
|
||||
echo "Failed to insert data: " . $e->getMessage();
|
||||
// Log the error
|
||||
log_message('error', 'Failed to insert data: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
@ -994,4 +987,64 @@ public function saveDeposit()
|
||||
|
||||
}
|
||||
|
||||
public function updateClientPolicyStatus(){
|
||||
|
||||
$client_policy_id = $this->request->getGet('client_policy_id');
|
||||
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||
|
||||
|
||||
$data = $this->policesModel->getPolicyPremium($record['policy_id']);
|
||||
$pattern = '/gmc/i';
|
||||
$subject = $data[0]->policy_type;
|
||||
if (preg_match($pattern, $subject)) {
|
||||
$search_term = 'GMC';
|
||||
} else {
|
||||
$search_term = 'GPA';
|
||||
}
|
||||
|
||||
if($search_term === 'GPA'){
|
||||
$racRate = $this->policyPremium1Model->where(['client_id' => $record['client_id'], 'client_policy_id' => $client_policy_id, 'is_active' => 1])->countAllResults();
|
||||
}else if($search_term === 'GMC'){
|
||||
$racRate = $this->policyPremium2Model->where(['client_id' => $record['client_id'], 'client_policy_id' => $client_policy_id, 'is_active' => 1])->countAllResults();
|
||||
}
|
||||
|
||||
$termsData = $this->clientPolicyModel->where(['id' => $client_policy_id, 'is_active' => 1])->first();
|
||||
if(empty($termsData['policy_terms'])){
|
||||
return $this->respond(['status' => false,'code' => 200,'message' => 'This Policy does not Create Terms'], 200);
|
||||
}
|
||||
|
||||
|
||||
$termsData = json_decode($termsData['policy_terms']);
|
||||
|
||||
if (isset($termsData->sum_insured) && empty($termsData->sum_insured)) {
|
||||
return $this->respond(['status' => false,'code' => 200,'message' => 'The Policy terms Sum Insured field is empty', 'data' => $record], 200);
|
||||
}
|
||||
|
||||
if (isset($termsData->SumInsured) && empty($termsData->sum_insured)) {
|
||||
return $this->respond(['status' => false,'code' => 200,'message' => 'The Policy terms Sum Insured field is empty'], 200);
|
||||
}
|
||||
|
||||
// Check if 'family_floater' key exists and has a value
|
||||
if (isset($termsData->family_floater) && empty($termsData->family_floater)) {
|
||||
return $this->respond(['status' => false,'code' => 200,'message' => 'The Policy terms Family Floater field is empty'], 200);
|
||||
}
|
||||
|
||||
// Check if 'family_floaters' key exists and has a value
|
||||
if (isset($termsData->family_floaters) && is_array($termsData->family_floaters) && count($termsData->family_floaters) <= 0) {
|
||||
return $this->respond(['status' => false,'code' => 200,'message' => 'The Policy terms Family Members field is empty'], 200);
|
||||
$familyFloatersCount = count($termsData->family_floaters);
|
||||
}
|
||||
|
||||
if($racRate == 0){
|
||||
|
||||
return $this->respond(['status' => false,'code' => 200,'message' => 'The Policy has no Data for Rac Rate'], 200);
|
||||
}
|
||||
|
||||
$policy_status = $this->clientPolicyModel->where('id', $client_policy_id )->set('policy_status', 1)->update();
|
||||
return $this->respond(['status' => true,'code' => 200, 'message' => 'Policy Status Updated Successfully', 'data' => $termsData, 'racRate' => $racRate], 200);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -18,9 +18,10 @@ use App\Controllers\JobWorker ;
|
||||
use App\Controllers\Jobs\SubJob;
|
||||
use App\Controllers\EmployeeServiceController;
|
||||
|
||||
|
||||
use CodeIgniter\API\ResponseTrait;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
|
||||
class EmployeeController extends AdminController
|
||||
{
|
||||
|
||||
@ -197,9 +198,68 @@ class EmployeeController extends AdminController
|
||||
|
||||
public function getExcelFileErrors()
|
||||
{
|
||||
|
||||
$file_id = $this->request->uri->getSegment(3);
|
||||
|
||||
echo view('excel_errors');
|
||||
$file = $this->fileModel->find($file_id);
|
||||
$error_data = json_decode($file['reason']);
|
||||
$file_name_with_path = WRITEPATH."/uploads/excel/".$file['file_name'];
|
||||
|
||||
//check the file exist or not
|
||||
if(!file_exists($file_name_with_path))
|
||||
{
|
||||
$error_message = "File not found";
|
||||
$this->myLogger->logme('error',($error_message . ' for file id ' . $file_id));
|
||||
}
|
||||
|
||||
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($file_name_with_path);
|
||||
$sheet = $spreadsheet->getActiveSheet();
|
||||
|
||||
$highestRowAndColumn = $sheet->getHighestRowAndColumn();
|
||||
$excel_data = $sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']);
|
||||
$data['excel_header'] = $excel_data[0];
|
||||
unset($excel_data[0]);
|
||||
$data['excel_data'] = $excel_data;
|
||||
|
||||
|
||||
echo '<pre>';
|
||||
|
||||
// foreach ($error_data->error_data as $key => $value) {
|
||||
// print_r($excel_data[$key]);
|
||||
// foreach($value as $key2 => $value2){
|
||||
// // echo '<pre>';
|
||||
// // print_r($excel_data[$key][$value2->col_idx]);
|
||||
// }
|
||||
|
||||
// }
|
||||
$finalArray = [];
|
||||
foreach ($error_data->error_data as $key => $value) {
|
||||
foreach($value as $key2 => $value2){
|
||||
$error_data = $value2->error;
|
||||
|
||||
echo '<pre>';
|
||||
// print_r([$value2->col_idx]);
|
||||
$excel_data[$key][$value2->col_idx] = $error_data;
|
||||
// print_r($excel_data[$key]);
|
||||
|
||||
}
|
||||
// print_r($excel_data[$key]);
|
||||
// array_push($finalArray, $excel_data);
|
||||
}
|
||||
|
||||
print_r($excel_data);
|
||||
|
||||
die;
|
||||
|
||||
|
||||
// echo '###################################################################### <br>';
|
||||
// print_r($excel_data);
|
||||
// echo '###################################################################### <br>';
|
||||
// print_r($error_data->error_data); die;
|
||||
|
||||
$headerData['page_name'] = 'Excel Error';
|
||||
echo view('layout/header', $headerData);
|
||||
echo view('excel_errors', $data);
|
||||
echo view('layout/footer');
|
||||
}
|
||||
|
||||
|
||||
|
||||
120
app/Controllers/RestAuthenticationController.php
Normal file
120
app/Controllers/RestAuthenticationController.php
Normal file
@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
// declare(strict_types=1);
|
||||
|
||||
|
||||
namespace App\Controllers;
|
||||
use App\Helpers\DepositHelper;
|
||||
use App\Helpers\JWTToken;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use CodeIgniter\API\ResponseTrait;
|
||||
|
||||
|
||||
|
||||
use App\Models\EmployeeModel;
|
||||
|
||||
|
||||
use Firebase\JWT\JWT;
|
||||
// require_once('../vendor/autoload.php');
|
||||
|
||||
|
||||
|
||||
class RestAuthenticationController extends AdminController
|
||||
{
|
||||
use ResponseTrait;
|
||||
|
||||
protected $myLogger;
|
||||
protected $employeeModel;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// set_session_context('Client');
|
||||
$this->myLogger = \Config\Services::mylogger();
|
||||
|
||||
$this->employeeModel = new EmployeeModel();
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->myLogger->logme('error','Rest Authentication function called');
|
||||
$data =["id"=>"2", "role"=>"staff"];
|
||||
|
||||
print_r(JWTToken::encode($data));
|
||||
}
|
||||
|
||||
public function logined()
|
||||
{
|
||||
|
||||
$this->myLogger->logme('error','Rest Authentication function called');
|
||||
|
||||
echo "Rest Authentication Logined Success........";
|
||||
}
|
||||
|
||||
|
||||
public function verifyEmployeeWithMobileNumber()
|
||||
{
|
||||
try {
|
||||
$mobile_number = $this->request->getJSON()->mobile_number;
|
||||
|
||||
$employeeData = $this->employeeModel->where('mobile', $mobile_number)->first();
|
||||
if ($employeeData) {
|
||||
$result = ['user_verification' => true];
|
||||
return ['status' => 'success','code' => 200,'data' => $result];
|
||||
} else {
|
||||
$result = ['user_verification' => false];
|
||||
return ['status' => 'failed','code' => 404,'data' => $result];
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
return ['status' => 'failed','code' => 505,'data' => $th];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function getVerifiedUserData()
|
||||
{
|
||||
try {
|
||||
$mobile_number = $this->request->getJSON()->mobile_number;
|
||||
|
||||
$employeeData = $this->employeeModel->where('mobile', $mobile_number)->first();
|
||||
if ($employeeData) {
|
||||
$result = JWTToken::encode($employeeData);
|
||||
return ['status' => 'success','code' => 200,'data' => $result];
|
||||
} else {
|
||||
return ['status' => 'failed','code' => 404,'data' => "No data"];
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
return ['status' => 'failed','code' => 500,'data' => $th];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function employeeLogout()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getUserIdFromToken()
|
||||
{
|
||||
$id = JWTToken::getUserIdFromToken();
|
||||
// echo $id['id'];
|
||||
echo "Id----> ";
|
||||
print_r($id);
|
||||
$role = JWTToken::getUserRoleFromToken();
|
||||
echo " Role----> ";
|
||||
echo $role;
|
||||
|
||||
|
||||
$tokenArray = JWTToken::decodeToken();
|
||||
echo " TokenArray----> ";
|
||||
print_r($tokenArray);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
55
app/Filters/AuthJWT.php
Normal file
55
app/Filters/AuthJWT.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filters;
|
||||
|
||||
use App\Helpers\JWTToken;
|
||||
use CodeIgniter\Filters\FilterInterface;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Firebase\JWT\JWT;
|
||||
use Firebase\JWT\Key;
|
||||
use ReflectionClass;
|
||||
|
||||
require_once('../vendor/autoload.php');
|
||||
|
||||
|
||||
|
||||
class AuthJWT implements FilterInterface
|
||||
{
|
||||
public function before(RequestInterface $request, $arguments = null)
|
||||
{
|
||||
$jwt = $request->getHeader('Authorization');
|
||||
|
||||
if ($jwt) {
|
||||
if (JWTToken::validateJWT($jwt)) {
|
||||
$data = JWTToken::validateJWT($jwt);
|
||||
$data = json_decode($data);
|
||||
if ($data->status) {
|
||||
// $auth = $request->getHeader("Authorization");
|
||||
|
||||
return true;
|
||||
}else{
|
||||
header('Content-Type: application/json');
|
||||
http_response_code(401);
|
||||
$error = json_encode(["status" => 401, "message" => $data->message]);
|
||||
echo $error;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
header('Content-Type: application/json');
|
||||
http_response_code(403);
|
||||
$error = json_encode(["status" => 403, "message" => "Access Forbidden!"]);
|
||||
echo $error;
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
|
||||
{
|
||||
// Do something here after the response is sent
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
128
app/Helpers/JWTToken.php
Normal file
128
app/Helpers/JWTToken.php
Normal file
@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
|
||||
use Firebase\JWT\JWT;
|
||||
use Firebase\JWT\Key;
|
||||
use Firebase\JWT\ExpiredException;
|
||||
use Firebase\JWT\BeforeValidException;
|
||||
use Firebase\JWT\SignatureInvalidException;
|
||||
// use Psr\Http\Message\RequestInterface;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use ReflectionClass;
|
||||
|
||||
|
||||
|
||||
class JWTToken
|
||||
{
|
||||
|
||||
public static function encode($data =null)
|
||||
{
|
||||
$secret_Key="secret";
|
||||
$iat = time();
|
||||
$exp = $iat + 36000;
|
||||
$request_data = [
|
||||
"iat" => $iat,
|
||||
"exp" => $exp,
|
||||
];
|
||||
if ($data !== null) {
|
||||
$request_data = array_merge($request_data, (array)$data);
|
||||
}
|
||||
try{
|
||||
$token = JWT::encode($request_data ,$secret_Key,'HS512');
|
||||
|
||||
return $token;
|
||||
// return ['status' => true,'token' => $token];
|
||||
}
|
||||
catch (Exception $e) {
|
||||
return ['status' => false,'message' => $e->getMessage()];
|
||||
}
|
||||
}
|
||||
|
||||
public static function validateJWT($jwt)
|
||||
{
|
||||
$jwtParts = explode(' ', $jwt);
|
||||
|
||||
if (count($jwtParts) != 2 || $jwtParts[0] == 'Bearer') {
|
||||
return false;
|
||||
}
|
||||
|
||||
$token = $jwtParts[1];
|
||||
|
||||
try {
|
||||
$decoded = JWT::decode($token, new Key("secret", 'HS512'));
|
||||
return json_encode(['status' => true, 'message' => 'Token is valid', 'decoded' => (array) $decoded]);
|
||||
} catch (ExpiredException $e) {
|
||||
return json_encode(['status' => false, 'message' => 'Token has expired']);
|
||||
} catch (BeforeValidException $e) {
|
||||
return json_encode(['status' => false, 'message' => 'Token is not yet valid']);
|
||||
} catch (SignatureInvalidException $e) {
|
||||
return json_encode(['status' => false, 'message' => 'Token signature is invalid']);
|
||||
} catch (\Exception $e) {
|
||||
return json_encode(['status' => false, 'message' => 'An error occurred while decoding the token']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function getIdFromToken($jwt)
|
||||
{
|
||||
|
||||
$jwtParts = explode(' ', $jwt);
|
||||
|
||||
$token = $jwtParts[0];
|
||||
|
||||
try {
|
||||
$decoded = JWT::decode($token, new Key("secret", 'HS512'));
|
||||
return json_encode(['status' => true, 'message' => 'Token is valid', 'data' =>$decoded->data->id ]);
|
||||
} catch (ExpiredException $e) {
|
||||
return json_encode(['status' => false, 'message' => 'Token has expired']);
|
||||
} catch (BeforeValidException $e) {
|
||||
return json_encode(['status' => false, 'message' => 'Token is not yet valid']);
|
||||
} catch (SignatureInvalidException $e) {
|
||||
return json_encode(['status' => false, 'message' => 'Token signature is invalid']);
|
||||
} catch (\Exception $e) {
|
||||
return json_encode(['status' => false, 'message' => 'An error occurred while decoding the token']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static function getUserIdFromToken()
|
||||
{
|
||||
$request = \Config\Services::request();
|
||||
$jwt = $request->getHeader('Authorization');
|
||||
$jwtParts = explode(' ', $jwt);
|
||||
$token = $jwtParts[1];
|
||||
|
||||
$decoded = JWT::decode($token, new Key("secret", 'HS512'));
|
||||
return $decoded->id;
|
||||
}
|
||||
|
||||
public static function getUserRoleFromToken()
|
||||
{
|
||||
$request = \Config\Services::request();
|
||||
$jwt = $request->getHeader('Authorization');
|
||||
$jwtParts = explode(' ', $jwt);
|
||||
$token = $jwtParts[1];
|
||||
|
||||
$decoded = JWT::decode($token, new Key("secret", 'HS512'));
|
||||
return $decoded->role;
|
||||
}
|
||||
|
||||
|
||||
public static function decodeToken()
|
||||
{
|
||||
$request = \Config\Services::request();
|
||||
$jwt = $request->getHeader('Authorization');
|
||||
$jwtParts = explode(' ', $jwt);
|
||||
$token = $jwtParts[1];
|
||||
|
||||
$decoded = JWT::decode($token, new Key("secret", 'HS512'));
|
||||
return $decoded;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@ class PolicesModel extends Model
|
||||
|
||||
return $this->db->table('policies')
|
||||
->select('policy_type.*')
|
||||
->select('policies.name as policy_name')
|
||||
->join('policy_type', 'policy_type.id = policies.policy_type_id')
|
||||
->where('policies.id', $policy_id)
|
||||
->get()
|
||||
|
||||
@ -18,6 +18,7 @@ class PolicyPremium2Model extends Model
|
||||
'age_to',
|
||||
'si',
|
||||
'premium',
|
||||
'max_si',
|
||||
'grade',
|
||||
"created_by",
|
||||
"updated_by",
|
||||
|
||||
@ -38,11 +38,7 @@
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" href="<?= base_url("client/list/"); ?><?= $row->id;?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a class="dropdown-item" href="<?= base_url("client/deposit/{$row->id}"); ?>">
|
||||
<i class="mdi mdi-cash mr-2 text-muted font-18 vertical-middle"></i>Deposit
|
||||
</a>
|
||||
|
||||
|
||||
<a class="dropdown-item" href="<?= base_url("client/deposit/{$row->id}"); ?>"><i class="mdi mdi-cash mr-2 text-muted font-18 vertical-middle"></i>Deposit</a>
|
||||
<a class="dropdown-item" href="#"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
<label for="policy_end_date">Policy End Date<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter End Date " name="policy_end_date" id="end_date" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-4" id="policy_status_field">
|
||||
<label for="policy_status">Policy Status</label>
|
||||
<input value="" type="text" class="form-control" placeholder="Policy Status" id="policy_status" readonly>
|
||||
</div>
|
||||
@ -126,6 +126,8 @@
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#policy_status_field').hide()
|
||||
|
||||
// Get today's date
|
||||
var today = new Date();
|
||||
|
||||
@ -198,9 +200,15 @@
|
||||
<td>${rearrangeDateFormat(item.policy_start_date)} - ${rearrangeDateFormat(item.policy_end_date)}</td>
|
||||
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
|
||||
<td>
|
||||
<a data-id="${item.id}" class="btnPolicyEdit mdi mdi-lead-pencil" href="#" style="font-size:18px;"></a>
|
||||
<a data-id="${item.policy_id}" class="btnPolicyMaster mdi mdi-wrench" href="#" data-toggle="modal" id="${item.policy_type_id}" style="font-size:18px;"></a>
|
||||
<a data-id="${item.policy_id}" class="btnPolicyModel mdi mdi-book-open" href="#" data-toggle="modal" data-target="#bs-example-modal-lg" style="font-size:18px; margin-left: 7px;"></a>
|
||||
<div class="btn-group dropdown">
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a href="#" data-id="${item.id}" id="${item.policy_id}" class="dropdown-item btnPolicyEdit"><i class="mdi mdi-lead-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a href="#" data-id="${item.id}" id="${item.policy_type_id}" class="dropdown-item btnPolicyMaster" data-toggle="modal" id="${item.policy_type_id}"><i class="mdi mdi-wrench mr-2 text-muted font-18 vertical-middle"></i>Terms</a>
|
||||
<a href="#" data-id="${item.id}" class="dropdown-item btnPolicyModel" data-toggle="modal" data-target="#bs-example-modal-lg"><i class="mdi mdi-book-open mr-2 text-muted font-18 vertical-middle"></i>Rac Rate</a>
|
||||
<a href="#" data-id="${item.id}" id="${item.policy_id}" class="dropdown-item btnOpenEnroll"><i class="mdi mdi-file-lock mr-2 text-muted font-18 vertical-middle"></i>Open Enrollment</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
@ -212,7 +220,6 @@
|
||||
|
||||
});
|
||||
|
||||
|
||||
/******** for form submit using AJAX *******/
|
||||
$("#policy_form").submit(function(event) {
|
||||
|
||||
@ -279,11 +286,17 @@
|
||||
<td>${item.policy_name}</td>
|
||||
<td>${item.tpa_short} - ${item.tpa_branch_code}</td>
|
||||
<td>${rearrangeDateFormat(item.policy_start_date)} - ${rearrangeDateFormat(item.policy_end_date)}</td>
|
||||
<td>${checkDateStatus(item.policy_end_date)}</td>
|
||||
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
|
||||
<td>
|
||||
<a data-id="${item.id}" class="btnPolicyEdit mdi mdi-lead-pencil" href="#" style="font-size:18px;"></a>
|
||||
<a data-id="${item.policy_id}" class="btnPolicyMaster mdi mdi-wrench" href="#" data-toggle="modal" data-target="${item.policy_type_id}" style="font-size:18px; margin-left: 7px;"></a>
|
||||
<a data-id="${item.policy_id}" class="btnPolicyModel mdi mdi-book-open" href="#" data-toggle="modal" data-target="#bs-example-modal-lg" style="font-size:18px;"></a>
|
||||
<div class="btn-group dropdown">
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a href="#" data-id="${item.id}" class="dropdown-item btnPolicyEdit"><i class="mdi mdi-lead-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a href="#" data-id="${item.policy_id}" class="dropdown-item btnPolicyMaster" data-toggle="modal" id="${item.policy_type_id}"><i class="mdi mdi-wrench mr-2 text-muted font-18 vertical-middle"></i>Terms</a>
|
||||
<a href="#" data-id="${item.policy_id}" class="dropdown-item btnPolicyModel" data-toggle="modal" data-target="#bs-example-modal-lg"><i class="mdi mdi-book-open mr-2 text-muted font-18 vertical-middle"></i>Rac Rate</a>
|
||||
<a href="#" data-id="${item.id}" class="dropdown-item btnOpenEnroll"><i class="mdi mdi-file-lock mr-2 text-muted font-18 vertical-middle"></i>Open Enrollment</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
@ -293,11 +306,21 @@
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
if (xhr.status === 404) {
|
||||
toastr.warning('Resource not found', 'Warning');
|
||||
} else if (xhr.status === 500) {
|
||||
toastr.warning('Internal server error', 'Warning');
|
||||
} else {
|
||||
toastr.warning('Unknown error occurred', 'Warning');
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/********* To get th POLICY base on Insurer *******/
|
||||
$('#insurer').change(function() {
|
||||
var id = $(this).val();
|
||||
@ -321,8 +344,7 @@
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// set the Policy_Type_id for Form Submit
|
||||
/********* set the Policy_Type_id for Form Submit *******/
|
||||
$('#policy').change(function(){
|
||||
|
||||
var dataId = $(this).children('option:selected').attr('data-id');
|
||||
@ -337,7 +359,6 @@
|
||||
|
||||
});
|
||||
|
||||
|
||||
// get the client policy data for edit
|
||||
$('body').on('click', '.btnPolicyEdit', function () {
|
||||
|
||||
@ -354,7 +375,6 @@
|
||||
success: function (res) {
|
||||
|
||||
console.log('clientPolicy : ', res);
|
||||
|
||||
$('#policy_form_action').val('<?= base_url("client/policy/edit"); ?>');
|
||||
|
||||
if (res.status === false) {
|
||||
@ -375,12 +395,17 @@
|
||||
$('#start_date').val(rearrangeDateFormat(res.data.policy_start_date));
|
||||
$('#end_date').val(rearrangeDateFormat(res.data.policy_end_date));
|
||||
$('#policy_status').val(checkDateStatus(res.data.policy_end_date));
|
||||
$('#policy_status_field').show();
|
||||
|
||||
if(res.data.policy_type_id == 1){
|
||||
appendPolicyFormFields(1, res.data);
|
||||
}else if(res.data.policy_type_id >= 2) {
|
||||
appendPolicyFormFields(2, res.data);
|
||||
}
|
||||
/** do not delete this comment condition
|
||||
|
||||
// if(res.data.policy_type_id == 1){
|
||||
// appendPolicyFormFields(1, res.data);
|
||||
// }else if(res.data.policy_type_id >= 2) {
|
||||
// appendPolicyFormFields(2, res.data);
|
||||
// }
|
||||
|
||||
do not delete this comment condition **/
|
||||
|
||||
var policeOptionHTML = '';
|
||||
$.each(res.policy, function(index, item) {
|
||||
@ -396,6 +421,57 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('body').on('click', '.btnOpenEnroll', function () {
|
||||
|
||||
var client_policy_id = $(this).attr('data-id');
|
||||
var policy_id = $(this).attr('id');
|
||||
var client_id = $('#client_id_policy').val()
|
||||
|
||||
|
||||
console.log('client_policy_id', client_policy_id);
|
||||
|
||||
if(client_policy_id){
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo base_url('util/update-policy-status');?>',
|
||||
type: 'GET',
|
||||
data: {
|
||||
client_policy_id : client_policy_id,
|
||||
},
|
||||
success: function(res) {
|
||||
console.log(res);
|
||||
if(res) {
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
if(res.status === true){
|
||||
toastr.success(res.message, 'Success');
|
||||
}else if(res.status === false){
|
||||
toastr.warning(res.message, 'Warning');
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
if (xhr.status === 404) {
|
||||
toastr.warning('Resource not found', 'Warning');
|
||||
} else if (xhr.status === 500) {
|
||||
toastr.warning('Internal server error', 'Warning');
|
||||
} else {
|
||||
toastr.warning('Unknown error occurred', 'Warning');
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function appendPolicyFormFields(policy_type, data = false){
|
||||
|
||||
@ -571,57 +647,70 @@
|
||||
|
||||
}
|
||||
|
||||
// Function to convert numbers into Indian numbering system
|
||||
function convertToIndianNumberingSystem(number) {
|
||||
// Define Indian numbering system
|
||||
var suffixes = ["", "Thousand", "Lakh", "Crore"];
|
||||
|
||||
// Split the number into groups of 3 digits each
|
||||
var numberChunks = [];
|
||||
while (number > 0) {
|
||||
numberChunks.push(number % 1000);
|
||||
number = Math.floor(number / 1000);
|
||||
}
|
||||
const numberWords = {
|
||||
0: "Zero", 1: "One", 2: "Two", 3: "Three", 4: "Four", 5: "Five", 6: "Six", 7: "Seven", 8: "Eight", 9: "Nine",
|
||||
10: "Ten", 11: "Eleven", 12: "Twelve", 13: "Thirteen", 14: "Fourteen", 15: "Fifteen", 16: "Sixteen", 17: "Seventeen", 18: "Eighteen", 19: "Nineteen",
|
||||
20: "Twenty", 30: "Thirty", 40: "Forty", 50: "Fifty", 60: "Sixty", 70: "Seventy", 80: "Eighty", 90: "Ninety"
|
||||
};
|
||||
|
||||
// Convert each chunk into words
|
||||
var result = "";
|
||||
for (var i = 0; i < numberChunks.length; i++) {
|
||||
if (numberChunks[i] !== 0) {
|
||||
result = convertThreeDigitNumberToWords(numberChunks[i]) + " " + suffixes[i] + " " + result;
|
||||
function convertNumberToWords(number) {
|
||||
if (number === 0) {
|
||||
return numberWords[number];
|
||||
}
|
||||
|
||||
let word = '';
|
||||
|
||||
if (number >= 10000000) {
|
||||
word += convertNumberToWords(Math.floor(number / 10000000)) + " Crore ";
|
||||
number %= 10000000;
|
||||
}
|
||||
|
||||
if (number >= 100000) {
|
||||
word += convertNumberToWords(Math.floor(number / 100000)) + " Lakh ";
|
||||
number %= 100000;
|
||||
}
|
||||
|
||||
if (number >= 1000) {
|
||||
word += convertNumberToWords(Math.floor(number / 1000)) + " Thousand ";
|
||||
number %= 1000;
|
||||
}
|
||||
|
||||
if (number >= 100) {
|
||||
word += convertNumberToWords(Math.floor(number / 100)) + " Hundred ";
|
||||
number %= 100;
|
||||
}
|
||||
|
||||
if (number > 0) {
|
||||
if (word !== '') {
|
||||
word += "and ";
|
||||
}
|
||||
if (number <= 20) {
|
||||
word += numberWords[number];
|
||||
} else {
|
||||
word += numberWords[Math.floor(number / 10) * 10] + " " + numberWords[number % 10];
|
||||
}
|
||||
}
|
||||
|
||||
return result.trim();
|
||||
return word.trim();
|
||||
}
|
||||
|
||||
// Function to convert a three-digit number into words
|
||||
function convertThreeDigitNumberToWords(num) {
|
||||
var ones = ["", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"];
|
||||
var tens = ["", "Ten", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"];
|
||||
var teens = ["", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen"];
|
||||
|
||||
var words = "";
|
||||
|
||||
// Convert hundreds place
|
||||
if (Math.floor(num / 100) > 0) {
|
||||
words += ones[Math.floor(num / 100)] + " Hundred ";
|
||||
num %= 100;
|
||||
}
|
||||
|
||||
// Convert tens and ones place
|
||||
if (num >= 20) {
|
||||
words += tens[Math.floor(num / 10)] + " ";
|
||||
num %= 10;
|
||||
} else if (num >= 11 && num <= 19) {
|
||||
words += teens[num - 10] + " ";
|
||||
num = 0;
|
||||
}
|
||||
|
||||
if (num > 0) {
|
||||
words += ones[num] + " ";
|
||||
}
|
||||
|
||||
return words.trim();
|
||||
function convertCommaNumberToWords(input) {
|
||||
const number = parseInt(input.replace(/,/g, ''), 10);
|
||||
return convertNumberToWords(number);
|
||||
}
|
||||
|
||||
function onlyNumbers(event){
|
||||
var charcode;
|
||||
charcode = event.which || event.keyCode;
|
||||
if(charcode>= 48 && charcode <= 57)return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function formatNumber(input) {
|
||||
var value = input.value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
input.value = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@ -1,131 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>nHANCE</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
|
||||
<meta content="Coderthemes" name="author" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<!-- App favicon -->
|
||||
<link rel="shortcut icon" href="<?= base_url()."public"; ?>/assets/images/favicon.ico">
|
||||
|
||||
<!-- App css -->
|
||||
<link href="<?= base_url()."public"; ?>/assets/css/bootstrap-material.min.css" rel="stylesheet" type="text/css"
|
||||
id="bs-default-stylesheet" />
|
||||
<link href="<?= base_url()."public"; ?>/assets/css/app-material.min.css" rel="stylesheet" type="text/css"
|
||||
id="app-default-stylesheet" />
|
||||
|
||||
<link href="<?= base_url()."public"; ?>/assets/css/bootstrap-material-dark.min.css" rel="stylesheet" type="text/css"
|
||||
id="bs-dark-stylesheet" />
|
||||
<link href="<?= base_url()."public"; ?>/assets/css/app-material-dark.min.css" rel="stylesheet" type="text/css"
|
||||
id="app-dark-stylesheet" />
|
||||
|
||||
<!-- icons -->
|
||||
<link href="<?= base_url()."public"; ?>/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<style>
|
||||
a:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="loading auth-fluid-pages pb-0">
|
||||
|
||||
<!-- <div class="auth-fluid"> -->
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Contextual classes</h4>
|
||||
<p class="sub-header">
|
||||
Use contextual classes to color table rows or individual cells.
|
||||
</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Column heading</th>
|
||||
<th>Column heading</th>
|
||||
<th>Column heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="table-active">
|
||||
<th scope="row">1</th>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">2</th>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="table-success">
|
||||
<th scope="row">3</th>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">4</th>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="table-info">
|
||||
<th scope="row">5</th>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">6</th>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="table-warning">
|
||||
<th scope="row">7</th>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">8</th>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
<tr class="table-danger">
|
||||
<th scope="row">9</th>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
<td>Column content</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end table-responsive-->
|
||||
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
</div> <!-- end col -->
|
||||
<div class="row" id="List-page">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 class="header-title" style="position: relative;">Excel Error List</h4>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- end auth-fluid-->
|
||||
|
||||
<!-- Vendor js -->
|
||||
<script src="<?= base_url()."public"; ?>/assets/js/vendor.min.js"></script>
|
||||
<!-- App js -->
|
||||
<script src="<?= base_url()."public"; ?>/assets/js/app.min.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<?php foreach ($excel_header as $header): ?>
|
||||
<th><?php echo $header; ?></th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php for ($i = 1; $i < count($excel_data); $i++): ?>
|
||||
<tr>
|
||||
<?php foreach ($excel_data[$i] as $data): ?>
|
||||
<td><?php echo $data; ?></td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endfor; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
||||
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<title>nHance</title>
|
||||
<title><?= isset($page_name) ? $page_name : 'nHance'; ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="" name="description" />
|
||||
<meta content="nHANCE" name="nHANCE" />
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
.radiobuttondiv{
|
||||
margin-left: 32px;
|
||||
}
|
||||
.form-control-client-policy-master{
|
||||
.{
|
||||
width:62% !important;
|
||||
margin-left: 30px;
|
||||
margin-top: 3px
|
||||
@ -49,10 +49,10 @@
|
||||
display:none;
|
||||
}
|
||||
.jodit-container{
|
||||
width: 821px !important;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 3px;
|
||||
margin-left: 30px;
|
||||
/* width: 821px !important; */
|
||||
/* margin-top: 3px; */
|
||||
/* margin-bottom: 3px; */
|
||||
/* margin-left: 30px; */
|
||||
/* height: 0px !important; */
|
||||
/* min-height: 100px !important; */
|
||||
}
|
||||
@ -65,7 +65,7 @@
|
||||
.jodit-wysiwyg{
|
||||
margin-bottom: 162px;
|
||||
}
|
||||
.form-control-client-policy-masters{
|
||||
.s{
|
||||
margin-left: 30px;
|
||||
width: 689px;
|
||||
}
|
||||
@ -75,124 +75,179 @@
|
||||
|
||||
<div id="policyGMCTerms" style="display:none">
|
||||
<span id="policyGMCTermsClose" style="float: right;font-size: 26px;color: red;margin-top: -42px;margin-left: 3px;margin-right: 7px;">x</span>
|
||||
<h5><label for="gmcTerms" style="margin-bottom: 20px;">Policy GMC Terms</label></h5>
|
||||
<h5><label for="gmcTerms" style="margin-bottom: 20px;">Policy Terms <span id="nameOfThePolicyInGMC"></span></label></h5>
|
||||
<form role="form" class="parsley-examples" method="post" id="policyJsonForm" enctype="multipart/form-data" >
|
||||
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"/>
|
||||
<input type="hidden" name="client_id" id="Client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
|
||||
<input type="hidden" name="client_policy_id" id="client_policy_id" />
|
||||
<input type="hidden" name="client_policy_id" id="gmc_client_policy_id" />
|
||||
<input type="hidden" name="policy_id" id="policy_id"/>
|
||||
<input type="hidden" id="gmc_emp_count"/>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-column">
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Sum Insured</label>
|
||||
<input type="text" name="sum_insured" id="sum_insured" class="form-control form-control-client-policy-master">
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="sumInsured">Sum Insured</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class=" " style="width: 400px;">Family Floater</label><br>
|
||||
<div class="flex-container">
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="family_floater" value="1"> Yes
|
||||
<input type="radio" name="family_floater" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
<div style="display:none; margin-top: 27px;margin-bottom: 7px; margin-left: 31px;">
|
||||
<div>
|
||||
<input type="checkbox" name="family_floaters[]" value="self" id="self" checked disabled> Self
|
||||
<input type="checkbox" name="family_floaters[]" value="spouse" id="spouse"> Spouse
|
||||
<input type="checkbox" name="family_floaters[]" value="child1" id="child1"> Child 1
|
||||
<input type="checkbox" name="family_floaters[]" value="child2" id="child2"> Child 2
|
||||
<input type="checkbox" name="family_floaters[]" value="child3" id="child3"> Child 3
|
||||
<input type="checkbox" name="family_floaters[]" value="child4" id="child4"> Child 4
|
||||
</div>
|
||||
<div style="margin-top:10px">
|
||||
<input type="checkbox" name="family_floaters[]" value="parent1" id="parent1"> Parent 1
|
||||
<input type="checkbox" name="family_floaters[]" value="parent2" id="parent2"> Parent 2
|
||||
<input type="checkbox" name="family_floaters[]" value="parent_in_law1" id="parent_in_law1"> Parent-In-Law 1
|
||||
<input type="checkbox" name="family_floaters[]" value="parent_in_law2" id="parent_in_law2"> Parent-In-Law 2
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="sum_insured" id="sum_insured" class="form-control" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div id='numberToWordGMC' class="text-danger" ></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Family Floater</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="family_floater" value="1"> Yes
|
||||
<input type="radio" name="family_floater" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div>
|
||||
<input type="checkbox" name="family_floaters[]" value="self" id="self" checked disabled> Self
|
||||
<input type="checkbox" name="family_floaters[]" value="spouse" id="spouse"> Spouse
|
||||
<input type="checkbox" name="family_floaters[]" value="child1" id="child1"> Child 1
|
||||
<input type="checkbox" name="family_floaters[]" value="child2" id="child2"> Child 2
|
||||
<input type="checkbox" name="family_floaters[]" value="child3" id="child3"> Child 3
|
||||
<input type="checkbox" name="family_floaters[]" value="child4" id="child4"> Child 4
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label class="form-check-label " for="corporatebuffer" style="width: 400px;">Corporate Buffer</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="corporatebuffer" value="1"> Yes
|
||||
<input type="radio" name="corporatebuffer" value="0" style="margin-left:10px"> No
|
||||
<div style="margin-top:10px">
|
||||
<input type="checkbox" name="family_floaters[]" value="parent1" id="parent1"> Parent 1
|
||||
<input type="checkbox" name="family_floaters[]" value="parent2" id="parent2"> Parent 2
|
||||
<input type="checkbox" name="family_floaters[]" value="parent_in_law1" id="parent_in_law1"> Parent-In-Law 1
|
||||
<input type="checkbox" name="family_floaters[]" value="parent_in_law2" id="parent_in_law2"> Parent-In-Law 2
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Corporate Buffer</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="waiverofpreexistingdiseases" style="width: 400px;">Waiver of Pre-existing Diseases</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="waiverofpreexistingdiseases" value="1"> Yes, waived off
|
||||
<input type="radio" name="waiverofpreexistingdiseases" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="corporatebuffer" value="1"> Yes
|
||||
<input type="radio" name="corporatebuffer" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Waiver of Pre-existing Diseases</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Maternity Coverage</label>
|
||||
<input type="text" name="maternitycoverage" id="maternitycoverage" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="waiverofpreexistingdiseases" value="1"> Yes, waived off
|
||||
<input type="radio" name="waiverofpreexistingdiseases" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Maternity Coverage</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="emp_code" class=" " style="width: 400px; ">Twin Delivery</label>
|
||||
<input type="text" name="twindelivery" id="twindelivery" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="maternitycoverage" id="maternitycoverage" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Twin Delivery</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="emp_code" class=" " style="width: 400px; ">Pre and Post natal</label>
|
||||
<input type="text" name="preandpostnatal" id="preandpostnatal" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="twindelivery" id="twindelivery" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Pre and Post natal</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="emp_code" class=" " style="width: 400px; ">Baby Day 1 Cover</label>
|
||||
<input type="text" name="babyday1cover" id="babyday1cover" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="preandpostnatal" id="preandpostnatal" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Baby Day 1 Cover</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="9monthwaitingperiodwaived" style="width: 400px;">9-month waiting Period –waived</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="9monthwaitingperiodwaived" value="1"> Yes, waived off
|
||||
<input type="radio" name="9monthwaitingperiodwaived" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="babyday1cover" id="babyday1cover" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">9-month waiting Period –waived</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Cover from the date of Joining</label>
|
||||
<input type="text" name="coverfromthedateofjoining" id="coverfromthedateofjoining" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="9monthwaitingperiodwaived" value="1"> Yes, waived off
|
||||
<input type="radio" name="9monthwaitingperiodwaived" value="0" style="margin-left:10px"> No </div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Cover from the date of Joining</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="waiverof1,2,3&4thyearexclusions" style="width: 400px;">Waiver of 1, 2, 3 & 4th year Exclusions</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="waiverof1,2,3&4thyearexclusions" value="1"> Yes, waived off
|
||||
<input type="radio" name="waiverof1,2,3&4thyearexclusions" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="coverfromthedateofjoining" id="coverfromthedateofjoining" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Waiver of 1, 2, 3 & 4th year Exclusions</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="waiverof30dayswaitingperiod" style="width: 400px;">Waiver of 30 days waiting period</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="waiverof30dayswaitingperiod" value="1"> Yes, waived off
|
||||
<input type="radio" name="waiverof30dayswaitingperiod" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="waiverof1,2,3&4thyearexclusions" value="1"> Yes, waived off
|
||||
<input type="radio" name="waiverof1,2,3&4thyearexclusions" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Waiver of 30 days waiting period</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Pre Hospitalization Cover</label>
|
||||
<input type="text" name="prehospitalizationcover" id="prehospitalizationcover" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="waiverof30dayswaitingperiod" value="1"> Yes, waived off
|
||||
<input type="radio" name="waiverof30dayswaitingperiod" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Pre Hospitalization Cover</label>
|
||||
</div>
|
||||
<!-- <div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Post Hospitalization Cover</label>
|
||||
<input type="text" name="posthospitalizationcover" id="posthospitalizationcover" class="form-control form-control-client-policy-master">
|
||||
</div> -->
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="congenitaldiseasesinternal" style="width: 400px;">Congenital Diseases - Internal</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="congenitaldiseasesinternal" value="internal"> Internal Covered
|
||||
<input type="radio" name="congenitaldiseasesinternal" value="no" style="margin-left:10px"> No
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="prehospitalizationcover" id="prehospitalizationcover" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Congenital Diseases - Internal</label>
|
||||
</div>
|
||||
<!-- <div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="congenitaldiseasesexternal" style="width: 400px;">Congenital Diseases - External</label>
|
||||
<input type="text" name="congenitaldiseasesexternal" id="congenitaldiseasesexternal" class="form-control form-control-client-policy-master">
|
||||
</div> -->
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="copayzonewisecopay" class=" " style="width: 400px;">Co-Pay/Zone wise Co Pay</label>
|
||||
<select name="copayzonewisecopay" id="copayzonewisecopay" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="congenitaldiseasesinternal" value="internal"> Internal Covered
|
||||
<input type="radio" name="congenitaldiseasesinternal" value="no" style="margin-left:10px"> No </div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Co-Pay/Zone wise Co Pay</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select name="copayzonewisecopay" id="copayzonewisecopay" class="form-control ">
|
||||
<option value="">Select an option</option>
|
||||
<option value="5%">5%</option>
|
||||
<option value="10%">10%</option>
|
||||
@ -205,136 +260,232 @@
|
||||
<option value="45%">45%</option>
|
||||
<option value="50%">50%</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Bio absorbable stent / Toric lens/ Multi Focal lens</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Bio absorbable stent / Toric lens/ Multi Focal lens</label>
|
||||
<input type="text" name="bioabsorbablestenttoriclensmultifocallens" id="bioabsorbablestenttoriclensmultifocallens" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="bioabsorbablestenttoriclensmultifocallens" id="bioabsorbablestenttoriclensmultifocallens" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Room Rent Limit</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Room Rent Limit</label>
|
||||
<input type="text" name="roomrentlimit" id="roomrentlimit" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="roomrentlimit" id="roomrentlimit" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Proportionate Deduction Clause</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="proportionatedeductionclause" class=" " style="width: 400px;">Proportionate Deduction Clause</label>
|
||||
<select name="proportionatedeductionclause" id="proportionatedeductionclause" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<select name="proportionatedeductionclause" id="proportionatedeductionclause" class="form-control ">
|
||||
<option value="">Select an option</option>
|
||||
<option value="NotApplicable/WaivedOff">Not Applicable / Waived Off</option>
|
||||
<option value="Applicable">Applicable</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Nursing Allowance</label>
|
||||
<input type="text" name="nursingallowance" id="nursingallowance" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="ailmentcapping" style="width: 400px;">Ailment capping</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="ailmentcapping" value="1"> Yes
|
||||
<input type="radio" name="ailmentcapping" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Ambulance Charges</label>
|
||||
<input type="text" name="ambulancecharges" id="ambulancecharges" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Air Ambulance</label>
|
||||
<input type="text" name="airambulance" id="airambulance" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Family Transportation Benefit</label>
|
||||
<input type="text" name="familytransportationbenefit" id="familytransportationbenefit" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="reasonableandcustomarycharges" style="width: 400px;">Reasonable and Customary Charges</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="reasonableandcustomarycharges" value="1">Applicable
|
||||
<input type="radio" name="reasonableandcustomarycharges" value="0" style="margin-left:10px">Not Applicable
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Day Care Treatment</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="daycaretreatment" value="1"> Yes
|
||||
<input type="radio" name="daycaretreatment" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="ayudhtreatmentcover" style="width: 400px;">AYUSH treatment cover</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="ayudhtreatmentcover" value="1"> Yes
|
||||
<input type="radio" name="ayudhtreatmentcover" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">ARMD Covered</label>
|
||||
<input type="text" name="armdcovered" id="armdcovered" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Sum Insured enhancement</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="suminsuredenhancement" value="1"> Yes
|
||||
<input type="radio" name="suminsuredenhancement" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Automatic Sum Insured reinstatement</label>
|
||||
<input type="text" name="automaticsuminsuredreinstatement" id="automaticsuminsuredreinstatement" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Additional Sickness Benefit</label>
|
||||
<textarea name="additionalsicknessbenefit" id="additionalsicknessbenefit" class="form-control form-control-client-policy-master"></textarea>
|
||||
</div>
|
||||
<!-- <div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Additional Sickness Benefit</label>
|
||||
<input type="text" name="additionalsicknessbenefit" id="additionalsicknessbenefit" class="form-control form-control-client-policy-master">
|
||||
</div> -->
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Lasik Surgery</label>
|
||||
<input type="text" name="lasiksurgery" id="lasiksurgery" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Mid Term inclusion</label>
|
||||
<input type="text" name="midterminclusion" id="midterminclusion" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">CAPD</label>
|
||||
<input type="text" name="capd" id="capd" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Organ donor expenses</label>
|
||||
<input type="text" name="organdonorexpenses" id="organdonorexpenses" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Modern treatments as per IRDAI</label>
|
||||
<input type="text" name="moderntreatmentsasperirdai" id="moderntreatmentsasperirdai" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="emp_code" class=" " style="width: 400px;">Wellness</label>
|
||||
<textarea name="Wellness" id="Wellness" class="form-control form-control-client-policy-master"></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="days_of_discharge" class=" ">Days of Discharge</label>
|
||||
<div class="input-group mb-3" style="margin-left: 0px;">
|
||||
<input type="text" id="days_of_discharge" name="days_of_discharge" class="form-control form-control-client-policy-master" placeholder="Enter the number of days">
|
||||
<div class="input-group-append input-group-append-client-policy-master">
|
||||
<span class="input-group-text" id="basic-addon2">Days</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="days_from_dod" class=" ">Days from DOD</label>
|
||||
<div class="input-group mb-3" style="margin-left: 0px;">
|
||||
<input type="text" id="days_from_dod" name="days_from_dod" class="form-control form-control-client-policy-master" placeholder="Enter the number of days">
|
||||
<div class="input-group-append input-group-append-client-policy-master">
|
||||
<span class="input-group-text" id="basic-addon2">Days</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Nursing Allowance</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="nursingallowance" id="nursingallowance" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Ailment capping</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="ailmentcapping" value="1"> Yes
|
||||
<input type="radio" name="ailmentcapping" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Ambulance Charges</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="ambulancecharges" id="ambulancecharges" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Air Ambulance</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="airambulance" id="airambulance" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Family Transportation Benefit</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="familytransportationbenefit" id="familytransportationbenefit" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Reasonable and Customary Charges</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="reasonableandcustomarycharges" value="1">Applicable
|
||||
<input type="radio" name="reasonableandcustomarycharges" value="0" style="margin-left:10px">Not Applicable </div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Day Care Treatment</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="daycaretreatment" value="1"> Yes
|
||||
<input type="radio" name="daycaretreatment" value="0" style="margin-left:10px"> No </div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">AYUSH treatment cover</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="ayudhtreatmentcover" value="1"> Yes
|
||||
<input type="radio" name="ayudhtreatmentcover" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">ARMD Covered</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="armdcovered" id="armdcovered" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Sum Insured enhancement</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="suminsuredenhancement" value="1"> Yes
|
||||
<input type="radio" name="suminsuredenhancement" value="0" style="margin-left:10px"> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Automatic Sum Insured reinstatement</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="automaticsuminsuredreinstatement" id="automaticsuminsuredreinstatement" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Additional Sickness Benefit</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<textarea name="additionalsicknessbenefit" id="additionalsicknessbenefit" class="form-control "></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Lasik Surgery</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="lasiksurgery" id="lasiksurgery" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Mid Term inclusion</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="midterminclusion" id="midterminclusion" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">CAPD</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="capd" id="capd" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Organ donor expenses</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="organdonorexpenses" id="organdonorexpenses" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Modern treatments as per IRDAI</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="moderntreatmentsasperirdai" id="moderntreatmentsasperirdai" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Wellness</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<textarea name="Wellness" id="Wellness" class="form-control "></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Days of Discharge</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="days_of_discharge" name="days_of_discharge" class="form-control " placeholder="Enter the number of days">
|
||||
<div class="input-group-append input-group-append-client-policy-master">
|
||||
<span class="input-group-text" id="basic-addon2">Days</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Days from DOD</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="days_from_dod" name="days_from_dod" class="form-control " placeholder="Enter the number of days">
|
||||
<div class="input-group-append input-group-append-client-policy-master">
|
||||
<span class="input-group-text" id="basic-addon2">Days</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <hr> -->
|
||||
|
||||
@ -365,20 +516,20 @@ var grid_html = '';
|
||||
});
|
||||
|
||||
|
||||
$('input[name="family_floater"]').change(function() {
|
||||
console.log($(this).val());
|
||||
if ($(this).val() == '1') {
|
||||
var element = $(this).parent().next()[0];
|
||||
$(element).css("display", "block");
|
||||
var element2 = $(this).parent().parent().parent().next()[0];
|
||||
$(element2).css("display", "");
|
||||
} else {
|
||||
var element = $(this).parent().next()[0];
|
||||
$(element).css("display", "none");
|
||||
var element2 = $(this).parent().parent().parent().next()[0];
|
||||
$(element2).css("display", "none");
|
||||
}
|
||||
});
|
||||
// $('input[name="family_floater"]').change(function() {
|
||||
// console.log($(this).val());
|
||||
// if ($(this).val() == '1') {
|
||||
// var element = $(this).parent().next()[0];
|
||||
// $(element).css("display", "block");
|
||||
// var element2 = $(this).parent().parent().parent().next()[0];
|
||||
// $(element2).css("display", "");
|
||||
// } else {
|
||||
// var element = $(this).parent().next()[0];
|
||||
// $(element).css("display", "none");
|
||||
// var element2 = $(this).parent().parent().parent().next()[0];
|
||||
// $(element2).css("display", "none");
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
$('input[name="waiverofpreexistingdiseases"]').change(function() {
|
||||
@ -465,17 +616,15 @@ var grid_html = '';
|
||||
|
||||
$('body').on('click', '.btnPolicyMaster', function () {
|
||||
|
||||
var policy_id = $(this).data('id');
|
||||
$('#policy_id').val(policy_id);
|
||||
var client_policy_id = $(this).data('id');
|
||||
console.log('gmc_client_policy_id :' ,client_policy_id);
|
||||
|
||||
var client_id = $('#Client_id').val();
|
||||
$('#client_policy_id').val(policy_id);
|
||||
$('#gmc_client_policy_id').val(client_policy_id)
|
||||
|
||||
var policy_type_id = $(this).attr('id');
|
||||
console.log('policy_type_id', typeof policy_type_id)
|
||||
|
||||
|
||||
if(policy_type_id >= '2'){
|
||||
|
||||
|
||||
var gmc_policy_type_id = $(this).attr('id');
|
||||
if(gmc_policy_type_id >= '2'){
|
||||
|
||||
$('#policyGMCTerms').css('display', '');
|
||||
$('#police-tab').css('display', 'none');
|
||||
@ -486,10 +635,12 @@ var grid_html = '';
|
||||
$.ajax({
|
||||
url: '<?= base_url("client/policy/getterms") ?>',
|
||||
method: 'GET',
|
||||
data: { policy_id : policy_id , client_id: client_id},
|
||||
data: {client_policy_id: client_policy_id},
|
||||
success: function(response) {
|
||||
|
||||
$('gmc_emp_count').val(response.count)
|
||||
$('#nameOfThePolicyInGMC').html(' - ' + response.policy_name.name);
|
||||
$('gmc_emp_count').val(response.count);
|
||||
|
||||
if(response.count){
|
||||
|
||||
$('emp_count').val(response.count)
|
||||
@ -598,6 +749,15 @@ var grid_html = '';
|
||||
|
||||
});
|
||||
|
||||
$("#sum_insured").on("keyup", function() {
|
||||
var inputNumber = $(this).val();
|
||||
if (inputNumber) {
|
||||
var result = convertCommaNumberToWords(inputNumber);
|
||||
$("#numberToWordGMC").text(result);
|
||||
} else {
|
||||
$("#numberToWordGMC").text("");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@ -631,7 +791,7 @@ var grid_html = '';
|
||||
var index =$('.modifyclassinput').length;
|
||||
var appendElement =`<div class="form-group col-md-6 form-group-client-policy-masters removeDom">
|
||||
<label for="specialconditionlabel" class="special_condition_label[]" style="width: 400px;"><input name="special_condition_label[]" id="special_condition_label[]"><span class="specialConditionClose" style="color: red;margin-left: 20px;">X</span></label>
|
||||
<input type="text" name="special_condition_input[]" id="special_condition_input[]" class="form-control form-control-client-policy-masters special_condition_input[]">
|
||||
<input type="text" name="special_condition_input[]" id="special_condition_input[]" class="form-control s special_condition_input[]">
|
||||
</div>`;
|
||||
$('.form-column').each(function() {
|
||||
$(this).append(appendElement);
|
||||
@ -656,4 +816,15 @@ var grid_html = '';
|
||||
$('.nav.nav-pills.navtab-bg').prev().css('display','');
|
||||
});
|
||||
|
||||
// function formatNumber(input) {
|
||||
// // Remove non-numeric characters
|
||||
// let value = input.value.replace(/\D/g, '');
|
||||
|
||||
// // Add commas
|
||||
// value = Number(value).toLocaleString('en-IN');
|
||||
|
||||
// // Update the input value
|
||||
// input.value = value;
|
||||
// }
|
||||
|
||||
</script>
|
||||
@ -53,10 +53,10 @@
|
||||
display:none;
|
||||
}
|
||||
.jodit-container{
|
||||
width: 690px !important;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 3px;
|
||||
margin-left: 30px;
|
||||
/* width: 690px !important; */
|
||||
/* margin-top: 3px; */
|
||||
/* margin-bottom: 3px; */
|
||||
/* margin-left: 30px; */
|
||||
/* height: 0px !important; */
|
||||
/* min-height: 100px !important; */
|
||||
}
|
||||
@ -77,171 +77,224 @@
|
||||
|
||||
<div id="policyGPATermsForm" style="display:none">
|
||||
<span id="policyGPATermsClose" style="float: right;font-size: 26px;color: red;margin-top: -42px;margin-left: 3px;margin-right: 7px;">x</span>
|
||||
<h5><label for="gpaTerms" style="margin-bottom: 20px;">Policy GMC Terms</label></h5>
|
||||
<h5><label for="gpaTerms" style="margin-bottom: 20px;">Policy Terms <span id="nameOfThePolicyInGPA"></span></label></h5>
|
||||
<form role="form" class="parsley-examples" method="post" id="policyGPATerms" enctype="multipart/form-data">
|
||||
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"/>
|
||||
<input type="hidden" name="client_id" id="Client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
|
||||
<input type="hidden" name="client_policy_id" id="client_policy_id" />
|
||||
<input type="hidden" name="client_policy_id" id="gpa_client_policy_id" />
|
||||
<input type="hidden" name="policy_id" id="gpa_policy_id"/>
|
||||
<input type="hidden" id="emp_count"/>
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-column">
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="sumInsured">Sum Insured</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="sumInsured2" id="sumInsured2" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" style="width: 100% !important;">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div id='numberToWordSumInsured' class="text-danger" ></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="sumInsured" class=" " style="width: 400px;">Sum Insured</label>
|
||||
<input type="text" name="sumInsured2" id="sumInsured2" class="form-control form-control-client-policy-master"> <br>
|
||||
</div>
|
||||
|
||||
<div id='numberToWord' class="text-danger"></div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="totalSumInsured" class=" " style="width: 400px;">Total Sum Insured</label>
|
||||
<input type="text" name="totalSumInsured" id="totalSumInsured" class="form-control form-control-client-policy-master">
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Total Sum Insured</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label class="form-check-label " for="corporatebuffer" style="width: 400px;">Accidental Death Benefit</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="accidentalDeathBenefit" value="1"> Yes
|
||||
<input type="radio" name="accidentalDeathBenefit" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" style="width: 100% !important;" class="form-control" name="totalSumInsured" id="totalSumInsured" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div id='numberToWordTotalSumInsured' class="text-danger" ></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Accidental Death Benefit</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="permanentTotalDisablement" class=" " style="width: 400px;">Permanent Total Disablement</label>
|
||||
<input type="text" name="permanentTotalDisablement" id="permanentTotalDisablement" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="accidentalDeathBenefit" value="1"> Yes
|
||||
<input type="radio" name="accidentalDeathBenefit" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Permanent Total Disablement</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="permanentPartialDisablement" class=" " style="width: 400px;">Permanent Partial Disablement</label>
|
||||
<input type="text" name="permanentPartialDisablement" id="permanentPartialDisablement" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="permanentTotalDisablement" id="permanentTotalDisablement" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Permanent Partial Disablement</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="temporaryTotalDisablementBenefit" class=" " style="width: 400px;">Temporary Total Disablement benefit</label>
|
||||
<input type="text" name="temporaryTotalDisablementBenefit" id="temporaryTotalDisablementBenefit" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="permanentPartialDisablement" id="permanentPartialDisablement" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Temporary Total Disablement benefit</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="accidentalHospitalizationExpenses" class=" " style="width: 400px;">Accidental Hospitalization Expenses</label>
|
||||
<select name="accidentalHospitalizationExpenses" id="accidentalHospitalizationExpenses" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="temporaryTotalDisablementBenefit" id="temporaryTotalDisablementBenefit" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Accidental Hospitalization Expenses</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select name="accidentalHospitalizationExpenses" id="accidentalHospitalizationExpenses" class="form-control">
|
||||
<option value="">Select an option</option>
|
||||
<option value="No">No</option>
|
||||
<option value="10%-40%">Covered upto 10% of SI or 40% of actual which ever is less</option>
|
||||
<option value="20%-50%">Covered upto 20% of SI or 50% of actual which ever is less</option>
|
||||
<option value="50K-500k">INR 50K, to vary in multiples of 25K till 5 Lacs</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Children Education Welfare Fund</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="childrenEducationWelfareFund" class=" " style="width: 400px;">Children Education Welfare Fund</label>
|
||||
<select name="childrenEducationWelfareFund" id="childrenEducationWelfareFund" class="form-control form-control-client-policy-master">
|
||||
<div class="col-md-6">
|
||||
<select name="childrenEducationWelfareFund" id="childrenEducationWelfareFund" class="form-control">
|
||||
<option value="">Select an option</option>
|
||||
<option value="No">No</option>
|
||||
<option value="10000">Covered upto 10,000/ per child ( Restricted to 2 children)</option>
|
||||
<option value="5000">Covered upto 5,000/ per child ( Restricted to 2 children)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="compassionateVisitExpenses" style="width: 400px;">Compassionate Visit Expenses</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="compassionateVisitExpenses" value="1"> Yes
|
||||
<input type="radio" name="compassionateVisitExpenses" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="compassionateVisitExpensesData" class=" " style="width: 400px; ">Compassionate Visit Expenses Data</label>
|
||||
<input type="text" name="compassionateVisitExpensesData" id="compassionateVisitExpensesData" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="brokenBoneExpenses" style="width: 400px;">Broken Bone Expenses</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="brokenBoneExpenses" value="1"> Yes
|
||||
<input type="radio" name="brokenBoneExpenses" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="brokenBoneExpensesData" class=" " style="width: 400px; ">Broken Bone Expenses Data</label>
|
||||
<input type="text" name="brokenBoneExpensesData" id="brokenBoneExpensesData" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="ambulanceCharges" style="width: 400px;">Ambulance charges</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="ambulanceCharges" value="1"> Yes
|
||||
<input type="radio" name="ambulanceCharges" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="ambulanceChargesData" class=" " style="width: 400px; ">Ambulance charges Data</label>
|
||||
<input type="text" name="ambulanceChargesData" id="ambulanceChargesData" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="burnExpenses" style="width: 400px;">Burn Expenses</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="burnExpenses" value="1"> Yes
|
||||
<input type="radio" name="burnExpenses" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="burnExpensesData" class=" " style="width: 400px; ">Burn Expenses Data</label>
|
||||
<input type="text" name="burnExpensesData" id="burnExpensesData" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="carriageOfDeadBody" style="width: 400px;">Carriage of Dead Body</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="carriageOfDeadBody" value="1"> Yes
|
||||
<input type="radio" name="carriageOfDeadBody" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||
<label for="carriageOfDeadBodyData" class=" " style="width: 400px; ">Carriage of Dead Body Data</label>
|
||||
<input type="text" name="carriageOfDeadBodyData" id="carriageOfDeadBodyData" class="form-control form-control-client-policy-master">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label " for="animalSnakeInsectBite" style="width: 400px;">Animal/Snake/Insect bite</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="animalSnakeInsectBite" value="1"> Yes
|
||||
<input type="radio" name="animalSnakeInsectBite" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label class="form-check-label" for="terrorism" style="width: 400px;">Terrorism</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="terrorism" value="1"> Yes
|
||||
<input type="radio" name="terrorism" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||
<label for="worldwideCover" class=" " style="width: 400px;">Worldwide Cover</label>
|
||||
<div class="radiobuttondiv">
|
||||
<input type="radio" name="worldwideCover" value="1"> Yes
|
||||
<input type="radio" name="worldwideCover" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Compassionate Visit Expenses</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="compassionateVisitExpenses" value="1"> Yes
|
||||
<input type="radio" name="compassionateVisitExpenses" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Compassionate Visit Expenses Data</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="compassionateVisitExpensesData" id="compassionateVisitExpensesData" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Broken Bone Expenses</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="brokenBoneExpenses" value="1"> Yes
|
||||
<input type="radio" name="brokenBoneExpenses" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Broken Bone Expenses Data</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="brokenBoneExpensesData" id="brokenBoneExpensesData" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured"> Ambulance charges</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="ambulanceCharges" value="1"> Yes
|
||||
<input type="radio" name="ambulanceCharges" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Ambulance charges Data</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="ambulanceChargesData" id="ambulanceChargesData" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured"> Burn Expenses</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="burnExpenses" value="1"> Yes
|
||||
<input type="radio" name="burnExpenses" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Burn Expenses Data</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="burnExpensesData" id="burnExpensesData" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Carriage of Dead Body</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="carriageOfDeadBody" value="1"> Yes
|
||||
<input type="radio" name="carriageOfDeadBody" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Carriage of Dead Body Data</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="carriageOfDeadBodyData" id="carriageOfDeadBodyData" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Animal/Snake/Insect bite</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="animalSnakeInsectBite" value="1"> Yes
|
||||
<input type="radio" name="animalSnakeInsectBite" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Terrorism</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="terrorism" value="1"> Yes
|
||||
<input type="radio" name="terrorism" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Worldwide Cover</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="radio" name="worldwideCover" value="1"> Yes
|
||||
<input type="radio" name="worldwideCover" value="0" style="margin-left:10px" checked> No
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0" style="margin-top: -49px;">
|
||||
|
||||
|
||||
<div class="form-group text-right m-b-0" style="margin-top: -49px;">
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGPATermsSubmit" style="margin-top: 100px;">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -388,18 +441,15 @@
|
||||
|
||||
$('body').on('click', '.btnPolicyMaster', function () {
|
||||
|
||||
var policy_id = $(this).data('id');
|
||||
console.log('policy_id :' ,policy_id);
|
||||
$('#gpa_policy_id').val(policy_id);
|
||||
var client_policy_id = $(this).data('id');
|
||||
console.log('client_policy_id :' ,client_policy_id);
|
||||
|
||||
var client_id = $('#Client_id').val();
|
||||
console.log('client_id :' ,client_id);
|
||||
$('#client_policy_id').val(client_id);
|
||||
$('#gpa_client_policy_id').val(client_policy_id);
|
||||
|
||||
var policy_type_id = $(this).attr('id');
|
||||
console.log('policy_type_id', policy_type_id)
|
||||
var gpa_policy_type_id = $(this).attr('id');
|
||||
console.log('gpa_policy_type_id', gpa_policy_type_id)
|
||||
|
||||
if(policy_type_id == '1'){
|
||||
if(gpa_policy_type_id == '1'){
|
||||
|
||||
$('#policyGPATermsForm').css('display', '');
|
||||
$('#police-tab').css('display', 'none');
|
||||
@ -410,12 +460,15 @@
|
||||
$.ajax({
|
||||
url: '<?= base_url("client/policy/getterms") ?>',
|
||||
method: 'GET',
|
||||
data: { policy_id : policy_id , client_id: client_id},
|
||||
data: {client_policy_id: client_policy_id},
|
||||
success: function(res) {
|
||||
|
||||
console.log(res)
|
||||
$('#nameOfThePolicyInGPA').html(' - ' + res.policy_name.name);
|
||||
|
||||
if(res.count){
|
||||
|
||||
$('emp_count').val(res.count)
|
||||
$('#emp_count').val(res.count)
|
||||
if(res.count === false){
|
||||
$("#btnGPATermsSubmit").prop("disabled", true);
|
||||
}else{
|
||||
@ -427,7 +480,8 @@
|
||||
if (res) {
|
||||
|
||||
let jsonObject = JSON.parse(res.data);
|
||||
|
||||
$("#numberToWordSumInsured").text(convertCommaNumberToWords(jsonObject.sumInsured2));
|
||||
$("#numberToWordTotalSumInsured").text(convertCommaNumberToWords(jsonObject.totalSumInsured));
|
||||
if(jsonObject.compassionateVisitExpenses == '1'){
|
||||
var element = $('input[name="compassionateVisitExpenses"]').parent().parent().next()[0];
|
||||
$(element).css("display", "");
|
||||
@ -499,13 +553,37 @@
|
||||
|
||||
|
||||
$("#sumInsured2").on("keyup", function() {
|
||||
var inputNumber = parseInt($(this).val());
|
||||
if (!isNaN(inputNumber)) {
|
||||
var result = convertToIndianNumberingSystem(inputNumber);
|
||||
$("#numberToWord").text(result);
|
||||
var inputNumber = $(this).val();
|
||||
if (inputNumber) {
|
||||
var result = convertCommaNumberToWords(inputNumber);
|
||||
$("#numberToWordSumInsured").text(result);
|
||||
} else {
|
||||
$("#numberToWord").text("");
|
||||
$("#numberToWordSumInsured").text("");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#totalSumInsured").on("keyup", function() {
|
||||
var inputNumber = $(this).val();
|
||||
if (inputNumber) {
|
||||
var result = convertCommaNumberToWords(inputNumber);
|
||||
$("#numberToWordTotalSumInsured").text(result);
|
||||
} else {
|
||||
$("#numberToWordTotalSumInsured").text("");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// function formatNumber(input) {
|
||||
// Remove non-numeric characters
|
||||
// let value = input.value.replace(/\D/g, '');
|
||||
|
||||
// Add commas
|
||||
// value = Number(value).toLocaleString('en-IN');
|
||||
|
||||
// Update the input value
|
||||
// input.value = value;
|
||||
// }
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
@ -14,10 +14,12 @@
|
||||
"ext-intl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"firebase/php-jwt": "^6.10",
|
||||
"google/apiclient": "^2.15.0",
|
||||
"laminas/laminas-escaper": "^2.9",
|
||||
"phpoffice/phpspreadsheet": "^2.0",
|
||||
"psr/log": "^1.1"
|
||||
"psr/log": "^1.1",
|
||||
"slim/slim": "^4.13"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeigniter/coding-standard": "^1.7",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user