FIX_EMP_DATA

This commit is contained in:
VENKATESHWARAN 2025-12-06 15:19:54 +05:30
parent dabe60b498
commit 1f740207c1

View File

@ -1163,10 +1163,20 @@ class EmployeeRestController extends AdminController
$result = [];
foreach ($empPolicy as $array) {
// Reset employee array
$empData = $employeeData;
// $empData = $employeeData;
$empData = $this->employeeModel
->join('employee_polices', 'employee_polices.employee_id = employees.id')
->where('employees.emp_code',$emp_code)
->where('employees.client_id',$client_id)
->where('employees.client_branch_id',$client_branch_id)
->where('employee_polices.client_policy_id',$array->ClientPolicyId)
->where('employees.is_active', 1 )
->where('employee_polices.is_active', 1 )
->where('employees.is_addon_value',0)
->findAll();
// Removes specific keys from the decoded array and assigns the result to $refusingData
$decodedArray = json_decode($array->Policy_Terms);
$refusingData = (object) array_diff_key((array) $decodedArray, array_flip($keysToRemove));