CHANGE_API : RV
This commit is contained in:
parent
179bc74ce9
commit
783aaa9a54
@ -448,6 +448,7 @@ $routes->cli('cli/new_gdrive_token', 'GoogleDriveController::generateNewGoogleDr
|
|||||||
//crone job
|
//crone job
|
||||||
$routes->cli('cli/enrollOpendAndClose', 'DashboardController::updatePolicyEnrollmentStatus');
|
$routes->cli('cli/enrollOpendAndClose', 'DashboardController::updatePolicyEnrollmentStatus');
|
||||||
$routes->cli("cli/sendCroneRemainderMail", "DashboardController::sendCroneRemainderMail");
|
$routes->cli("cli/sendCroneRemainderMail", "DashboardController::sendCroneRemainderMail");
|
||||||
|
$routes->cli('cli/update-emp-policy-status', 'ClientController::updateEmpAndPolicyStatus');
|
||||||
|
|
||||||
//Employee login api's
|
//Employee login api's
|
||||||
$routes->post("/employeeRest/verifyEmployeeNumber", "RestAuthenticationController::verifyEmployeeWithMobileNumber");
|
$routes->post("/employeeRest/verifyEmployeeNumber", "RestAuthenticationController::verifyEmployeeWithMobileNumber");
|
||||||
|
|||||||
@ -336,7 +336,8 @@ class EmployeeController extends AdminController
|
|||||||
->join('client_branch cb', 'files.client_branch_id = cb.id', 'left')
|
->join('client_branch cb', 'files.client_branch_id = cb.id', 'left')
|
||||||
->join('policy_type', 'policy_type.id = cp.policy_type_id')
|
->join('policy_type', 'policy_type.id = cp.policy_type_id')
|
||||||
->join('clients c', 'files.client_id = c.id and files.client_id = cp.client_id', 'left')
|
->join('clients c', 'files.client_id = c.id and files.client_id = cp.client_id', 'left')
|
||||||
->join("client_rm cr","cr.client_id = c.id and cr.is_active = 1",'left');
|
->join("client_rm cr","cr.client_id = c.id and cr.is_active = 1",'left')
|
||||||
|
->where('files.is_active', 1);
|
||||||
if (in_array($role_id, [2, 3])) {
|
if (in_array($role_id, [2, 3])) {
|
||||||
|
|
||||||
// If the user is a Account Manager or Manager, filter by user_id
|
// If the user is a Account Manager or Manager, filter by user_id
|
||||||
@ -386,7 +387,8 @@ class EmployeeController extends AdminController
|
|||||||
->join('client_branch', 'client_branch.id = batch_files.client_branch_id')
|
->join('client_branch', 'client_branch.id = batch_files.client_branch_id')
|
||||||
->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
|
->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
|
||||||
->join('clients', 'clients.id = client_policy.client_id')
|
->join('clients', 'clients.id = client_policy.client_id')
|
||||||
->join("client_rm cr","cr.client_id = clients.id and cr.is_active = 1",'left');
|
->join("client_rm cr","cr.client_id = clients.id and cr.is_active = 1",'left')
|
||||||
|
->where('batch_files.is_active', 1);
|
||||||
if (in_array($role_id, [2, 3])) {
|
if (in_array($role_id, [2, 3])) {
|
||||||
|
|
||||||
// If the user is a Account Manager or Manager, filter by user_id
|
// If the user is a Account Manager or Manager, filter by user_id
|
||||||
|
|||||||
@ -2502,7 +2502,8 @@ class EmployeeRestController extends AdminController
|
|||||||
function getEmployeeActiveOrInactivePolicy()
|
function getEmployeeActiveOrInactivePolicy()
|
||||||
{
|
{
|
||||||
if($this->request->getGet('type') == 'Active'){ $policy_status = 1; }else{ $policy_status = 0; }
|
if($this->request->getGet('type') == 'Active'){ $policy_status = 1; }else{ $policy_status = 0; }
|
||||||
$ClientPolicyData = $this->clientPolicyModel->select('client_policy.* , policy_type.policy_type as policy_type,insurers.name as insurer_name,tpa.name as tpa_name,tpa.network_hospitals as network_hospitals_url, policy_type.long_name as policy_long_name')
|
$dayInterval = 10;
|
||||||
|
$ClientPolicyData = $this->clientPolicyModel->select("client_policy.* , policy_type.policy_type as policy_type,insurers.name as insurer_name,tpa.name as tpa_name,tpa.network_hospitals as network_hospitals_url, policy_type.long_name as policy_long_name, DATE_ADD(client_policy.policy_end_date, INTERVAL {$dayInterval} DAY) as claims_grace_date")
|
||||||
->join('insurers', 'client_policy.insurer_id = insurers.id', 'left')
|
->join('insurers', 'client_policy.insurer_id = insurers.id', 'left')
|
||||||
->join('tpa', 'client_policy.tpa_id = tpa.id', 'left')
|
->join('tpa', 'client_policy.tpa_id = tpa.id', 'left')
|
||||||
->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left')
|
->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left')
|
||||||
@ -2565,6 +2566,7 @@ class EmployeeRestController extends AdminController
|
|||||||
$data['policy_start_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_start_date']);
|
$data['policy_start_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_start_date']);
|
||||||
$data['policy_end_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_end_date']);
|
$data['policy_end_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_end_date']);
|
||||||
$data['heading'] = $ClientPolicyValue['policy_long_name'];
|
$data['heading'] = $ClientPolicyValue['policy_long_name'];
|
||||||
|
$data['claims_grace_date'] = $ClientPolicyValue['claims_grace_date'];
|
||||||
// $data['policy_terms'] = $terms;
|
// $data['policy_terms'] = $terms;
|
||||||
|
|
||||||
// if($ClientPolicyValue['policy_type_id'] == 1){ $data['heading'] = 'Group Personal Accident Coverage'; }else
|
// if($ClientPolicyValue['policy_type_id'] == 1){ $data['heading'] = 'Group Personal Accident Coverage'; }else
|
||||||
|
|||||||
@ -78,7 +78,7 @@ class RestAuthenticationController extends AdminController
|
|||||||
->where('employees.emp_status !=', 'truncated')
|
->where('employees.emp_status !=', 'truncated')
|
||||||
->where('employees.mobile', $mobile_number)
|
->where('employees.mobile', $mobile_number)
|
||||||
->where('EP.is_active', 1)
|
->where('EP.is_active', 1)
|
||||||
->whereIn('EP.status', ['active'])
|
->whereIn('EP.status', ['active', 'expired'])
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ class RestAuthenticationController extends AdminController
|
|||||||
->where('employees.emp_status !=', 'truncated')
|
->where('employees.emp_status !=', 'truncated')
|
||||||
->where('employees.email_corporate', $email)
|
->where('employees.email_corporate', $email)
|
||||||
->where('EP.is_active', 1)
|
->where('EP.is_active', 1)
|
||||||
->whereIn('EP.status', ['active'])
|
->whereIn('EP.status', ['active', 'expired'])
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if (isset($employeeData['employee_id'])) {
|
if (isset($employeeData['employee_id'])) {
|
||||||
|
|||||||
@ -331,7 +331,7 @@ class ClientPolicyModel extends Model
|
|||||||
$client_count = $this->db->affectedRows();
|
$client_count = $this->db->affectedRows();
|
||||||
|
|
||||||
// Update employee_polices table
|
// Update employee_polices table
|
||||||
$employee = $this->db->query("UPDATE employee_polices SET status = 'expired', is_active = 0 WHERE policy_end_date < CURDATE()");
|
$employee = $this->db->query("UPDATE employee_polices SET status = 'expired' WHERE policy_end_date < CURDATE()");
|
||||||
$emp_count = $this->db->affectedRows();
|
$emp_count = $this->db->affectedRows();
|
||||||
|
|
||||||
// Log the result
|
// Log the result
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user