WELLNESS issue : GWM

This commit is contained in:
Gowtham M 2026-07-03 17:49:28 +05:30
parent 565fa516cf
commit c471131171

View File

@ -3061,12 +3061,23 @@ class EmployeeRestController extends AdminController
->where('client_branch_id', $this->request->getGet('client_branch_id'))
->where('is_active', 1)->findAll();
$employeeSelfData = $this->employeeModel->where('emp_code', $this->request->getGet('emp_code'))
->where('client_id', $this->request->getGet('client_id'))
->where('client_branch_id', $this->request->getGet('client_branch_id'))
->where('family_floater_key', 'self')->where('is_active', 1)
->orderBy('id', 'DESC')
->get()->getRow();
// get self data corporate email ore mobile no should not be null
$employeeSelfData = $this->employeeModel
->where('emp_code', $this->request->getGet('emp_code'))
->where('client_id', $this->request->getGet('client_id'))
->where('client_branch_id', $this->request->getGet('client_branch_id'))
->where('family_floater_key', 'self')
->where('is_active', 1)
->groupStart()
->where('email_corporate IS NOT NULL', null, false)
->orWhere('mobile IS NOT NULL', null, false)
->groupEnd()
->orderBy('id', 'DESC')
->get()
->getRow();
// dd(db_connect()->getLastQuery()->getQuery());
// dd($employeeSelfData->id); //employee id
$employeeName = $employeeSelfData->name ?? "";