diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 5fa86502..39440f05 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -4604,9 +4604,10 @@ class ClientController extends AdminController // $employeeRestController->employeesEnrollmentInsert(['file_id' => 836]); // $r = Jobs::addJob(['job_name' => 'employeesEnrollmentInsert','payload' => ['file_id' => 721]]); $empServiceController = new EmployeeServiceController(); - // $res = $empServiceController->excelFileFormatValidation(['file_id' => '873']); - // $res = $empServiceController->excelFileDataValidation(['file_id' => '874']); + // $res = $empServiceController->excelFileFormatValidation(['file_id' => '865']); + // $res = $empServiceController->excelFileDataValidation(['file_id' => '865']); // $res = $empServiceController->employeesSIEnhanceProcess(['file_id' => '829']); + // $res = $empServiceController->employeeDisembark(['file_id' => '858']); // dd('-----', $res); diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php index 9917796f..31c2ff0f 100755 --- a/app/Controllers/EmployeeServiceController.php +++ b/app/Controllers/EmployeeServiceController.php @@ -728,6 +728,7 @@ class EmployeeServiceController extends AdminController $allowedHighestColumn = end($columns_to_check); // dd($allowedHighestColumn); $excel_data = $sheet->rangeToArray('A1:' . $allowedHighestColumn['col_cell_name'] . $highestRowAndColumn['row']); + $excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data); // !dd(array_chunk($excel_data,20)[0]); //check no of columns in excel @@ -997,7 +998,7 @@ class EmployeeServiceController extends AdminController $allowedHighestColumn = end($columns_to_check); $excel_data = $sheet->rangeToArray('A1:' . $allowedHighestColumn['col_cell_name'] . $highestRowAndColumn['row']); - // print_r($keys);die(); + $excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data); //remove header unset($excel_data[0]); @@ -1367,7 +1368,15 @@ class EmployeeServiceController extends AdminController break; } // echo '
START- ' . $row[2]; - $employee = $this->employeeModel->where('emp_code', $row[1])->where('name',$row[2])->where('client_id',$file['client_id'])->where('client_branch_id',$file['client_branch_id'])->first(); + + $employee = $this->employeeModel + ->where('emp_code', $row[1]) + ->where('name',$row[2]) + ->where('client_id',$file['client_id']) + ->where('client_branch_id',$file['client_branch_id']) + ->where('emp_status !=','truncated') + ->where('is_active', 1) + ->first(); // $employee = $this->employeeModel->where('emp_code', $row[1])->where('name',$row[2])->where('client_id',$file['client_id'])->first(); // dd($employee); if(is_array($employee) && count($employee)) @@ -1380,6 +1389,7 @@ class EmployeeServiceController extends AdminController ->where('name',$employee['name']) ->where('field_name','emp_status') ->where('status !=','truncated') + ->where('is_active', 1) ->findAll(); // dd($existing_endorsements);