Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
18
.htaccess
@ -36,6 +36,24 @@ Options -Indexes
|
||||
# Ensure Authorization header is passed along
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
ExpiresByType image/jpg "access 1 year"
|
||||
ExpiresByType image/jpeg "access 1 year"
|
||||
ExpiresByType image/gif "access 1 year"
|
||||
ExpiresByType image/png "access 1 year"
|
||||
ExpiresByType text/css "access 1 month"
|
||||
ExpiresByType text/js "access 1 month"
|
||||
ExpiresByType application/pdf "access 1 month"
|
||||
ExpiresByType application/javascript "access 1 month"
|
||||
ExpiresByType application/x-javascript "access 1 month"
|
||||
ExpiresByType application/x-shockwave-flash "access 1 month"
|
||||
ExpiresByType image/x-icon "access 1 year"
|
||||
ExpiresDefault "access 2 days"
|
||||
</IfModule>
|
||||
|
||||
<IfModule !mod_rewrite.c>
|
||||
|
||||
@ -42,6 +42,9 @@ class App extends BaseConfig
|
||||
*/
|
||||
public string $indexPage = 'index.php';
|
||||
|
||||
|
||||
public $compressOutput = true;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* URI PROTOCOL
|
||||
|
||||
@ -11,6 +11,7 @@ use CodeIgniter\Filters\SecureHeaders;
|
||||
|
||||
use App\Filters\AuthMVC;
|
||||
use App\Filters\HttpRequestLog;
|
||||
use App\Filters\CloseDbConnection;
|
||||
|
||||
use App\Filters\AuthJWT;
|
||||
|
||||
@ -32,7 +33,8 @@ class Filters extends BaseConfig
|
||||
'secureheaders' => SecureHeaders::class,
|
||||
'authMVC' => AuthMVC::class,
|
||||
'HttpRequestLog' => HttpRequestLog::class,
|
||||
'authJWT' => AuthJWT::class
|
||||
'authJWT' => AuthJWT::class,
|
||||
'CloseDbConnection' => CloseDbConnection::class
|
||||
];
|
||||
|
||||
/**
|
||||
@ -49,8 +51,7 @@ class Filters extends BaseConfig
|
||||
// 'invalidchars',
|
||||
],
|
||||
'after' => [
|
||||
// 'HttpRequestLog',
|
||||
//'authMVC',
|
||||
'CloseDbConnection'
|
||||
// 'secureheaders',
|
||||
],
|
||||
];
|
||||
|
||||
@ -206,6 +206,14 @@ $routes->group("/master", ["filter" => "authMVC"], function ($routes) {
|
||||
$routes->get("remove/(:any)", "MasterController::removePolicyPolicies/$1");
|
||||
});
|
||||
});
|
||||
|
||||
$routes->group("cash_deposite", ["filter" => "authMVC"], function ($routes) {
|
||||
$routes->get("list", "MasterController::CDMasterList");
|
||||
$routes->post("create", "MasterController::createCDMasterData");
|
||||
$routes->post("edit", "MasterController::editCDMasterData");
|
||||
$routes->get("list/(:any)", "MasterController::getCDMasterDataByID/$1");
|
||||
// $routes->get("remove/(:any)", "MasterController::policyTypeRemove/$1");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -234,6 +242,8 @@ $routes->group("/util", ["filter" => "authMVC"], function ($routes) {
|
||||
$routes->get("get-client-branch/(:any)", "ClientController::getClientBranch/$1");
|
||||
$routes->get("get-client-details/(:any)", "ClientController::getClientAllDetailsByUsingClientID/$1");
|
||||
$routes->get("delete-additional-rack-rate/(:any)", "ClientController::deleteAdditionalRackRate/$1");
|
||||
$routes->get("check_cd_ac_no/(:any)", "MasterController::checkUniqueCDAccountNumber/$1");
|
||||
$routes->get("get_cd_ac/(:any)", "ClientController::get_cd_ac/$1");
|
||||
});
|
||||
|
||||
$routes->cli('cli/processjob', 'JobWorker::processJob');
|
||||
|
||||
@ -31,6 +31,8 @@ use App\Models\PolicyPremium2Model;
|
||||
use App\Models\EmployeeModel;
|
||||
use App\Models\EmployeePolicyModel;
|
||||
use App\Models\NotificationModel;
|
||||
use App\Models\CDMasterModel;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -62,6 +64,8 @@ class ClientController extends AdminController
|
||||
protected $employeeModel;
|
||||
protected $employeePolicyModel;
|
||||
protected $notificationModel;
|
||||
protected $CDMasterModel;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@ -90,6 +94,8 @@ class ClientController extends AdminController
|
||||
$this->employeeModel = new EmployeeModel();
|
||||
$this->employeePolicyModel = new EmployeePolicyModel();
|
||||
$this->notificationModel = new NotificationModel();
|
||||
$this->CDMasterModel = new CDMasterModel();
|
||||
|
||||
|
||||
|
||||
|
||||
@ -200,13 +206,19 @@ class ClientController extends AdminController
|
||||
public function view_Deposit($insurerId)
|
||||
{
|
||||
// Load your model to fetch data based on $clientId and $insurerId
|
||||
// $subTypeOptions = [
|
||||
// 1 => 'Deposit',
|
||||
// 2 => 'Adjustment',
|
||||
// 3 => 'Refund',
|
||||
// 4 => 'Debit',
|
||||
// ];
|
||||
$subTypeOptions = [
|
||||
1 => 'Deposit',
|
||||
1 => 'Replenishment',
|
||||
2 => 'Adjustment',
|
||||
3 => 'Refund',
|
||||
3 => 'Refund From Deletion',
|
||||
4 => 'Debit',
|
||||
// Add more options as needed
|
||||
];
|
||||
|
||||
$data['subTypeOptions'] = $subTypeOptions;
|
||||
$headerData['page_name'] = 'Client Deposit';
|
||||
$data['insurerName']= $this->insurerModel->getInsurerName($insurerId);
|
||||
@ -231,20 +243,33 @@ class ClientController extends AdminController
|
||||
// Retrieve form data from POST request
|
||||
$loggedInUserID = get_session_userid();
|
||||
|
||||
$client_id = $this->request->getPost('client_id');
|
||||
$insurer_id = $this->request->getPost('insurer_id');
|
||||
|
||||
$CD_Account_Number = $this->CDMasterModel
|
||||
->where('client_id', $client_id)
|
||||
->where('insurer_id', $insurer_id)
|
||||
->first();
|
||||
|
||||
// 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'),
|
||||
'client_policy_id' => null,
|
||||
'cd_ac_no' => $CD_Account_Number['cd_ac_no'] ?? null,
|
||||
'endorsement_no' => null,
|
||||
'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
|
||||
'updated_by' => 1,
|
||||
];
|
||||
|
||||
|
||||
// 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']]);
|
||||
}
|
||||
@ -638,7 +663,8 @@ class ClientController extends AdminController
|
||||
$data['base_policy'] = $this->request->getPost('base_policy');
|
||||
$data['policy_status'] = 1;
|
||||
$data['inception_type'] = $this->request->getPost('inception_type') ? 2 : 1;
|
||||
$data['client_branch_id'] = $this->request->getPost('client_branch_id');
|
||||
$data['client_branch_id'] = $this->request->getPost('client_branch_id');
|
||||
$data['cd_ac_no'] = $this->request->getPost('cd_ac_no');
|
||||
|
||||
|
||||
|
||||
@ -733,7 +759,8 @@ class ClientController extends AdminController
|
||||
$data['base_policy'] = $this->request->getPost('base_policy');
|
||||
$data['policy_status'] = 1;
|
||||
$data['inception_type'] = $this->request->getPost('inception_type') ? 2 : 1;
|
||||
$data['client_branch_id'] = $this->request->getPost('client_branch_id');
|
||||
$data['client_branch_id'] = $this->request->getPost('client_branch_id');
|
||||
$data['cd_ac_no'] = $this->request->getPost('cd_ac_no');
|
||||
|
||||
|
||||
|
||||
@ -1140,9 +1167,10 @@ class ClientController extends AdminController
|
||||
$client_id = $client_policy_data['client_id'];
|
||||
$polices = $this->policesModel->where(['insurer_id' => $insurer_id, 'is_active' => 1])->findAll();
|
||||
$client_policy_list = $this->clientPolicyModel->getpolicyWithPattern( $client_id );
|
||||
$cd_data = $this->CDMasterModel->where('client_id', $client_id)->where('insurer_id', $insurer_id)->findAll();
|
||||
|
||||
|
||||
return $this->respond(['status' => true,'code' => 200, 'client_policy_list' => $client_policy_list, 'data' => $client_policy_data, "insurer_id" => $client_policy_data['insurer_id'], 'policy' => $polices], 200);
|
||||
return $this->respond(['status' => true,'code' => 200, 'client_policy_list' => $client_policy_list, 'data' => $client_policy_data, 'cd_data' => $cd_data, "insurer_id" => $client_policy_data['insurer_id'], 'policy' => $polices], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
|
||||
}
|
||||
@ -1942,10 +1970,6 @@ class ClientController extends AdminController
|
||||
|
||||
|
||||
$data['client_policy'] = $client_policy;
|
||||
|
||||
|
||||
|
||||
|
||||
$data['client_branch'] = $this->clientModel
|
||||
|
||||
->select('
|
||||
@ -2120,5 +2144,17 @@ class ClientController extends AdminController
|
||||
|
||||
|
||||
|
||||
public function get_cd_ac($client_id, $insurer_id){
|
||||
|
||||
$cd_data = $this->CDMasterModel->where('client_id', $client_id)->where('insurer_id', $insurer_id)->findAll();
|
||||
|
||||
if($cd_data){
|
||||
return $this->respond(['status' => true, 'code' => 200, 'data' => $cd_data], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false, 'code' => 404, 'insurer_id' => $insurer_id, 'client_id' => $client_id], 200);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -24,6 +24,7 @@ use App\Models\ClientDepositModel;
|
||||
use App\Models\NotificationModel;
|
||||
use App\Models\MessageModel;
|
||||
use App\Models\UserMessageModel;
|
||||
use App\Models\CDMasterModel;
|
||||
|
||||
use App\Controllers\Jobs;
|
||||
use App\Controllers\JobWorker;
|
||||
@ -52,6 +53,8 @@ class EmpDataServiceController extends BaseController
|
||||
protected $notificationModel;
|
||||
protected $messageModel;
|
||||
protected $userMessageModel;
|
||||
protected $CDMasterModel;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@ -70,6 +73,8 @@ class EmpDataServiceController extends BaseController
|
||||
$this->notificationModel = new NotificationModel();
|
||||
$this->messageModel = new MessageModel();
|
||||
$this->userMessageModel = new UserMessageModel();
|
||||
$this->CDMasterModel = new CDMasterModel();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -138,6 +143,11 @@ class EmpDataServiceController extends BaseController
|
||||
$insurer_id = $this->clientPolicyModel->where('id', $export_data['client_policy_id'])->first();
|
||||
$cash_balance = $this->clientDepositModel->where('client_id', $export_data['client_id'])->where('insurer_id', $insurer_id['insurer_id'])->orderBy('id', 'DESC')->first();
|
||||
|
||||
if($cash_balance == null){
|
||||
|
||||
$cash_balance = $this->CDMasterModel->where('client_id', $export_data['client_id'])->where('insurer_id', $insurer_id['insurer_id'])->orderBy('id', 'DESC')->first();
|
||||
}
|
||||
|
||||
|
||||
// Calculate the total amount from the objects
|
||||
$totals = array_reduce($objects, function ($carry, $item) {
|
||||
@ -146,19 +156,20 @@ class EmpDataServiceController extends BaseController
|
||||
|
||||
$totals = round($totals, 2);
|
||||
|
||||
$this->removeOldExportInfoFromBatchFile($export_data);
|
||||
|
||||
|
||||
if (!empty($cash_balance)) {
|
||||
|
||||
if ((int) $cash_balance['balance'] < (int) $totals) {
|
||||
|
||||
|
||||
$this->myLogger->logme('error', 'Inception export failed due to insufficient deposit amount.');
|
||||
$this->myLogger->logme('error', 'Inception export failed due to insufficient deposit amount. CASH BALANCE : {balance} and TOTAL AMOUNT : {total}', ['balance' => $cash_balance['balance'], 'total' => $totals]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->removeOldExportInfoFromBatchFile($export_data);
|
||||
|
||||
|
||||
// Log the count of exported data
|
||||
$count = count($objects);
|
||||
$export_data['count'] = $count;
|
||||
@ -1082,6 +1093,13 @@ class EmpDataServiceController extends BaseController
|
||||
$batch_code = $file['batch_code'];
|
||||
$user_id = $file['created_by'];
|
||||
|
||||
$insurer_id = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||
|
||||
$CD_Account_Number = $this->CDMasterModel
|
||||
->where('client_id', $client_id)
|
||||
->where('insurer_id', $insurer_id['insurer_id'])
|
||||
->first();
|
||||
|
||||
|
||||
$get_policy_type = $this->clientPolicyModel
|
||||
->select('policy_type.policy_type, policies.policy_type_id as policy_type_id')
|
||||
@ -1191,6 +1209,8 @@ class EmpDataServiceController extends BaseController
|
||||
'employeeIds' => $emp_policy_ids,
|
||||
'client_id' => $client_id,
|
||||
'client_policy_id' => $client_policy_id,
|
||||
'cd_ac_no' => $CD_Account_Number['cd_ac_no'] ?? null,
|
||||
'endorsement_no' => null,
|
||||
'client_branch_id' => $client_branch_id,
|
||||
'count' => $emp_count,
|
||||
'event' => $file['event_type'],
|
||||
@ -2094,6 +2114,13 @@ class EmpDataServiceController extends BaseController
|
||||
$batch_code = $file['batch_code'];
|
||||
$user_id = $file['created_by'];
|
||||
|
||||
$insurer_id = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||
|
||||
$CD_Account_Number = $this->CDMasterModel
|
||||
->where('client_id', $client_id)
|
||||
->where('insurer_id', $insurer_id['insurer_id'])
|
||||
->first();
|
||||
|
||||
|
||||
$status_val = 'success';
|
||||
if ($status == 'in-progress-partially') {
|
||||
@ -2112,7 +2139,7 @@ class EmpDataServiceController extends BaseController
|
||||
$emp_policy_ids = [];
|
||||
$employeeIds = [];
|
||||
$emp_details = [];
|
||||
$endorsement_id = [];
|
||||
$endorsement_id = '';
|
||||
$endorsement_details = [];
|
||||
$totals = 0;
|
||||
|
||||
@ -2120,7 +2147,7 @@ class EmpDataServiceController extends BaseController
|
||||
|
||||
$emp_name = $value[1];
|
||||
$emp_code = $value[2];
|
||||
$endorsement_id[] = $value[19];
|
||||
$endorsement_id = $value[19];
|
||||
$totals += $value[18];
|
||||
|
||||
|
||||
@ -2228,6 +2255,8 @@ class EmpDataServiceController extends BaseController
|
||||
'client_id' => $client_id,
|
||||
'client_policy_id' => $client_policy_id,
|
||||
'client_branch_id' => $client_branch_id,
|
||||
'cd_ac_no' => $CD_Account_Number['cd_ac_no'] ?? null,
|
||||
'endorsement_no' => $endorsement_id ?? null,
|
||||
'count' => $emp_count,
|
||||
'event' => $file['event_type'],
|
||||
'policy_name' => $policy_name['policy_name'],
|
||||
@ -2632,6 +2661,13 @@ class EmpDataServiceController extends BaseController
|
||||
$batch_code = $file['batch_code'];
|
||||
$user_id = $file['created_by'];
|
||||
|
||||
$insurer_id = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||
|
||||
$CD_Account_Number = $this->CDMasterModel
|
||||
->where('client_id', $client_id)
|
||||
->where('insurer_id', $insurer_id['insurer_id'])
|
||||
->first();
|
||||
|
||||
|
||||
$status_val = 'success';
|
||||
if ($status == 'in-progress-partially') {
|
||||
@ -2652,6 +2688,7 @@ class EmpDataServiceController extends BaseController
|
||||
$emp_endorsement_table_data = [];
|
||||
$employee_policy_table_data = [];
|
||||
$employee_policy_table_primaryKey = [];
|
||||
$endorsement_id = '';
|
||||
|
||||
$totals = 0;
|
||||
|
||||
@ -2661,6 +2698,7 @@ class EmpDataServiceController extends BaseController
|
||||
$emp_name = $value[2]; //employee name
|
||||
$emp_code = $value[1]; //employee code
|
||||
$totals = $totals + $value[13];
|
||||
$endorsement_id = $value[15];
|
||||
|
||||
|
||||
$fetch_data = [
|
||||
@ -2732,6 +2770,8 @@ class EmpDataServiceController extends BaseController
|
||||
'client_id' => $client_id,
|
||||
'client_policy_id' => $client_policy_id,
|
||||
'client_branch_id' => $client_branch_id,
|
||||
'cd_ac_no' => $CD_Account_Number['cd_ac_no'] ?? null,
|
||||
'endorsement_no' => $endorsement_id ?? null,
|
||||
'count' => $emp_count,
|
||||
'event' => $file['event_type'],
|
||||
'policy_name' => $policy_name['policy_name'],
|
||||
@ -3175,6 +3215,9 @@ class EmpDataServiceController extends BaseController
|
||||
'amount' => $amount->total_sum ?? 0,
|
||||
'sub_type_id' => 4,
|
||||
'client_id' => $arrayData['client_id'],
|
||||
'client_policy_id' => $arrayData['client_policy_id'],
|
||||
'endorsement_no' => $arrayData['endorsement_no'] ?? null,
|
||||
'cd_ac_no' => $arrayData['cd_ac_no'] ?? null,
|
||||
'insurer_id' => $insurer_id['insurer_id'],
|
||||
'description' => $description,
|
||||
'transaction_type' => 'Debit',
|
||||
@ -3213,6 +3256,9 @@ class EmpDataServiceController extends BaseController
|
||||
'amount' => $amount->total_sum,
|
||||
'sub_type_id' => 4,
|
||||
'client_id' => $arrayData['client_id'],
|
||||
'client_policy_id' => $arrayData['client_policy_id'],
|
||||
'endorsement_no' => $arrayData['endorsement_no'] ?? null,
|
||||
'cd_ac_no' => $arrayData['cd_ac_no'] ?? null,
|
||||
'insurer_id' => $insurer_id['insurer_id'],
|
||||
'description' => $description,
|
||||
'transaction_type' => 'Debit',
|
||||
@ -3253,6 +3299,9 @@ class EmpDataServiceController extends BaseController
|
||||
'amount' => $amount->total_sum,
|
||||
'sub_type_id' => 3,
|
||||
'client_id' => $arrayData['client_id'],
|
||||
'client_policy_id' => $arrayData['client_policy_id'],
|
||||
'endorsement_no' => $arrayData['endorsement_no'] ?? null,
|
||||
'cd_ac_no' => $arrayData['cd_ac_no'] ?? null,
|
||||
'insurer_id' => $insurer_id['insurer_id'],
|
||||
'description' => $description,
|
||||
'transaction_type' => 'Credit',
|
||||
|
||||
@ -974,6 +974,14 @@ class EmployeeController extends AdminController
|
||||
'{INSURER_BRANCH}' =>$value['insurer_branch_city'],
|
||||
'{RELATION}' =>$value['relationship'],
|
||||
'{TPA_LOGO}' => base_url() . 'public/uploads/logo/' . $value['tpa_logo'],
|
||||
'{MEDI_USER}' => base_url() . 'public/e_card_imgs/medi_uesr.jpg',
|
||||
'{MEDI_INSURER}' => base_url() . 'public/e_card_imgs/Magma.png',
|
||||
'{MEDI_BARCODE}' => base_url() . 'public/e_card_imgs/borcode.jpeg',
|
||||
'{QR_ANDROID}' => base_url() . 'public/e_card_imgs/android.png',
|
||||
'{QR_IOS}' => base_url() . 'public/e_card_imgs/ios.png',
|
||||
'{QR_ANDROID_2}' => base_url() . 'public/e_card_imgs/play_store.png',
|
||||
'{QR_IOS_2}' => base_url() . 'public/e_card_imgs/appstore.png',
|
||||
|
||||
];
|
||||
|
||||
// Replace placeholders with values in HTML content
|
||||
@ -1198,6 +1206,14 @@ class EmployeeController extends AdminController
|
||||
'{BACK_CARD}' => base_url() . 'public/uploads/template_bg/' . $tpa_id['back_card'],
|
||||
'{TPA_LOGO}' => base_url() . 'public/uploads/logo/' . $tpa_id['tpa_logo'],
|
||||
'{INSURER_LOGO}' => base_url() . 'public/assets/images/sample_logo_3.png',
|
||||
'{MEDI_USER}' => base_url() . 'public/e_card_imgs/medi_uesr.jpg',
|
||||
'{MEDI_INSURER}' => base_url() . 'public/e_card_imgs/Magma.png',
|
||||
'{MEDI_BARCODE}' => base_url() . 'public/e_card_imgs/borcode.jpeg',
|
||||
'{QR_ANDROID}' => base_url() . 'public/e_card_imgs/android.png',
|
||||
'{QR_IOS}' => base_url() . 'public/e_card_imgs/ios.png',
|
||||
'{QR_ANDROID_2}' => base_url() . 'public/e_card_imgs/play_store.png',
|
||||
'{QR_IOS_2}' => base_url() . 'public/e_card_imgs/appstore.png',
|
||||
|
||||
];
|
||||
|
||||
// Get the values to replace the placeholders
|
||||
|
||||
@ -665,14 +665,14 @@ class EmployeeServiceController extends AdminController
|
||||
|
||||
$group_key = rand(100000, 999999);
|
||||
//for emp table
|
||||
$this->empEndorsementModel->save(['pk' => (int)$data['emp_id'],'emp_code' => $data['emp_code'],'table_name' => 'employees','actions' => 'd','name' => $data['name'],'field_name' => 'emp_status','old_value' => $data['emp_status'],'new_value' => 'deactivate','created_by' => $file['created_by'],'remarks' => 'general deletion','group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$data['emp_id'],'emp_code' => $data['emp_code'],'table_name' => 'employees','actions' => 'd','name' => $data['name'],'field_name' => 'emp_status','old_value' => $data['emp_status'],'new_value' => 'deactivate','created_by' => $file['created_by'],'remarks' => 'general deletion','group_key' => $group_key,'file_id' => $file['id'],'status' => 'pending']);
|
||||
// dd( $this->empEndorsementModel->getLastQuery());
|
||||
// $this->empEndorsementModel->save(['pk' => (int)$data['emp_id'],'emp_code' => $data['emp_code'],'table_name' => 'employees','actions' => 'd','name' => $data['name'],'field_name' => 'change_event','old_value' => $data['change_event'],'new_value' => 'deletion','created_by' => $file['created_by'],'remarks' => 'general deletion']);
|
||||
|
||||
// for employee policy table
|
||||
$this->empEndorsementModel->save(['pk' => (int)$data['emp_policy_id'],'emp_code' => $data['emp_code'],'table_name' => 'employee_polices','actions' => 'd','name' => $data['name'],'field_name' => 'date_of_exit','old_value' => $data['date_of_exit'],'new_value' => change_date_format($row[4],'d-M-Y','Y-m-d'),'created_by' => $file['created_by'],'remarks' => 'general deletion','group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$data['emp_policy_id'],'emp_code' => $data['emp_code'],'table_name' => 'employee_polices','actions' => 'd','name' => $data['name'],'field_name' => 'reason_for_exit','old_value' => $data['reason_for_exit'],'new_value' => $row[5],'created_by' => $file['created_by'],'remarks' => 'general deletion','group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$data['emp_policy_id'],'emp_code' => $data['emp_code'],'table_name' => 'employee_polices','actions' => 'd','name' => $data['name'],'field_name' => 'status','old_value' => $data['status'],'new_value' => 'inactive','created_by' => $file['created_by'],'remarks' => 'general deletion','group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$data['emp_policy_id'],'emp_code' => $data['emp_code'],'table_name' => 'employee_polices','actions' => 'd','name' => $data['name'],'field_name' => 'date_of_exit','old_value' => $data['date_of_exit'],'new_value' => change_date_format($row[4],'d-M-Y','Y-m-d'),'created_by' => $file['created_by'],'remarks' => 'general deletion','group_key' => $group_key,'file_id' => $file['id'],'status' => 'pending']);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$data['emp_policy_id'],'emp_code' => $data['emp_code'],'table_name' => 'employee_polices','actions' => 'd','name' => $data['name'],'field_name' => 'reason_for_exit','old_value' => $data['reason_for_exit'],'new_value' => $row[5],'created_by' => $file['created_by'],'remarks' => 'general deletion','group_key' => $group_key,'file_id' => $file['id'],'status' => 'pending']);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$data['emp_policy_id'],'emp_code' => $data['emp_code'],'table_name' => 'employee_polices','actions' => 'd','name' => $data['name'],'field_name' => 'status','old_value' => $data['status'],'new_value' => 'inactive','created_by' => $file['created_by'],'remarks' => 'general deletion','group_key' => $group_key,'file_id' => $file['id'],'status' => 'pending']);
|
||||
};
|
||||
//iterate each row
|
||||
foreach ($excel_data as $col_key => $row)
|
||||
@ -794,7 +794,7 @@ class EmployeeServiceController extends AdminController
|
||||
if(!count($existing_endorsements))
|
||||
{
|
||||
$group_key = rand(100000, 999999);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employees','actions' => 'c','name' => $employee['name'],'field_name' => $field_name,'old_value' => $employee[ $field_name ],'new_value' => $field_value,'created_by' => $file['created_by'],'remarks' => $row[7],'date_of_correction' => change_date_format($row[5],'d-M-Y','Y-m-d'),'group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employees','actions' => 'c','name' => $employee['name'],'field_name' => $field_name,'old_value' => $employee[ $field_name ],'new_value' => $field_value,'created_by' => $file['created_by'],'remarks' => $row[7],'date_of_correction' => change_date_format($row[5],'d-M-Y','Y-m-d'),'group_key' => $group_key,'file_id' => $file['id'],'status' => 'pending']);
|
||||
}
|
||||
|
||||
|
||||
@ -855,15 +855,15 @@ class EmployeeServiceController extends AdminController
|
||||
//make entry in endorsement table
|
||||
if(!count($existing_endorsements))
|
||||
{
|
||||
|
||||
//transform data to send
|
||||
foreach ($slab_details['slab_rates'] as $skey => $slab_value)
|
||||
{
|
||||
if($slab_value['si'] == $row[3])
|
||||
{
|
||||
$group_key = rand(100000, 999999);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee_policy['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'basic_cover_si','old_value' => $employee_policy['basic_cover_si'],'new_value' => $row[3],'created_by' => $file['created_by'],'remarks' => 'general si enhancement','group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee_policy['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'premium','old_value' => $employee_policy['premium'],'new_value' => $slab_value['premium'],'created_by' => $file['created_by'],'remarks' => 'general si enhancement','group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee_policy['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'si_enhancement_date','old_value' => null,'new_value' => change_date_format($row[4],'d-M-Y','Y-m-d'),'created_by' => $file['created_by'],'remarks' => 'general si enhancement','group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee_policy['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'basic_cover_si','old_value' => $employee_policy['basic_cover_si'],'new_value' => $row[3],'created_by' => $file['created_by'],'remarks' => 'general si enhancement','group_key' => $group_key,'file_id' => $file['id'],'status' => 'pending']);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee_policy['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'premium','old_value' => $employee_policy['premium'],'new_value' => $slab_value['premium'],'created_by' => $file['created_by'],'remarks' => 'general si enhancement','group_key' => $group_key,'file_id' => $file['id'],'status' => 'pending']);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee_policy['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'si_enhancement_date','old_value' => null,'new_value' => change_date_format($row[4],'d-M-Y','Y-m-d'),'created_by' => $file['created_by'],'remarks' => 'general si enhancement','group_key' => $group_key,'file_id' => $file['id'],'status' => 'pending']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -889,7 +889,7 @@ class EmployeeServiceController extends AdminController
|
||||
$slab_details = $this->policiesModel->getPolicySlabRatesForEmpOnboard($file['policy_id'],$file['client_id']);
|
||||
foreach($familiy_data as $fkey => $value)
|
||||
{
|
||||
if($file['id'] == null || $value['temp']['source'] == 'excel' || (($file['action'] == 'dependent_addition' && in_array($value['temp']['source'],[10,11]) && ($slab_details['slab_rates'][0]['premium_type'] == 1 && strtolower($value['relationship']) == 'self') || ($slab_details['slab_rates'][0]['premium_type'] == 1 || $slab_details['slab_rates'][0]['premium_type'] == null)))) //insert data come from excel and from db i.e. ( $file['id'] == null for enrollment data)
|
||||
if($file['id'] == null || $value['temp']['source'] == 'excel' || (($file['action'] == 'dependent_addition' && ($slab_details['slab_rates'][0]['premium_type'] == 1 && strtolower($value['relationship']) == 'self') || ($slab_details['slab_rates'][0]['premium_type'] == 2 || $slab_details['slab_rates'][0]['premium_type'] == null)))) //insert data come from excel and from db i.e. ( $file['id'] == null for enrollment data)
|
||||
{
|
||||
|
||||
$employee = $this->employeeModel->checkExistingEmp($value,$file['client_branch_id']);
|
||||
@ -898,20 +898,20 @@ class EmployeeServiceController extends AdminController
|
||||
unset($value['policy_details']);
|
||||
unset($value['temp']);
|
||||
// Kint::dump($value);
|
||||
// Kint::dump($temp);
|
||||
// Kint::dump($policy_data);
|
||||
// echo '---------------------------------------';
|
||||
|
||||
//start implemet of si enhancement of grid type 10,11
|
||||
if(count($employee) && $file['action'] == 'dependent_addition' && $value['temp']['source'] == 'db' && ( ($slab_details['slab_rates'][0]['premium_type'] == 1 && (strtolower($value['relationship']) == 'self' || $temp['additional_rack_rate_acting_self'])) || ($slab_details['slab_rates'][0]['premium_type'] == 2 || $slab_details['slab_rates'][0]['premium_type'] == null)))
|
||||
if(count($employee) && $file['action'] == 'dependent_addition' && $temp['source'] == 'db' && in_array($value['temp']['grid_id'],[10,11]) && ( ($slab_details['slab_rates'][0]['premium_type'] == 1 && (strtolower($value['relationship']) == 'self' || $temp['additional_rack_rate_acting_self'])) || ($slab_details['slab_rates'][0]['premium_type'] == 2 || $slab_details['slab_rates'][0]['premium_type'] == null)))
|
||||
{
|
||||
$log_message = 'Employee record from DB,Checking SI for - '.$employee[0]['name'].'('.$employee[0]['emp_code'].')';
|
||||
$this->myLogger->logme('error',$log_message);
|
||||
$res = $this->employeesSIEnhanceProcessWhileOnbboard(employee:$employee[0],policy_data: $policy_data,file:$file);// where employee holds existing emp data and policy_data holds new si enhancement
|
||||
if(!$res)
|
||||
{
|
||||
//if endorsement not happend no need to update emp/policy details in DB.
|
||||
break;
|
||||
}
|
||||
|
||||
break;//skip db employee
|
||||
}
|
||||
//end implemet of si enhancement of grid type 10,11
|
||||
//end implemet of si enhancement of grid type
|
||||
|
||||
//save employee table
|
||||
if(count($employee))
|
||||
@ -965,10 +965,12 @@ class EmployeeServiceController extends AdminController
|
||||
$log_message .= ' with PK ' . $emp_policy_id;
|
||||
|
||||
//make endorsement entry if action is addition OR Dependt addition
|
||||
if(($file['action'] == 'dependent_addition' || $file['action'] == 'addition') && $value['temp']['source'] == 'excel')
|
||||
if(($file['action'] == 'dependent_addition' || $file['action'] == 'addition') && $temp['source'] == 'excel')
|
||||
{
|
||||
$log_message = $file['action'].' - endorsement'. $value['emp_code'].' - '.$value['name'].' - with policy id'.$emp_policy_id;
|
||||
$this->myLogger->logme('error',$log_message);
|
||||
$actions = ($file['action'] == 'dependent_addition' ? 'da' : ($file['action'] == 'addition' ? 'a' : NULL));
|
||||
$addition_endorse_data = ['pk' => $emp_policy_id,'group_key' => rand(100000, 999999),'emp_cdoe' => $value['emp_code'],'table_name' => 'employee_polices','actions' => $actions,'field_name' => 'basic_cover_si','old_value' => NULL,'new_value' => $policy_data['basic_cover_si'],'remarks' => 'addition endorsement','file_id' => $file['id'],'created_by' => $file['created_by']];
|
||||
$addition_endorse_data = ['pk' => $emp_policy_id,'group_key' => rand(100000, 999999),'emp_code' => $value['emp_code'],'table_name' => 'employee_polices','actions' => $actions,'name' => $value['name'],'field_name' => 'basic_cover_si','old_value' => NULL,'new_value' => $policy_data['basic_cover_si'],'remarks' => 'addition endorsement','file_id' => $file['id'],'created_by' => $file['created_by']];
|
||||
$this->employeeEndorsementforAddtionAndDependentAddition($addition_endorse_data);
|
||||
}
|
||||
|
||||
@ -990,14 +992,18 @@ class EmployeeServiceController extends AdminController
|
||||
// $employee -> holds existing emp model obj and $policy_data holds new policy changes as array
|
||||
public function employeesSIEnhanceProcessWhileOnbboard(array $employee,array $policy_data,array $file)
|
||||
{
|
||||
$employee = $this->employeeModel->where('emp_code', $employee['emp_code'])->where('name',$employee['name'])->where('client_id',$employee['client_id'])->where('client_branch_id',$file['client_id'])->where('is_active',1)->first();
|
||||
|
||||
|
||||
$employee = $this->employeeModel->where('emp_code', $employee['emp_code'])->where('name',$employee['name'])->where('client_id',$employee['client_id'])->where('client_branch_id',$file['client_branch_id'])->where('is_active',1)->first();
|
||||
// Kint::dump($this->employeeModel->getLastQuery());
|
||||
// dd($employee);
|
||||
$employee_policy = $this->employeePolicyModel->where('employee_id',$employee['id'])->where('client_policy_id',$file['policy_id'])->first();
|
||||
// dd($employee_policy);
|
||||
$slab_details = $this->policiesModel->getPolicySlabRatesForEmpOnboard($employee_policy['client_policy_id'],$employee['client_id']);
|
||||
// $slab_details = $this->policiesModel->getPolicySlabRatesForEmpOnboard($employee_policy['client_policy_id'],$employee['client_id']);
|
||||
// dd($slab_details);
|
||||
// $temp_slab_details = ($temp['grid_type'] == 'primary' ? $slab_details['slab_rates'] : $slab_details['additional_slab_info']['slab_rates']);
|
||||
|
||||
//check si has changed in normal case OR check premium only changed, still treat as SI enhancement in grid type 10
|
||||
if($employee_policy['basic_cover_si'] != $policy_data['basic_cover_si'] || ($policy_data['premimum'] != null && $policy_data['premimum'] != "" && $employee_policy['premimum'] != $policy_data['premimum']))
|
||||
if($employee_policy['basic_cover_si'] != $policy_data['basic_cover_si'] || ($policy_data['premium'] != null && $policy_data['premium'] != "" && $employee_policy['premium'] != $policy_data['premium']))
|
||||
{
|
||||
$existing_endorsements = $this->empEndorsementModel->where('actions','si')
|
||||
->where('table_name','employee_polices')
|
||||
@ -1006,26 +1012,22 @@ class EmployeeServiceController extends AdminController
|
||||
->where('name',$employee['name'])
|
||||
->where('field_name','basic_cover_si')
|
||||
->findAll();
|
||||
// dd($existing_endorsements);
|
||||
//make entry in endorsement table
|
||||
if(!count($existing_endorsements))
|
||||
{
|
||||
|
||||
foreach ($slab_details['slab_rates'] as $skey => $slab_value)
|
||||
{
|
||||
if($slab_value['si'] == $policy_data['basic_cover_si'])
|
||||
{
|
||||
$group_key = rand(100000, 999999);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'basic_cover_si','old_value' => $employee_policy['basic_cover_si'],'new_value' => $policy_data['basic_cover_si'],'created_by' => $file['created_by'],'remarks' => 'general si enhancement via DA','group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'premium','old_value' => $employee_policy['premium'],'new_value' => $slab_value['premium'],'created_by' => $file['created_by'],'remarks' => 'general si enhancement via DA','group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->empEndorsementModel->save(['pk' => (int)$employee['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'si_enhancement_date','old_value' => null,'new_value' => date('Y-m-d'),'created_by' => $file['created_by'],'remarks' => 'general si enhancement via DA','group_key' => $group_key,'file_id' => $file['id']]);
|
||||
$this->myLogger->logme('error',($employee['emp_code'].' - '.$employee['name'].'- ( NEW/OLD SI - '.$employee_policy['basic_cover_si'].'/'.$policy_data['basic_cover_si'].')'. '( NEW/OLD PREMIUM - '.$employee_policy['premium'].'/'.$policy_data['premimum'].') '.' - si enhancement via DA'));
|
||||
$log_message = 'SI enhancement done during dependent_addition - '.$employee[0]['name'].'('.$employee[0]['emp_code'].')';
|
||||
$group_key = rand(100000, 999999);
|
||||
$data = array(
|
||||
['pk' => (int)$employee_policy['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'basic_cover_si','old_value' => $employee_policy['basic_cover_si'],'new_value' => $policy_data['basic_cover_si'],'created_by' => $file['created_by'],'remarks' => 'general si enhancement via DA','group_key' => $group_key,'file_id' => $file['id']],
|
||||
['pk' => (int)$employee_policy['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'premium','old_value' => $employee_policy['premium'],'new_value' => $policy_data['premium'],'created_by' => $file['created_by'],'remarks' => 'general si enhancement via DA','group_key' => $group_key,'file_id' => $file['id']],
|
||||
['pk' => (int)$employee_policy['id'],'emp_code' => $employee['emp_code'],'table_name' => 'employee_polices','actions' => 'si','name' => $employee['name'],'field_name' => 'si_enhancement_date','old_value' => null,'new_value' => date('Y-m-d'),'created_by' => $file['created_by'],'remarks' => 'general si enhancement via DA','group_key' => $group_key,'file_id' => $file['id']]
|
||||
);
|
||||
|
||||
$this->empEndorsementModel->insertBatch($data);
|
||||
$this->myLogger->logme('error',($employee['emp_code'].' - '.$employee['name'].'- ( NEW/OLD SI - '.$employee_policy['basic_cover_si'].'/'.$policy_data['basic_cover_si'].')'. '( NEW/OLD PREMIUM - '.$employee_policy['premium'].'/'.$policy_data['premium'].') '.' - si enhancement via DA'));
|
||||
$log_message = 'SI enhancement done during dependent_addition - '.$employee['name'].'('.$employee['emp_code'].')';
|
||||
$this->myLogger->logme('error',$log_message);
|
||||
return true; //retun true when endorsement inserted
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return false; //retun false when endorsement not happend
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@ use App\Models\TPABranchModel;
|
||||
use App\Models\TPAModel;
|
||||
use App\Models\StateModel;
|
||||
use App\Models\PolicyTypeModel;
|
||||
use App\Models\CDMasterModel;
|
||||
|
||||
class MasterController extends AdminController
|
||||
{
|
||||
@ -45,6 +46,9 @@ class MasterController extends AdminController
|
||||
protected $tpaModel;
|
||||
protected $stateModel;
|
||||
protected $policyTypeModel;
|
||||
protected $CDMasterModel;
|
||||
protected $clientModel;
|
||||
|
||||
|
||||
|
||||
public function __construct()
|
||||
@ -68,6 +72,9 @@ class MasterController extends AdminController
|
||||
$this->tpaModel = new TPAModel();
|
||||
$this->stateModel = new StateModel();
|
||||
$this->policyTypeModel = new PolicyTypeModel();
|
||||
$this->CDMasterModel = new CDMasterModel();
|
||||
$this->clientModel = new ClientModel();
|
||||
|
||||
}
|
||||
|
||||
public function insurerList()
|
||||
@ -1111,4 +1118,103 @@ class MasterController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function CDMasterList()
|
||||
{
|
||||
|
||||
$data['CD_Master_Data'] = $this->CDMasterModel
|
||||
->select('cd_master.*, clients.client_name, clients.short_name, insurers.name as insurer_name, user_profiles.first_name as user_name')
|
||||
->join('clients', 'clients.id = cd_master.client_id')
|
||||
->join('insurers', 'insurers.id = cd_master.insurer_id')
|
||||
->join('user_profiles', 'user_profiles.id = cd_master.created_by')
|
||||
->where('cd_master.is_active', 1)
|
||||
->findAll();
|
||||
$data['insurers'] = $this->insurerModel->findAll();
|
||||
$data['clients'] = $this->clientModel->findAll();
|
||||
$this->loadLayout('cd_master_list', $data);
|
||||
}
|
||||
|
||||
|
||||
public function createCDMasterData()
|
||||
{
|
||||
|
||||
$data = $this->request->getPost();
|
||||
$date = (string) $this->request->getPost('opening_date');
|
||||
$data['opening_date'] = date('Y-m-d', strtotime($date));
|
||||
|
||||
|
||||
if ($data) {
|
||||
|
||||
$insert = $this->CDMasterModel->insert($data);
|
||||
|
||||
if ($insert) {
|
||||
|
||||
session()->setFlashdata('success', "Cash Deposite Master Added Successfully");
|
||||
return redirect()->to(base_url('/master/cash_deposite/list'));
|
||||
} else {
|
||||
|
||||
session()->setFlashdata('error', "Cash Deposite Master Added Failed");
|
||||
return redirect()->to(base_url('/master/cash_deposite/list'));
|
||||
}
|
||||
} else {
|
||||
|
||||
session()->setFlashdata('error', "Cash Deposite Master Added Failed. Data Not Found");
|
||||
return redirect()->to(base_url('/master/cash_deposite/list'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function editCDMasterData($id = null)
|
||||
{
|
||||
|
||||
$id = $this->request->getPost('PrimaryKey');
|
||||
$date = (string) $this->request->getPost('opening_date');
|
||||
$data = $this->request->getPost();
|
||||
$data['opening_date'] = date('Y-m-d', strtotime($date));
|
||||
|
||||
if ($data) {
|
||||
|
||||
$insert = $this->CDMasterModel->where('id', $id)->set($data)->update();
|
||||
|
||||
if ($insert) {
|
||||
|
||||
session()->setFlashdata('success', "Cash Deposite Master Updated Successfully");
|
||||
return redirect()->to(base_url('/master/cash_deposite/list'));
|
||||
} else {
|
||||
|
||||
session()->setFlashdata('error', "Cash Deposite Master Update Failed");
|
||||
return redirect()->to(base_url('/master/cash_deposite/list'));
|
||||
}
|
||||
} else {
|
||||
|
||||
session()->setFlashdata('error', "Cash Deposite Master Update Failed. Data Not Found");
|
||||
return redirect()->to(base_url('/master/cash_deposite/list'));
|
||||
}
|
||||
}
|
||||
|
||||
public function getCDMasterDataByID($id = null)
|
||||
{
|
||||
|
||||
$cd_data = $this->CDMasterModel->where('id', $id)->first();
|
||||
$cd_data['opening_date'] = date('d-m-Y', strtotime($cd_data['opening_date']));
|
||||
|
||||
if ($cd_data) {
|
||||
return $this->respond(['status' => true, 'code' => 200, 'data' => $cd_data], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
public function checkUniqueCDAccountNumber($AccountNumber)
|
||||
{
|
||||
$uniqueAC = $this->CDMasterModel->where('cd_ac_no', $AccountNumber)->findAll();
|
||||
|
||||
if($uniqueAC != null){
|
||||
return $this->respond(['status' => true, 'message' => 'The CD Account Number is Already Exist', 'code' => 200], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false, 'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -58,9 +58,33 @@ class UserController extends AdminController
|
||||
|
||||
$userData = $this->request->getPost();
|
||||
$userData['created_by'] = get_session_userid();
|
||||
$temp_team = $userData['team'];
|
||||
unset($userData['team']);
|
||||
$insert = $this->userModel->insert($userData);
|
||||
if($insert){
|
||||
$db = \Config\Database::connect();
|
||||
$tableName = 'hdz_staff';
|
||||
|
||||
if($userData['role'] == 1){
|
||||
$admin = 1;
|
||||
}else{
|
||||
$admin = 0;
|
||||
}
|
||||
foreach ($temp_team as $key => $value) {
|
||||
if($value == 2){
|
||||
$hdz_staff = [
|
||||
'emp_code' => $userData['emp_code'],
|
||||
'fullname' => $userData['first_name'],
|
||||
'username' => strtolower($userData['first_name']),
|
||||
'email' => $userData['email'],
|
||||
'admin' => $admin,
|
||||
'registration' => time(),
|
||||
];
|
||||
|
||||
$db->table($tableName)->insert($hdz_staff);
|
||||
}
|
||||
}
|
||||
|
||||
$teamData['user_id'] = $insert ;
|
||||
foreach ($teams as $value) {
|
||||
$teamData['team_id'] = $value;
|
||||
@ -99,6 +123,35 @@ class UserController extends AdminController
|
||||
$update = $this->userModel->where('id', $id )->set($userData)->update();
|
||||
|
||||
if($update){
|
||||
|
||||
$db = \Config\Database::connect();
|
||||
$tableName = 'hdz_staff';
|
||||
|
||||
if($userData['role'] == 1){
|
||||
$admin = 1;
|
||||
}else{
|
||||
$admin = 0;
|
||||
}
|
||||
|
||||
foreach ($userData['team'] as $key => $value) {
|
||||
if($value == 2){
|
||||
$hdz_staff = [
|
||||
'emp_code' => $userData['emp_code'],
|
||||
'fullname' => $userData['first_name'],
|
||||
'username' => strtolower($userData['first_name']),
|
||||
'email' => $userData['email'],
|
||||
'admin' => $admin,
|
||||
];
|
||||
|
||||
|
||||
$db->table($tableName)->where('emp_code', $userData['emp_code'])
|
||||
->where('email', $userData['email'])
|
||||
->set($userData)
|
||||
->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->userTeamsModel->where('user_id', $id)->delete();
|
||||
if($teams){
|
||||
$teamData['user_id'] = $id ;
|
||||
@ -120,6 +173,12 @@ class UserController extends AdminController
|
||||
$deactive = $model->where('id', $id)->set(['is_active' => 0])->update();
|
||||
if($deactive)
|
||||
{
|
||||
// $db = \Config\Database::connect();
|
||||
// $tableName = 'hdz_staff';
|
||||
|
||||
// $db->table($tableName)->insert($hdz_staff);
|
||||
|
||||
|
||||
echo json_encode(array("status" => true));
|
||||
}else{
|
||||
echo json_encode(array("status" => false));
|
||||
|
||||
25
app/Filters/CloseDbConnection.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filters;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use CodeIgniter\Filters\FilterInterface;
|
||||
use CodeIgniter\Database\Config;
|
||||
|
||||
class CloseDbConnection implements FilterInterface
|
||||
{
|
||||
public function before(RequestInterface $request, $arguments = null)
|
||||
{
|
||||
// No action needed before the request
|
||||
}
|
||||
|
||||
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
|
||||
{
|
||||
// Get all database configurations
|
||||
$db = \Config\Database::connect();
|
||||
$log = \Config\Services::mylogger();
|
||||
$log->logme('error','CloseDbConnections....!');
|
||||
$db->close();
|
||||
}
|
||||
}
|
||||
@ -4,6 +4,7 @@
|
||||
namespace App\Helpers;
|
||||
|
||||
use App\Models\ClientDepositModel;
|
||||
use App\Models\CDMasterModel;
|
||||
|
||||
class DepositHelper
|
||||
{
|
||||
@ -49,6 +50,9 @@ class DepositHelper
|
||||
'amount' => $data['amount'],
|
||||
'sub_type' => $data['sub_type_id'],
|
||||
'client_id' => $data['client_id'],
|
||||
'client_policy_id' => $data['client_policy_id'],
|
||||
'cd_ac_no' => $data['cd_ac_no'],
|
||||
'endorsement_no' => $data['endorsement_no'],
|
||||
'insurer_id' => $data['insurer_id'],
|
||||
'description' => $data['description'],
|
||||
'transaction_type' => $data['transaction_type'],
|
||||
@ -90,7 +94,18 @@ class DepositHelper
|
||||
$getLastBalanceQuery = "SELECT balance FROM cash_deposit WHERE client_id = ? AND insurer_id = ? ORDER BY created_at DESC LIMIT 1";
|
||||
$getLastBalanceParams = [$clientId, $insurerId];
|
||||
|
||||
$lastBalance = $model->query($getLastBalanceQuery, $getLastBalanceParams)->getRow()->balance ?? 0;
|
||||
$lastBalance = $model->query($getLastBalanceQuery, $getLastBalanceParams)->getRow()->balance;
|
||||
|
||||
if(!$lastBalance){
|
||||
|
||||
$cd_model = new ClientDepositModel();
|
||||
|
||||
$getLastBalanceQuery = "SELECT opening_bal FROM cd_master WHERE client_id = ? AND insurer_id = ? ORDER BY created_at DESC LIMIT 1";
|
||||
$getLastBalanceParams = [$clientId, $insurerId];
|
||||
|
||||
$lastBalance = $cd_model->query($getLastBalanceQuery, $getLastBalanceParams)->getRow()->opening_bal ?? 0;
|
||||
|
||||
}
|
||||
|
||||
return $lastBalance;
|
||||
}
|
||||
|
||||
@ -15,11 +15,13 @@ if(!function_exists('calculate_days_bw_dates'))
|
||||
else{ $passedDateTime = new DateTime($from_date); }
|
||||
|
||||
$interval = $currentDateTime->diff($passedDateTime);
|
||||
if ($include_start_date) {
|
||||
$interval->days += 1;
|
||||
}
|
||||
// $totalDays = $interval->days;
|
||||
// if ($include_start_date) {
|
||||
// $totalDays += 1;
|
||||
// }
|
||||
//$interval->totalDays = $totalDays;
|
||||
return $interval;
|
||||
|
||||
return $interval;
|
||||
}
|
||||
}
|
||||
|
||||
@ -601,8 +603,9 @@ if (!function_exists('generate_relationship_code'))
|
||||
$relationship = ['self' => 1,'spouse' => 2,'son' => 3,'daughter' => 4,'father' => 5,'mother' => 6,'father-in-law' => 7,'mother-in-law' => 8];
|
||||
$slug = \Config\Services::slug();
|
||||
$relationship_code = $slug->slugify($arr['relationship']);
|
||||
$emp_type_code = ($relationship_code == 'self' ? 'EMP_TYP_01' : 'EMP_TYP_03');
|
||||
$relationship_code = $gender[ $arr['gender'] ] . $relationship[ $relationship_code ] ;
|
||||
return $relationship_code;
|
||||
return ['relationship_code' => $relationship_code,'emp_type_code' => $emp_type_code];
|
||||
}
|
||||
}
|
||||
|
||||
@ -709,14 +712,30 @@ if (!function_exists('calculate_premimum'))
|
||||
$transformed_familiy_member_data['temp']['additional_rack_rate_acting_self'] = false;
|
||||
if(!isset($emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['additional_rack_rate_acting_self']) && $current_grid_info['type'] == 'additional')
|
||||
{
|
||||
$transformed_familiy_member_data['temp']['additional_rack_rate_acting_self'] = true;
|
||||
$emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['additional_rack_rate_acting_self'] = true;
|
||||
|
||||
if($transformed_familiy_member_data['temp']['action'] != 'DA')
|
||||
{
|
||||
$transformed_familiy_member_data['temp']['additional_rack_rate_acting_self'] = true;
|
||||
$emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['additional_rack_rate_acting_self'] = true;
|
||||
}
|
||||
else// if dependent addition then set employee from db is an acting self
|
||||
{
|
||||
|
||||
if($transformed_familiy_member_data['temp']['source'] == 'db' && $transformed_familiy_member_data['temp']['rata_premimum'])
|
||||
{
|
||||
// echo 'SETTING';
|
||||
$transformed_familiy_member_data['temp']['additional_rack_rate_acting_self'] = true;
|
||||
$emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['additional_rack_rate_acting_self'] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//generate relationship code
|
||||
if($transformed_familiy_member_data['temp']['action'] != 'D' && $transformed_familiy_member_data['temp']['action'] != 'C' && $transformed_familiy_member_data['temp']['action'] != 'SI')
|
||||
{
|
||||
$transformed_familiy_member_data['relationship_code'] = generate_relationship_code($transformed_familiy_member_data);
|
||||
$temp_res = generate_relationship_code($transformed_familiy_member_data);
|
||||
$transformed_familiy_member_data['relationship_code'] = $temp_res['relationship_code'];
|
||||
$transformed_familiy_member_data['emp_type'] = $temp_res['emp_type_code'];
|
||||
}
|
||||
|
||||
//calculate primimum based on grid type
|
||||
@ -728,7 +747,15 @@ if (!function_exists('calculate_premimum'))
|
||||
$transformed_familiy_member_data['temp']['maxage'] = $emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['maxage'];
|
||||
$transformed_familiy_member_data['temp']['maxcount'] = $emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['maxcount'];
|
||||
|
||||
$transformed_familiy_member_data['policy_details']['basic_cover_si'] = isset($emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['si']) ? $emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['si'] : $transformed_familiy_member_data['policy_details']['basic_cover_si'];
|
||||
//set self si to all familiy members, except they've come from DB
|
||||
// if(isset($emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['si']))
|
||||
// {
|
||||
if($transformed_familiy_member_data['temp']['source'] != 'db')
|
||||
{
|
||||
$transformed_familiy_member_data['policy_details']['basic_cover_si'] = isset($emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['si']) ? $emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['si'] : $transformed_familiy_member_data['policy_details']['basic_cover_si'];
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
// this array hold conditions to allow calculate premium amt
|
||||
$conditions = [
|
||||
@ -740,9 +767,12 @@ if (!function_exists('calculate_premimum'))
|
||||
'isPrimaryGridPremiumTypeSingle' => $slab_details['slab_rates'][0]['premium_type'] == 1,
|
||||
'isAdditionalPremiumTypeSingle' => isset($slab_details['additional_slab_info']['slab_rates'][0]['premium_type']) ? ( $slab_details['additional_slab_info']['slab_rates'][0]['premium_type'] == 1) : 0,
|
||||
'isCurrentRelationshipSelf' => strtolower($transformed_familiy_member_data['relationship']) == 'self',
|
||||
'isBasicCoverCalculatedToCurrentEmployee' => strtolower($transformed_familiy_member_data['policy_details']['basic_cover_si']) != null
|
||||
'isBasicCoverCalculatedToCurrentEmployee' => ($transformed_familiy_member_data['policy_details']['basic_cover_si'] != null && $transformed_familiy_member_data['policy_details']['basic_cover_si'] != 0)
|
||||
];
|
||||
|
||||
// Kint::dump($transformed_familiy_member_data['policy_details']);
|
||||
// echo ($transformed_familiy_member_data['policy_details']['basic_cover_si'] != null && $transformed_familiy_member_data['policy_details']['basic_cover_si'] != 0);
|
||||
// echo ($conditions['isBasicCoverCalculatedToCurrentEmployee']);
|
||||
// echo "<br>";
|
||||
// same logic for both primay and additional grid type
|
||||
$primaryGridTypeCondition = $conditions['isCurrentActionDependentAddition'] && $conditions['isPrimaryGridType'] && $conditions['isPrimaryGridPremiumTypeSingle'] && $conditions['isCurrentRelationshipSelf'];
|
||||
$additionalGridTypeCondition = $conditions['isCurrentActionDependentAddition'] && $conditions['isAdditionalGridType'] && $conditions['isAdditionalPremiumTypeSingle'] && $conditions['isBasicCoverCalculatedToCurrentEmployee'];
|
||||
@ -814,6 +844,7 @@ if (!function_exists('transform_excel_data_to_db'))
|
||||
$result['temp']['emp_policy_id'] = isset($memArr['temp']['emp_policy_id']) ? $memArr['temp']['emp_policy_id'] : null;
|
||||
$result['temp']['policy_status'] = isset($memArr['temp']['policy_status']) ? $memArr['temp']['policy_status'] : null;
|
||||
$result['temp']['emp_status'] = isset($memArr['temp']['emp_status']) ? $memArr['temp']['emp_status'] : null;
|
||||
$result['temp']['rata_premimum'] = isset($memArr['temp']['rata_premimum']) ? $memArr['temp']['rata_premimum'] : 0;
|
||||
$result['policy_details'] = $policy;
|
||||
|
||||
return $result;
|
||||
@ -874,7 +905,7 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$insurer = ($insurer->find($policy_terms['insurer_id']));
|
||||
if($insurer['addition_add_day'] == true)
|
||||
{
|
||||
$emp_data['policy_details']['date_coverage'] = (new DateTime($emp_data['policy_details']['date_coverage']))->modify('-1 day')->format('Y-m-d');
|
||||
$emp_data['policy_details']['date_coverage'] = (new DateTime($emp_data['policy_details']['date_coverage']))->modify('+1 day')->format('Y-m-d');
|
||||
}
|
||||
}
|
||||
// dd($emp_data);
|
||||
@ -891,9 +922,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $slab_value['si'];
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = (float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.','');
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -911,9 +942,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $slab_value['si'];
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = (float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.','');
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -930,9 +961,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $slab_value['si'];
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = (float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.','');
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -954,9 +985,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $slab_value['si'];
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = (float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.','');
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -974,9 +1005,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $slab_value['si'];
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = (float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.','');
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -995,9 +1026,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $slab_value['si'];
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = (float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.','');
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -1016,9 +1047,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $slab_value['si'];
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = (float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.','');
|
||||
|
||||
$is_match_found = true;
|
||||
@ -1039,9 +1070,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $slab_value['si'];
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = (float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.','');
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -1060,9 +1091,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $slab_value['si'];
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = (float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.','');
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -1087,9 +1118,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $employee_received_si;
|
||||
$emp_data['policy_details']['date_coverage'] = isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date'];
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = ((float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.',''));
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -1117,9 +1148,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $familiy_si_covered;
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = get_premium_for_si(slab_details: $slab_details,si_amount: $familiy_si_covered,band: $employee_received_band);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = ((float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.',''));
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -1142,9 +1173,9 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $employee_received_si;
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],(calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days + 1));
|
||||
$emp_data['policy_details']['gst'] = ((float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.',''));
|
||||
$is_match_found = true;
|
||||
break;
|
||||
@ -1167,7 +1198,7 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$emp_data['policy_details']['basic_cover_si'] = $employee_received_si;
|
||||
$emp_data['policy_details']['date_coverage'] = (isset($emp_data['policy_details']['date_coverage']) ? $emp_data['policy_details']['date_coverage'] : $policy_terms['policy_start_date']);
|
||||
$emp_data['policy_details']['policy_end_date'] = $policy_terms['policy_end_date'];
|
||||
$emp_data['policy_details']['days'] = calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days;
|
||||
$emp_data['policy_details']['days'] = (calculate_days_bw_dates($emp_data['policy_details']['date_coverage'],$policy_terms['policy_end_date'])->days + 1);
|
||||
$emp_data['policy_details']['premium'] = $slab_value['premium'];
|
||||
$emp_data['policy_details']['rata_premimum'] = calculate_pro_rata_premimum($emp_data['policy_details']['premium'],$emp_data['policy_details']['days'],calculate_days_bw_dates($policy_terms['policy_start_date'],$policy_terms['policy_end_date'])->days);
|
||||
$emp_data['policy_details']['gst'] = ((float) number_format(($emp_data['policy_details']['rata_premimum'] * (18/100)),2,'.',''));
|
||||
@ -1267,6 +1298,7 @@ if (!function_exists('transform_db_data_to_excel'))
|
||||
$row['temp']['emp_policy_id'] = $value['emp_policy_id'];
|
||||
$row['temp']['emp_status'] = $value['emp_status'];
|
||||
$row['temp']['policy_status'] = $value['status'];
|
||||
$row['temp']['rata_premimum'] = $value['rata_premimum'];
|
||||
|
||||
array_push($return_data, ($row));
|
||||
}
|
||||
|
||||
64
app/Models/CDMasterModel.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class CDMasterModel extends Model
|
||||
{
|
||||
protected $table = 'cd_master';
|
||||
protected $primaryKey = 'id';
|
||||
protected $useAutoIncrement = true;
|
||||
protected $returnType = 'array';
|
||||
protected $useSoftDeletes = false;
|
||||
protected $protectFields = true;
|
||||
protected $allowedFields = [
|
||||
|
||||
'id',
|
||||
'client_id',
|
||||
'insurer_id',
|
||||
'cd_ac_no',
|
||||
'opening_bal',
|
||||
'opening_date',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'is_active',
|
||||
|
||||
];
|
||||
|
||||
// Callbacks
|
||||
protected $allowCallbacks = true;
|
||||
protected $beforeInsert = ["checkAndADDCreatedByValue"];
|
||||
protected $afterInsert = [];
|
||||
protected $beforeUpdate = ["checkAndUpdateUpdatedByValue"];
|
||||
protected $afterUpdate = [];
|
||||
protected $beforeFind = [];
|
||||
protected $afterFind = [];
|
||||
protected $beforeDelete = [];
|
||||
protected $afterDelete = [];
|
||||
|
||||
protected function checkAndADDCreatedByValue(array $data)
|
||||
{
|
||||
// Check if 'updated_by' value is null or empty
|
||||
if (empty($data['data']['created_by'])) {
|
||||
// Set 'updated_by' value to the current session user ID
|
||||
$data['data']['created_by'] = get_session_userid();
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function checkAndUpdateUpdatedByValue(array $data)
|
||||
{
|
||||
// Check if 'updated_by' value is null or empty
|
||||
if (empty($data['data']['updated_by'])) {
|
||||
// Set 'updated_by' value to the current session user ID
|
||||
$data['data']['updated_by'] = get_session_userid();
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
@ -22,6 +22,9 @@ class ClientDepositModel extends Model
|
||||
"updated_at",
|
||||
"description",
|
||||
"balance",
|
||||
"client_policy_id",
|
||||
"cd_ac_no",
|
||||
"endorsement_no",
|
||||
];
|
||||
|
||||
|
||||
|
||||
@ -42,7 +42,8 @@ class ClientPolicyModel extends Model
|
||||
"date_of_exit",
|
||||
"reason_for_exit",
|
||||
"policy_no",
|
||||
"client_branch_id"
|
||||
"client_branch_id",
|
||||
"cd_ac_no"
|
||||
];
|
||||
|
||||
public function getClientPolicyById($id){
|
||||
@ -182,18 +183,21 @@ class ClientPolicyModel extends Model
|
||||
->select('cash_deposit.*')
|
||||
->select('insurers.name as insurer_name, insurers.short_name as insurer_short')
|
||||
->select('clients.client_name as clientname, clients.short_name as clientshort')
|
||||
->select('policies.name as policy_name')
|
||||
->select('user_profiles.first_name as username')
|
||||
->join('user_profiles','user_profiles.id=cash_deposit.created_by')
|
||||
->join('insurers', 'insurers.id = cash_deposit.insurer_id')
|
||||
->join('clients', 'clients.id = cash_deposit.client_id')
|
||||
|
||||
->join('user_profiles', 'user_profiles.id = cash_deposit.created_by', 'left')
|
||||
->join('insurers', 'insurers.id = cash_deposit.insurer_id', 'left')
|
||||
->join('clients', 'clients.id = cash_deposit.client_id', 'left')
|
||||
->join('client_policy', 'client_policy.id = cash_deposit.client_policy_id', 'left')
|
||||
->join('policies', 'policies.id = client_policy.policy_id', 'left')
|
||||
->where('cash_deposit.client_id', $clientId)
|
||||
->where('cash_deposit.insurer_id', $insurerId) // Add this line to filter by insurer_id
|
||||
->where('cash_deposit.insurer_id', $insurerId)
|
||||
->orderBy('cash_deposit.id', 'DESC')
|
||||
->get()
|
||||
->getResult();
|
||||
}
|
||||
|
||||
|
||||
public function getDepositSummary($clientId, $insurerId)
|
||||
{
|
||||
// Fetch the sum of credit and debit transactions and calculate the balance
|
||||
|
||||
@ -39,7 +39,8 @@ class EmployeeModel extends Model
|
||||
"is_addon_value",
|
||||
"is_createdby_hr",
|
||||
"client_branch_id",
|
||||
"token_time_out"
|
||||
"token_time_out",
|
||||
"emp_type"
|
||||
];
|
||||
|
||||
// Callbacks
|
||||
|
||||
@ -44,7 +44,7 @@ table.dataTable tbody td {
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">User List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-target="#con-close-modal" data-placement="top" title="Add" data-trigger="hover">ADD</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -303,8 +303,9 @@ var form = document.getElementById("UserForm");
|
||||
// Add submit event listener to the form
|
||||
form.addEventListener("submit", function(event) {
|
||||
// Disable the submit button to avoid multiple submissions
|
||||
document.getElementById("btnSubmit").disabled = true;
|
||||
// document.getElementById("btnSubmit").disabled = true;
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
293
app/Views/cd_master_list.php
Normal file
@ -0,0 +1,293 @@
|
||||
<style>
|
||||
.table th,
|
||||
.table td {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
table.dataTable tbody td {
|
||||
padding: 4px 4px !important;
|
||||
}
|
||||
|
||||
table.dataTable thead th {
|
||||
padding: 4px 4px !important;
|
||||
}
|
||||
|
||||
.col-12 {
|
||||
|
||||
max-width: 98% !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row" id="client_list">
|
||||
<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 style="position: relative;">CD Master List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light"
|
||||
data-toggle="modal" data-target="#con-close-modal" data-placement="top" title="Add"
|
||||
data-trigger="hover">ADD</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive w-100" cellspacing="0"
|
||||
id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="font-weight-medium">Client Name</th>
|
||||
<th class="font-weight-medium">Insurer Name</th>
|
||||
<th class="font-weight-medium">Opening Date</th>
|
||||
<th class="font-weight-medium">CD Account No</th>
|
||||
<th class="font-weight-medium">Deposite Amount</th>
|
||||
<th class="font-weight-medium">Date/User</th>
|
||||
<th class="font-weight-medium">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach($CD_Master_Data as $row){ ?>
|
||||
<tr>
|
||||
<td><?php echo $row['client_name']; ?>( <?= $row['short_name'] ?> )</td>
|
||||
<td><?php echo $row['insurer_name']; ?></td>
|
||||
<td><?php echo date('d-m-Y', strtotime($row['opening_date'])); ?></td>
|
||||
<td><?php echo $row['cd_ac_no']; ?></td>
|
||||
<td><?php echo $row['opening_bal']; ?></td>
|
||||
<td><?php echo date('d-M-Y h:i A', strtotime($row['created_at'])) ?> by
|
||||
<?php echo $row['user_name']; ?></td>
|
||||
<td>
|
||||
<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 class="dropdown-item btnEdit" data-id="<?= $row['id'];?>" data-toggle="modal" data-target="#con-close-modal"> <i
|
||||
class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
<!-- end row -->
|
||||
|
||||
|
||||
<!-- modal content -->
|
||||
|
||||
<div id="con-close-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true" data-backdrop="static" style="display: none;">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="title">Add Cash Deposite</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body p-4">
|
||||
<div class="">
|
||||
|
||||
<form role="form" class="parsley-examples" method="post" id="CDMasterForm" action=""
|
||||
enctype="multipart/form-data">
|
||||
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
|
||||
<input type="hidden" name="PrimaryKey" id="CD_Master_ID" />
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="emp_code">Client<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="client_id" name="client_id" required>
|
||||
<option value="">Select Client</option>
|
||||
<?php foreach($clients as $value) { ?>
|
||||
<option value="<?= $value['id'] ?>"><?= $value['client_name'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="profile">Insurer<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="insurer_id" name="insurer_id" required>
|
||||
<option value="">Select Insurer</option>
|
||||
<?php foreach($insurers as $value) { ?>
|
||||
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="email">Opening Date<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="opening_date" id="opening_date" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="mobile">CD Account Number<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="cd_ac_no" name="cd_ac_no" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="mobile">Deposite Amount<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="opening_bal" name="opening_bal" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
|
||||
id="btnSubmit">Submit</button>
|
||||
<!-- <button type="button" class="btn btn-secondry waves-effect waves-light mr-1" data-dismiss="modal" aria-hidden="true">Close</button> -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'CD-Master-List',
|
||||
className: 'my_class',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
}],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
searchPlaceholder: "Search..."
|
||||
},
|
||||
paging: true,
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
<?php if (session()->has('error')) : ?>
|
||||
toastr.error('<?= session()->getFlashdata('error') ?>', 'Failed');
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (session()->has('success')) : ?>
|
||||
toastr.success('<?= session()->getFlashdata('success') ?>', 'success');
|
||||
<?php endif; ?>
|
||||
|
||||
var endDatePicker = flatpickr("#opening_date", {
|
||||
dateFormat: "d-m-Y",
|
||||
// defaultDate: endDate,
|
||||
allowInput: false
|
||||
});
|
||||
|
||||
$('#client_id').select2();
|
||||
$('#insurer_id').select2();
|
||||
|
||||
})
|
||||
|
||||
|
||||
$('#btnAdd').click(function(){
|
||||
$('#client_id').val('');
|
||||
$('#insurer_id').val('');
|
||||
$('#opening_date').val('');
|
||||
$('#cd_ac_no').val('');
|
||||
$('#opening_bal').val('');
|
||||
$('#CDMasterForm').attr('action', '<?php echo base_url('master/cash_deposite/create');?>');
|
||||
$('#title').html('Add Cash Deposite');
|
||||
$('#btnSubmit').html('Submit');
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
$('.close').click(function(){
|
||||
$('#CD_Master_ID').val('');
|
||||
$('#client_id').val('').change();
|
||||
$('#insurer_id').val('').change();
|
||||
$('#opening_date').val('');
|
||||
$('#cd_ac_no').val('');
|
||||
$('#opening_bal').val('');
|
||||
$('#CDMasterForm')[0].reset();
|
||||
$('#CDMasterForm').parsley().reset();
|
||||
})
|
||||
|
||||
|
||||
$('body').on('click', '.btnEdit', function () {
|
||||
|
||||
var cd_id = $(this).attr('data-id');
|
||||
$('#title').html('Update Cash Deposite');
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo base_url('master/cash_deposite/list/');?>'+cd_id,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
|
||||
console.log(res)
|
||||
|
||||
$('#updateModal').modal('show');
|
||||
$('#CDMasterForm').attr('action', '<?php echo base_url('master/cash_deposite/edit');?>');
|
||||
$('#CD_Master_ID').val(res.data.id);
|
||||
$('#client_id').val(res.data.client_id).change();
|
||||
$('#insurer_id').val(res.data.insurer_id).change();
|
||||
$('#opening_date').val(res.data.opening_date);
|
||||
$('#cd_ac_no').val(res.data.cd_ac_no);
|
||||
$('#opening_bal').val(res.data.opening_bal);
|
||||
$('#btnSubmit').html('Update');
|
||||
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('#cd_ac_no').change(function(){
|
||||
|
||||
var cd_ac_no = $(this).val();
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo base_url('util/check_cd_ac_no/');?>'+cd_ac_no,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
|
||||
console.log(res)
|
||||
if(res.status == true){
|
||||
toastr.warning(res.message, 'warning');
|
||||
$('#cd_ac_no').val('');
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
@ -121,13 +121,22 @@
|
||||
|
||||
<div class="form-row" id="third" style="display: none; position: relative;top: 22px;">
|
||||
|
||||
<label class="switch">
|
||||
<input id="inception_type" type="checkbox" name="inception_type">
|
||||
<span class="slider round" style="height: 27px;"></span>
|
||||
</label>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">CD Account Number<span id="tpa_danger" class="text-danger">*</span></label>
|
||||
<select class="form-control" id="cd_ac_no" name="cd_ac_no" required>
|
||||
<option value="">Select CD Account Number</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label for="inception_type" style="position: relative;bottom: 5px;left: 10px;">Enable
|
||||
Employee Enrolment Process</label>
|
||||
<div class="form-group col-md-4">
|
||||
<label class="switch" style="position: relative;top: 43px;left: 20px;">
|
||||
<input id="inception_type" type="checkbox" name="inception_type">
|
||||
<span class="slider round" style="height: 27px;"></span>
|
||||
</label>
|
||||
|
||||
<label for="inception_type" style="position: relative;bottom: 5px;left: 85px;">Enable
|
||||
Employee Enrolment Process</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="policy_fields"></div>
|
||||
@ -521,10 +530,13 @@
|
||||
$(document).ready(function() {
|
||||
/********* To get the POLICY base on Insurer *******/
|
||||
$('#insurer').change(function() {
|
||||
|
||||
var id = $(this).val();
|
||||
var client_id = $('#client_id_policy').val()
|
||||
var parts = id.split('-');
|
||||
var secondPart = parts[1];
|
||||
var url = "<?= base_url("util/police-by-insurer/") ?>" + secondPart;
|
||||
var url_for_cd = "<?= base_url("util/get_cd_ac/") ?>" + client_id + '/' + secondPart;
|
||||
|
||||
var selectedOption = $('#base_policy').find(':selected');
|
||||
var base_policy_data_id = selectedOption.data('id');
|
||||
@ -597,6 +609,26 @@
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
});
|
||||
|
||||
|
||||
$.get(url_for_cd, function(response){
|
||||
|
||||
console.log(response)
|
||||
console.log(response.data)
|
||||
|
||||
if(response.status == false && response.insurer_id != 'undefined'){
|
||||
toastr.warning('The CD Account Number not found.', 'Warning');
|
||||
return;
|
||||
}
|
||||
|
||||
appendCDACNO(response.data)
|
||||
|
||||
}).fail(function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -720,7 +752,6 @@
|
||||
// $('#policy').val(res.data.policy_id).change();
|
||||
$('#policy_type').val(res.data.is_addon).change();
|
||||
$('#base_policy').val(res.data.base_policy);
|
||||
$('#client_branch').val(res.data.client_branch_id).change();
|
||||
|
||||
$('#policy_type_id').val(res.data.policy_type_id);
|
||||
$('#policy_PrimaryKey').val(res.data.id);
|
||||
@ -730,6 +761,7 @@
|
||||
$('#policy_status').val(checkDateStatus(res.data.policy_end_date));
|
||||
$('#policy_status_field').show();
|
||||
|
||||
|
||||
if (res.data.inception_type == 2) {
|
||||
$('#inception_type').prop('checked', true);
|
||||
} else {
|
||||
@ -841,6 +873,12 @@
|
||||
}, 3000);
|
||||
|
||||
|
||||
setTimeout(function(){
|
||||
appendCDACNO(res.cd_data, res.data.cd_ac_no)
|
||||
}, 3000)
|
||||
|
||||
$('#client_branch').val(res.data.client_branch_id).change();
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
@ -1018,7 +1056,7 @@
|
||||
80: "Eighty",
|
||||
90: "Ninety"
|
||||
};
|
||||
|
||||
|
||||
function convertNumberToWords(number) {
|
||||
if (number === 0) {
|
||||
return numberWords[number];
|
||||
@ -1027,22 +1065,34 @@
|
||||
let word = '';
|
||||
|
||||
if (number >= 10000000) {
|
||||
word += convertNumberToWords(Math.floor(number / 10000000)) + " Crore ";
|
||||
const crore = Math.floor(number / 10000000);
|
||||
if (crore > 0) {
|
||||
word += convertNumberToWords(crore) + " Crore ";
|
||||
}
|
||||
number %= 10000000;
|
||||
}
|
||||
|
||||
if (number >= 100000) {
|
||||
word += convertNumberToWords(Math.floor(number / 100000)) + " Lakh ";
|
||||
const lakh = Math.floor(number / 100000);
|
||||
if (lakh > 0) {
|
||||
word += convertNumberToWords(lakh) + " Lakh ";
|
||||
}
|
||||
number %= 100000;
|
||||
}
|
||||
|
||||
if (number >= 1000) {
|
||||
word += convertNumberToWords(Math.floor(number / 1000)) + " Thousand ";
|
||||
const thousand = Math.floor(number / 1000);
|
||||
if (thousand > 0) {
|
||||
word += convertNumberToWords(thousand) + " Thousand ";
|
||||
}
|
||||
number %= 1000;
|
||||
}
|
||||
|
||||
if (number >= 100) {
|
||||
word += convertNumberToWords(Math.floor(number / 100)) + " Hundred ";
|
||||
const hundred = Math.floor(number / 100);
|
||||
if (hundred > 0) {
|
||||
word += convertNumberToWords(hundred) + " Hundred ";
|
||||
}
|
||||
number %= 100;
|
||||
}
|
||||
|
||||
@ -1059,44 +1109,66 @@
|
||||
return word.trim();
|
||||
}
|
||||
|
||||
|
||||
function convertCommaNumberToWords(input) {
|
||||
|
||||
let number;
|
||||
if (input instanceof HTMLElement) {
|
||||
const inputValue = input.value;
|
||||
number = parseInt(inputValue.replace(/,/g, ''), 10);
|
||||
var convert_word_value = convertNumberToWords(number);
|
||||
|
||||
if (input.nextElementSibling !== null) {
|
||||
input.nextElementSibling.textContent = convert_word_value;
|
||||
}
|
||||
number = parseFloat(inputValue.replace(/,/g, ''), 10);
|
||||
} else {
|
||||
number = parseInt(input.replace(/,/g, ''), 10);
|
||||
number = parseFloat(input.replace(/,/g, ''), 10);
|
||||
}
|
||||
var convert_word_value = convertNumberToWords(number);
|
||||
|
||||
return convert_word_value;
|
||||
const [integerPart, decimalPart] = number.toFixed(2).split('.');
|
||||
const integerWord = convertNumberToWords(parseInt(integerPart, 10));
|
||||
let result = `${integerWord}`;
|
||||
|
||||
console.log('decimalPart',decimalPart)
|
||||
console.log('decimalPart',typeof decimalPart)
|
||||
|
||||
if (decimalPart != '00' && decimalPart != undefined) {
|
||||
result += ` and `;
|
||||
let decimalWord = convertNumberToWords(parseInt(decimalPart, 10))
|
||||
result += `${decimalWord}`
|
||||
result += ` Paisa`;
|
||||
}
|
||||
|
||||
return result.trim();
|
||||
}
|
||||
|
||||
|
||||
function onlyNumbers(event) {
|
||||
var charcode;
|
||||
charcode = event.which || event.keyCode;
|
||||
if (charcode >= 48 && charcode <= 57) return true;
|
||||
if (charcode >= 48 && charcode <= 57 || charcode == 46) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function formatNumber(input, maxLength) {
|
||||
|
||||
// console.log("input", input);
|
||||
console.log("input", input);
|
||||
console.log("input value", input.value);
|
||||
|
||||
maxLength = 16;
|
||||
let value = input.value.replace(/\D/g, ''); // Remove non-numeric characters
|
||||
let value = input.value.replace(/[^\d.]/g, ''); // Remove non-numeric characters
|
||||
console.log('Remove non-numeric characters', value)
|
||||
|
||||
|
||||
// Limit the number of digits
|
||||
value = value.slice(0, maxLength);
|
||||
console.log('Limited value', value);
|
||||
|
||||
|
||||
// Format the number with commas using Indian numbering system
|
||||
value = Number(value).toLocaleString('en-IN');
|
||||
input.value = value;
|
||||
value = parseFloat(value).toLocaleString("en-IN",{
|
||||
maximumFractionDigits: 2
|
||||
});
|
||||
|
||||
console.log('formetted value', value);
|
||||
|
||||
input.value = (value);
|
||||
|
||||
basicPayMultiple(input)
|
||||
if (input.id == 'gpa_si') {
|
||||
@ -1494,4 +1566,32 @@
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
function appendCDACNO(data, select = null) {
|
||||
|
||||
console.log('appendCDACNO', data);
|
||||
console.log('appendCDACNO', select);
|
||||
|
||||
$('#cd_ac_no').empty();
|
||||
$('#cd_ac_no').append($('<option>', {
|
||||
value: '',
|
||||
text: 'Select CD Account Number'
|
||||
}));
|
||||
|
||||
$.each(data, function(index, item) {
|
||||
const option = $('<option>', {
|
||||
value: item.cd_ac_no,
|
||||
text: item.cd_ac_no
|
||||
});
|
||||
|
||||
if (select === item.cd_ac_no) {
|
||||
console.log('selected');
|
||||
option.attr('selected', true);
|
||||
}
|
||||
|
||||
$('#cd_ac_no').append(option);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -60,8 +60,6 @@ input:checked + .slider:before {
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div class="tab-pane fade active show" id="general-q-tab">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Insurer List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<a href="<?= base_url("master/insurer/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">KYC List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<a href="<?= base_url("master/kyc/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -139,7 +139,7 @@
|
||||
|
||||
<script>
|
||||
toastr.options = {
|
||||
"timeOut": 5000,
|
||||
"timeOut": 2000,
|
||||
"closeButton": true,
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -580,6 +580,9 @@
|
||||
<li>
|
||||
<a href="<?= base_url('/master/policy/list') ?>">Policy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/master/cash_deposite/list') ?>">CD Master</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@ -30,6 +30,18 @@
|
||||
a:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/* .auth-fluid {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
flex-direction: row;
|
||||
align-items: stretch;
|
||||
background: url("<?= base_url()."public"; ?>/assets/images/login_bg.png") center !important;
|
||||
background-size: cover;
|
||||
} */
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
@ -309,7 +309,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
|
||||
<div class="form-row col-md-4" style="margin-left: 346px; margin-top: -114px;">
|
||||
<label for="mobile">Premium Multiplier<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '3' ? data.multiplier : '') : ''}" type="text" class="form-control" placeholder="Multiplier" name="gpa_sum_multiplier2" id="gpa_sum_multiplier2" onkeyup="gpaSumInsureMultiplier(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '3' ? data.multiplier : '') : ''}" type="text" class="form-control" placeholder="Multiplier" name="gpa_sum_multiplier2" id="gpa_sum_multiplier2" onchange="gpaSumInsureMultiplier(this)" required>
|
||||
</div>
|
||||
|
||||
<div class="form-row" style="width:101%;padding: 10px;" id="removeChild_${Count}">
|
||||
@ -319,13 +319,13 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-4" id="">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '3' ? data.si : '') : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_sum_si2[]" id="gpa_sum_si2" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '3' ? data.si : '') : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_sum_si2[]" id="gpa_sum_si2" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_sum_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '3' ? data.premium : '') : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_sum_premium2[]" id="gpa_sum_premium2" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '3' ? data.premium : '') : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_sum_premium2[]" id="gpa_sum_premium2" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_sum_premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
|
||||
@ -343,17 +343,17 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
|
||||
<div class="form-row col-md-4" style="margin-left: 346px; margin-top: -114px;">
|
||||
<label for="mobile">Premium Multiplier<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '1' ? data.multiplier : '') : ''}" type="text" class="form-control" placeholder="Multiplier" name="gpa_sum_multiplier" id="gpa_sum_multiplier" onkeyup="gpaSumInsureMultiplier(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '1' ? data.multiplier : '') : ''}" type="text" class="form-control" placeholder="Multiplier" name="gpa_sum_multiplier" id="gpa_sum_multiplier" onchange="gpaSumInsureMultiplier(this)" required>
|
||||
</div>
|
||||
<div class="form-row" style="width:101%;padding: 10px;" id="removeChild_${Count}">
|
||||
<div class="form-group col-md-4" id="">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '1' ? data.si : '') : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_sum_si[]" id="gpa_sum_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '1' ? data.si : '') : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_sum_si[]" id="gpa_sum_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_sum_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '1' ? data.premium : '') : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_sum_premium[]" id="gpa_sum_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '1' ? data.premium : '') : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_sum_premium[]" id="gpa_sum_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_sum_premium_number_word' class="text-danger-2" ></div>
|
||||
|
||||
</div>
|
||||
@ -371,13 +371,13 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
|
||||
<div class="form-col col-md-6">
|
||||
<label for="mobile">Basic Pay<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '2' ? data.basic_pay : '') : ''}" type="text" class="form-control" placeholder="Enter Basic Pay" name="basic_pay" id="basic_pay" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '2' ? data.basic_pay : '') : ''}" type="text" class="form-control" placeholder="Enter Basic Pay" name="basic_pay" id="basic_pay" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_basic_pay_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
|
||||
<div class="form-col col-md-6">
|
||||
<label for="mobile">Basic Multiplier<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '2' ? data.basic_multiplier : '') : ''}" type="text" class="form-control" placeholder="Basic Multiplier" name="basic_multiplier" id="basic_multiplier" onkeyup='basicPayMultiple(this)' required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '2' ? data.basic_multiplier : '') : ''}" type="text" class="form-control" placeholder="Basic Multiplier" name="basic_multiplier" id="basic_multiplier" onchange='basicPayMultiple(this)' required>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -387,18 +387,18 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
|
||||
<div class="form-group col-md-4" id="" style="width:84%">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '2' ? data.si : '') : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_basic_si" id="gpa_basic_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '2' ? data.si : '') : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_basic_si" id="gpa_basic_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='basic_gpa_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
|
||||
<div class="form-col col-md-4">
|
||||
<label for="mobile">Premium Multiplier<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '2' ? data.multiplier : '') : ''}" type="text" class="form-control" placeholder="Premium Multiplier" name="premium_multiplier" id="premium_multiplier" onkeyup='basicPayMultiple(this)'required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '2' ? data.multiplier : '') : ''}" type="text" class="form-control" placeholder="Premium Multiplier" name="premium_multiplier" id="premium_multiplier" onchange='basicPayMultiple(this)'required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '2' ? data.premium : '') : ''}" type="text" class="form-control basic_gpa_premium" placeholder="Enter Premium" name="gpa_basic_premium" id="gpa_basic_premium" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '2' ? data.premium : '') : ''}" type="text" class="form-control basic_gpa_premium" placeholder="Enter Premium" name="gpa_basic_premium" id="gpa_basic_premium" onkeypress="return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='basic_gpa_premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
|
||||
@ -417,12 +417,12 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<input value="1" type="hidden" name="policy_type">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_si" id="gpa_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_si" id="gpa_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_premium" id="gpa_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_premium" id="gpa_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
</div>`;
|
||||
@ -438,12 +438,12 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div class="form-row" id="${id_var}3" style="width:84%">
|
||||
<div class="form-group col-md-5">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="3_si[]" id="3_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="3_si[]" id="3_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-5">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="3_premium[]" id="3_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="3_premium[]" id="3_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -462,7 +462,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div class="form-row" id="${id_var}4" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="4_si" id="4_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="4_si" id="4_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@ -476,7 +476,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="4_premium[]" id="4_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="4_premium[]" id="4_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -497,7 +497,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div class="form-row" id="${id_var}5" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="5_si[]" id="5_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="5_si[]" id="5_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
@ -510,7 +510,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="5_premium[]" id="5_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="5_premium[]" id="5_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -530,7 +530,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div class="form-row" id="${id_var}6" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="6_si" id="6_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="6_si" id="6_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@ -544,7 +544,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="6_premium[]" id="6_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="6_premium[]" id="6_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -565,7 +565,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div class="form-row" id="${id_var}7" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="7_si[]" id="7_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="7_si[]" id="7_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
@ -578,7 +578,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="7_premium[]" id="7_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="7_premium[]" id="7_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -600,7 +600,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div class="form-row" id="${id_var}8" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="8_si[]" id="8_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="8_si[]" id="8_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
@ -609,7 +609,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="8_premium[]" id="8_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="8_premium[]" id="8_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -629,12 +629,12 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<input value="1" type="hidden" name="policy_type">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_si" id="gpa_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_si" id="gpa_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_premium" id="gpa_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_premium" id="gpa_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
</div>`;
|
||||
@ -650,7 +650,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div class="form-row" id="${id_var}10" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="10_si[]" id="10_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="10_si[]" id="10_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
@ -663,7 +663,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="10_premium[]" id="10_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="10_premium[]" id="10_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -683,7 +683,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div class="form-row" id="${id_var}11" style="width:84%">
|
||||
<div class="form-group col-md-2">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="11_si[]" id="11_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="11_si[]" id="11_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
@ -692,12 +692,12 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="11_premium[]" id="11_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="11_premium[]" id="11_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="mobile">Max SI<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.max_si : ''}" type="text" class="form-control" placeholder="Enter Max SI" name="11_max_si[]" id="11_max_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.max_si : ''}" type="text" class="form-control" placeholder="Enter Max SI" name="11_max_si[]" id="11_max_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='max_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -717,7 +717,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div class="form-row" id="${id_var}12" style="width:84%">
|
||||
<div class="form-group col-md-2">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="12_si[]" id="12_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="12_si[]" id="12_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
@ -735,7 +735,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="12_premium[]" id="12_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="12_premium[]" id="12_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -755,7 +755,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div class="form-row" id="${id_var}13" style="width:84%">
|
||||
<div class="form-group col-md-2">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="13_si[]" id="13_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="13_si[]" id="13_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
@ -781,7 +781,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="13_premium[]" id="13_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="13_premium[]" id="13_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1065,13 +1065,14 @@ $('body').on('click', '.btnPolicyModel', function() {
|
||||
var additional_relationship = null;
|
||||
var premium_type_for_sec_rr = []
|
||||
var premium_type_for_primary_rr = []
|
||||
var first = 0;
|
||||
|
||||
if (res.premiumData && res.premiumData.length > 0) {
|
||||
$.each(res.premiumData, function(index, item) {
|
||||
|
||||
if (item.rack_rate_type == 0 || policy_type_string == 'GPA') {
|
||||
policy_grid_id_value = item.policy_grid_id;
|
||||
secondary = item.policy_grid_id;
|
||||
first = item.policy_grid_id;
|
||||
premium_type_for_primary_rr.push(item.premium_type);
|
||||
|
||||
} else if (item.rack_rate_type == 1) {
|
||||
@ -1223,16 +1224,32 @@ $('body').on('click', '.btnPolicyModel', function() {
|
||||
}
|
||||
|
||||
|
||||
$(`input[name="${id_for_trigger}_si[]"]`).each(function() {
|
||||
console.log('id_for_trigger', id_for_trigger)
|
||||
console.log('temp_for_premiumData', temp_for_premiumData)
|
||||
console.log('temp_for_premiumData', temp_for_premiumData[0])
|
||||
|
||||
|
||||
$(`input[name="${first}_si[]"]`).each(function() {
|
||||
// console.log($(this));
|
||||
$(this).trigger('keyup');
|
||||
});
|
||||
|
||||
$(`input[name="${id_for_trigger}_premium[]"]`).each(function() {
|
||||
$(`input[name="${first}_premium[]"]`).each(function() {
|
||||
// console.log($(this));
|
||||
$(this).trigger('keyup');
|
||||
});
|
||||
|
||||
$(`input[name="${secondary}_si[]"]`).each(function() {
|
||||
// console.log($(this));
|
||||
$(this).trigger('keyup');
|
||||
});
|
||||
|
||||
$(`input[name="${secondary}_premium[]"]`).each(function() {
|
||||
// console.log($(this));
|
||||
$(this).trigger('keyup');
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
@ -1514,12 +1531,12 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
html = `<div class="form-row gpa_sum_insure_remove" style="width:101%" id="removeChild_${Count}">
|
||||
<div class="form-group col-md-4" id="">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_sum_si[]" id="gpa_sum_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_sum_si[]" id="gpa_sum_si" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_sum_premium[]" id="gpa_sum_premium" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_sum_premium[]" id="gpa_sum_premium" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_premium_number_word' class="text-danger-2" ></div>
|
||||
|
||||
</div>
|
||||
@ -1542,13 +1559,13 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
|
||||
<div class="form-group col-md-4" id="">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '3' ? data.si : '') : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_sum_si2[]" id="gpa_sum_si2" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '3' ? data.si : '') : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="gpa_sum_si2[]" id="gpa_sum_si2" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '3' ? data.premium : '') : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_sum_premium2[]" id="gpa_sum_premium2" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '3' ? data.premium : '') : ''}" type="text" class="form-control" placeholder="Enter Premium" name="gpa_sum_premium2[]" id="gpa_sum_premium2" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_premium_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
|
||||
@ -1568,12 +1585,12 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
<div class="form-row" id="removeChild_${Count}" style="width:84%">
|
||||
<div class="form-group col-md-5">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="3_si[]" id="3_si_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="3_si[]" id="3_si_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_si_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-5">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="3_premium[]" id="3_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="3_premium[]" id="3_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='gpa_premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1598,7 +1615,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="4_premium[]" id="4_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="4_premium[]" id="4_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1614,7 +1631,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
<div class="form-row" id="removeChild_${Count}" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="5_si[]" id="5_si_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="5_si[]" id="5_si_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
@ -1627,7 +1644,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="5_premium[]" id="5_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="5_premium[]" id="5_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1650,7 +1667,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="6_premium[]" id="6_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="6_premium[]" id="6_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1665,7 +1682,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
<div class="form-row" id="removeChild_${Count}" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="7_si[]" id="7_si_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="7_si[]" id="7_si_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
@ -1678,7 +1695,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="7_premium[]" id="7_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="7_premium[]" id="7_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1693,7 +1710,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
<div class="form-row" id="removeChild_${Count}" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="8_si[]" id="8_si_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="8_si[]" id="8_si_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
@ -1702,7 +1719,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="8_premium[]" id="8_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="8_premium[]" id="8_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1717,7 +1734,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
<div class="form-row" id="removeChild_${Count}" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="9_si[]" id="9_si_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="9_si[]" id="9_si_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
@ -1726,7 +1743,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="9_premium[]" id="9_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="9_premium[]" id="9_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1741,7 +1758,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
<div class="form-row" id="removeChild_${Count}" style="width:84%">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="10_si[]" id="10_si_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="10_si[]" id="10_si_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
@ -1754,7 +1771,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="10_premium[]" id="10_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="10_premium[]" id="10_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1769,7 +1786,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
<div class="form-row" id="removeChild_${Count}" style="width:84%">
|
||||
<div class="form-group col-md-2">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="11_si[]" id="11_si_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="11_si[]" id="11_si_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
@ -1778,12 +1795,12 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="11_premium[]" id="11_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="11_premium[]" id="11_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="mobile">Max SI<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.max_si : ''}" type="text" class="form-control" placeholder="Enter Max SI" name="11_max_si[]" id="11_max_si[]" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.max_si : ''}" type="text" class="form-control" placeholder="Enter Max SI" name="11_max_si[]" id="11_max_si[]" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='max_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1797,7 +1814,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
<div class="form-row" id="removeChild_${Count}" style="width:84%">
|
||||
<div class="form-group col-md-2">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="12_si[]" id="12_si_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="12_si[]" id="12_si_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
@ -1815,7 +1832,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="12_premium[]" id="12_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="12_premium[]" id="12_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1829,7 +1846,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
<div class="form-row" id="removeChild_${Count}" style="width:84%">
|
||||
<div class="form-group col-md-2">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="13_si[]" id="13_si_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control" placeholder="Enter Sum Insured" name="13_si[]" id="13_si_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='sum_insured_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
@ -1855,7 +1872,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mobile">Premium<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="13_premium[]" id="13_premium_${Count}" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control" placeholder="Enter Premium" name="13_premium[]" id="13_premium_${Count}" onkeypress = "return onlyNumbers(event)" onchange="formatNumber(this)" required>
|
||||
<div id='premium_number_word_${Count}' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Policy Type List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<a href="<?= base_url("master/policy/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-10">
|
||||
<label for="tpa_ecard_template">E-Card Template<span class="text-danger"></span></label>
|
||||
<textarea style="height: 100px;" class="form-control" id="ecard_content" placeholder="Enter E-card Content" name="ecard_content"><?= isset($template_data) ? $template_data : '' ?></textarea>
|
||||
<textarea style="height: 380px;" class="form-control" id="ecard_content" placeholder="Enter E-card Content" name="ecard_content"><?= isset($template_data) ? $template_data : '' ?></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-2 float-right" style="position: relative;top: 0px;left: 40px;">
|
||||
<label for="tpa_logo_preview">Logo Preview<span class="text-danger"></span></label>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">TPA List</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<a href="<?= base_url("master/tpa/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -76,48 +76,53 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12" style="text-align: right;">
|
||||
<a href="<?= base_url("client/deposit/$clientData->id"); ?>"><i class="fas fa-arrow-left" style="font-size: 17px;"></i></a>
|
||||
<div class="row">
|
||||
<div class="col-12" style="text-align: right;">
|
||||
<a href="<?= base_url("client/deposit/$clientData->id"); ?>"><i class="fas fa-arrow-left"
|
||||
style="font-size: 17px;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Transaction Details</h4>
|
||||
</div>
|
||||
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
|
||||
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light"
|
||||
data-toggle="modal" data-target="#addTransactionModal">New</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive w-100" cellspacing="0"
|
||||
id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
|
||||
<th class="font-weight-medium">Date</th>
|
||||
<th class="font-weight-medium">User</th>
|
||||
<th class="font-weight-medium">Description</th>
|
||||
<th class="font-weight-medium">CD Account No</th>
|
||||
<th class="font-weight-medium">Policy Name</th>
|
||||
<th class="font-weight-medium">Endorsement No</th>
|
||||
<th class="font-weight-medium">Sub Type</th>
|
||||
<th class="font-weight-medium">Credit</th>
|
||||
<th class="font-weight-medium">Debit</th>
|
||||
<th class="font-weight-medium">Balance</th>
|
||||
|
||||
<th class="font-weight-medium">Description</th>
|
||||
<th class="font-weight-medium">Date/User</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($depositdata as $row) { ?>
|
||||
<tr id="<?php echo $row->id;?>">
|
||||
<td><?php echo date('d-M-Y h:i A', strtotime($row->created_at)); ?></td>
|
||||
<td><?php echo $row->username; ?></td>
|
||||
<td><?php echo $row->description; ?></td>
|
||||
<td><?php echo isset($subTypeOptions[$row->sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?></td>
|
||||
<td><?php echo $row->cd_ac_no; ?></td>
|
||||
<td><?php echo $row->policy_name; ?></td>
|
||||
<td><?php echo $row->endorsement_no; ?></td>
|
||||
<td><?php echo isset($subTypeOptions[$row->sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?>
|
||||
</td>
|
||||
<td><?php echo ($row->transaction_type == 'Credit') ? $row->amount : ''; ?></td>
|
||||
<td><?php echo ($row->transaction_type == 'Debit') ? $row->amount : ''; ?></td>
|
||||
<td><?php echo $row->balance; ?></td>
|
||||
<td><?php echo $row->description; ?></td>
|
||||
<td><?php echo date('d-M-Y h:i A', strtotime($row->created_at)); ?> by
|
||||
<?php echo $row->username; ?> </td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
@ -151,7 +156,7 @@
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="addMode"
|
||||
value="add" checked>
|
||||
<label class="form-check-label" for="addMode">Deposit</label>
|
||||
<label class="form-check-label" for="addMode">Replenishment</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="adjustmentMode"
|
||||
@ -191,7 +196,7 @@
|
||||
<div class="form-group">
|
||||
<label for="subType" class="control-label" style="display: none;">Transaction Sub Type</label>
|
||||
<select class="form-control" id="subType" name="sub_type" style="display: none;">
|
||||
<option value="Deposit" hidden>Deposit</option>
|
||||
<option value="Deposit" hidden>Replenishment</option>
|
||||
<option value="Adjustment" hidden>Adjustment</option>
|
||||
<!-- Add more options as needed -->
|
||||
</select>
|
||||
@ -222,22 +227,22 @@ $(document).ready(function() {
|
||||
$('#tickets-table').DataTable({
|
||||
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'TransactionDetails',
|
||||
exportOptions: {
|
||||
columns: ''
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'TransactionDetails',
|
||||
exportOptions: {
|
||||
columns: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdf',
|
||||
text: 'PDF',
|
||||
title: 'TransactionDetails',
|
||||
exportOptions: {
|
||||
columns: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdf',
|
||||
text: 'PDF',
|
||||
title: 'TransactionDetails',
|
||||
exportOptions: {
|
||||
columns: ''
|
||||
}
|
||||
}
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
language: {
|
||||
@ -288,15 +293,25 @@ $(document).ready(function() {
|
||||
// Add more options as needed
|
||||
};
|
||||
|
||||
|
||||
var subType = $('#subType').val();
|
||||
var subTypeId = subTypeOptions[subType] || null;
|
||||
|
||||
if (subTypeId === null) {
|
||||
// Handle the case where sub_type is not found in the options
|
||||
alert('Invalid sub_type selected.');
|
||||
toastr.warning('Invalid sub_type selected.', "Warning");
|
||||
return;
|
||||
}
|
||||
|
||||
// console.log('transactionType ', transactionType)
|
||||
// console.log('description ', description)
|
||||
// console.log('amount ', amount)
|
||||
// console.log('subType ', subType)
|
||||
// console.log('sub_type_id ', sub_type_id)
|
||||
// console.log('clientId ', clientId)
|
||||
// console.log('insurerId ', insurerId)
|
||||
|
||||
|
||||
// Send data to the server using Ajax
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
@ -312,15 +327,18 @@ $(document).ready(function() {
|
||||
},
|
||||
success: function(response) {
|
||||
// Handle success response
|
||||
console.log("Transaction saved successfully");
|
||||
toastr.success("Transaction saved successfully", "Success");
|
||||
// Reload the page or perform other actions as needed
|
||||
location.reload();
|
||||
},
|
||||
error: function(error) {
|
||||
// Handle error response
|
||||
console.error(error);
|
||||
error: function(xhr, status, error) {
|
||||
toastr.error("Transaction save failed", "Error");
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
location.reload(); // Uncomment if you need to reload the page on error
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -38,6 +38,22 @@ Options -Indexes
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
ExpiresByType image/jpg "access 1 year"
|
||||
ExpiresByType image/jpeg "access 1 year"
|
||||
ExpiresByType image/gif "access 1 year"
|
||||
ExpiresByType image/png "access 1 year"
|
||||
ExpiresByType text/css "access 1 month"
|
||||
ExpiresByType text/js "access 1 month"
|
||||
ExpiresByType application/pdf "access 1 month"
|
||||
ExpiresByType application/javascript "access 1 month"
|
||||
ExpiresByType application/x-javascript "access 1 month"
|
||||
ExpiresByType application/x-shockwave-flash "access 1 month"
|
||||
ExpiresByType image/x-icon "access 1 year"
|
||||
ExpiresDefault "access 2 days"
|
||||
</IfModule>
|
||||
|
||||
<IfModule !mod_rewrite.c>
|
||||
# If we don't have mod_rewrite installed, all 404's
|
||||
# can be sent to index.php, and everything works as normal.
|
||||
|
||||
BIN
public/e_card_imgs/Magma.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/e_card_imgs/android.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
public/e_card_imgs/appstore.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/e_card_imgs/barcode.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/e_card_imgs/borcode.jpeg
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
public/e_card_imgs/ios.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/e_card_imgs/medi_uesr.jpg
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
public/e_card_imgs/niva_babu.jpg
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
public/e_card_imgs/play_store.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
@ -59,9 +59,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-left: 20%;margin-top: 50px;">
|
||||
<div style="margin-top: 50px;">
|
||||
<h4 style="font-family: sans-serif;margin: 0px;margin-left: 30px;">TERMS AND CONDITIONS:</h4>
|
||||
<div style="width: 70%;line-height: 30px;">
|
||||
<div style="width: 100%;line-height: 30px;">
|
||||
<ol type="number" style="font-family: sans-serif;">
|
||||
<li>This card is generated as per the details given by your employer/HR. Incase of any errors in the
|
||||
details you may confirm the same through your employer for making required corrections.</li>
|
||||
|
||||
@ -1,68 +0,0 @@
|
||||
<body>
|
||||
|
||||
<div style="display: flex;gap: 5px;width: 840px;justify-content: center;margin: 0 auto;">
|
||||
<div class="card" style="border: 1px solid #50505059;width: 420px;min-height: 280px; padding:10px 10px 0px 10px;background-image: url(../image/vidal\ background\ image.jpg);background-position: center;background-size: cover;">
|
||||
|
||||
<div style="position: absolute;left: 590px;" ><img src="{INSURER_LOGO}" alt="" width="70px" height="70px"></div>
|
||||
<h6 style="margin-top: 20px;margin-bottom: 26px;font-weight: 700;font-size: 14px;">{INSURER_NAME}</h6>
|
||||
|
||||
<table style="font-size: 14px;margin-top:9px ;margin-left: 20px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>POLICY NO</td>
|
||||
<td>:</td>
|
||||
<td>{TPA_ID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>:</td>
|
||||
<td>{NAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gender</td>
|
||||
<td>:</td>
|
||||
<td>{NAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>age</td>
|
||||
<td>:</td>
|
||||
<td>{AGE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Employee code</td>
|
||||
<td>:</td>
|
||||
<td>{EMP_ID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Corporate name</td>
|
||||
<td>:</td>
|
||||
<td>{CORPORATE_NAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Valid form</td>
|
||||
<td>:</td>
|
||||
<td>{POLICY_DATE}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div style="position: relative;left: 225px;top: 30px;"><img src="{TPA_LOGO}" alt="" width="170px" height="30px" style="object-fit: fill;"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card" style="border: 1px solid #50505059;width:420px;min-height: 280px; padding: 0px 20px 5px 0px;">
|
||||
<h6 style="text-align: center;font-weight: 700;margin: 0px;font-size: 14px;"><u>Terms&conditions</u></h6>
|
||||
<ul style="font-size: 11px;text-align: justify;font-weight: bolder;font-weight: 600;line-height: 13px;margin-bottom: 5px;">
|
||||
<li>Submit this card & photo ID for availing cashless insurrer empanelled hospitals</li>
|
||||
<li>Cashless facility is subject to approved by TPA as per policy terms and conditions</li>
|
||||
<li>Validdity of this card is subject to valid policy renewal of policy</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
@ -3,25 +3,25 @@
|
||||
<div style="display: flex;justify-content:center;gap: 10px;">
|
||||
<div style="border: 1px solid black;max-height: 250px;width: 400px;background-image: url({FRONT_CARD});background-size: 100% 100%;position: relative;">
|
||||
<div style="height: 50px;width: 100px;position: absolute;top: 20px;right: 40px;">
|
||||
<img src="../image/niva.png" alt="" width="100px" height="50px" style="object-fit: fill;">
|
||||
<img src="{INSURER_LOGO}" alt="" width="100px" height="50px" style="object-fit: fill;">
|
||||
</div>
|
||||
<table style="width: 100%;font-family: sans-serif;font-size: 14px;margin-left: 20px;margin-top: 55px;line-height: 19px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Haamira Banu</td>
|
||||
<td>{NAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: auto;"><b>Xoriant Solutions Pvt Ltd</b></td>
|
||||
<td style="width: auto;"><b>{CORPORATE_NAME}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>Dob : 02/05/2000</span><span style="padding-left: 40px;">EMP ID : 73496</span></td>
|
||||
<td><span>Dob : {DOB}</span><span style="padding-left: 40px;">EMP ID : {EMP_ID}</span></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PHS ID : MBHI CHE 38728183 XSP E</td>
|
||||
<td>PHS ID : {TPA_ID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Valid upto : 31/01/2024</td>
|
||||
<td>Valid upto : {POLICY_DATE}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -47,9 +47,9 @@
|
||||
<div style="display: flex;justify-content: center;">
|
||||
<table style="border-spacing:50px 10px;">
|
||||
<tr>
|
||||
<td><img src="../image/1 android.png" alt="" width="170px" height="135px"></td>
|
||||
<td><img src="{QR_ANDROID}" alt="" width="170px" height="135px"></td>
|
||||
<td style="font-family: sans-serif;display: flex;align-items: start;font-size: 22px;"><b>Mobile App</b></td>
|
||||
<td><img src="../image/1-ios.png" alt="" width="150px" height="140px"></td>
|
||||
<td><img src="{QR_IOS}" alt="" width="150px" height="140px"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div style="display: flex;gap: 5px;width: 810px;justify-content: center;margin: 0 auto;">
|
||||
<div class="card" style="border: 1px solid #50505059;width: 420px;min-height: 280px; padding:10px 10px 0px 10px;background-image: url('{FRONT_CARD}');background-position: center;background-size: cover;">
|
||||
|
||||
<div style="position: absolute;left: 590px;" ><img src="{INSURER_LOGO}" alt="" width="70px" height="70px"></div>
|
||||
<div style="position: absolute;left: 317px;"><img src="{INSURER_LOGO}" alt="" width="70px" height="70px" ></div>
|
||||
<h6 style="margin-top: 20px;margin-bottom: 26px;font-weight: 700;font-size: 14px;">{INSURER_NAME}</h6>
|
||||
|
||||
<table style="font-size: 14px;margin-top:9px ;margin-left: 20px;">
|
||||
@ -60,9 +60,6 @@
|
||||
<li>imidiate intimation to vidal health is must incase of any hospitalisation</li>
|
||||
<li>Download the vidal health mobile app from android iOS to get an E-Card check your policy claim status, Hospital list and more, Give a missed call to 022-4892-6099 from your registered mobile number, or visit www.vidalhealthpa.com,or scan << Qr code on corner >></li>
|
||||
</ul>
|
||||
<div >
|
||||
<img src="../image/logo.png" alt="" width="100px" height="25px" style="object-fit: fill; rotate: -90deg; position: absolute;left: -34px;bottom: 77px;">
|
||||
</div>
|
||||
<div style="font-size: 10px;font-weight: bold; line-height: 10px;margin-left: 40px;width: 70%;">
|
||||
<div><u>24x7 help line no</u> </div>
|
||||
<div>
|
||||
@ -96,8 +93,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div><img src="../image/2-play store.png" alt="" width="80px" height="80px" style="position: absolute;top: 158px; right: 90px;"></div>
|
||||
<div><img src="../image/2-appstore.png" alt="" width="76px" height="80px" style="position: absolute;right: 10px;top:158px;"></div>
|
||||
<div><img src="{QR_ANDROID_2}" alt="" width="60px" height="60px" style="position: absolute;top: 210px; right: 70px;"></div>
|
||||
<div><img src="{QR_IOS_2}" alt="" width="56px" height="60px" style="position: absolute;right: 10px;top:210px;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||