diff --git a/app/Controllers/EmpDataServiceController.php b/app/Controllers/EmpDataServiceController.php index 6325255f..f5ade0fb 100644 --- a/app/Controllers/EmpDataServiceController.php +++ b/app/Controllers/EmpDataServiceController.php @@ -274,6 +274,7 @@ class EmpDataServiceController extends BaseController $count = count($objects); $export_data['count'] = $count; + $export_data['status'] = 'success'; $this->myLogger->logme('error', 'Correction export data count : {data}', ['data' => $count]); if ($count == 0) { @@ -533,6 +534,90 @@ class EmpDataServiceController extends BaseController + public function generateExcelForAdditionAndDependentAddition($export_data) + { + $ids = []; + + $objects = $this->employeePolicyModel->getCorrectionEmployeesDataForExportExcel($export_data); + + foreach ($objects as $obj) { + $ids[] = $obj->id; + } + + $count = count($objects); + $export_data['count'] = $count; + $export_data['status'] = 'success'; + $this->myLogger->logme('error', 'Addition And Dependent Addition export data count : {data}', ['data' => $count]); + + if ($count == 0) { + $this->myLogger->logme('error', 'No Record found. Endorsement ID Alread Updated. Correction export data count : {data}', ['data' => $count]); + return false; + } + + $this->removeOldExportInfoFromBatchFile($export_data); + + + $this->myLogger->logme('error', 'Addition And Dependent Addition export file name : {data}', ['data' => $export_data['file_name']]); + + $correction_data = transform_objects_to_array_for_correction($objects); + + $headers = [ + 'Emp Code', + 'RISK ID', + 'NAME OF EMP/DEP', + 'EMP/DEP TYPE', + 'RELATION', + 'DOB', + 'GENDER', + 'Wrong Data', + 'Correct Data', + 'Remarks', + 'Endorsement_Id' + ]; + + // Create a temporary file in memory + $tempFile = tmpfile(); + + // Generate Excel file with the temporary file + $value = generate_excel($headers, $correction_data, $tempFile); + + if ($value) { + + + + $return = $this->batchFilesAndBatchListEntry($export_data, $objects); + + if ($return) { + + foreach ($ids as $key => $id) { + $group_key = $this->empEndorsementModel->select('group_key')->where('id', $id)->first(); + if ($group_key) { + $this->empEndorsementModel->where('group_key', $group_key)->set('status', 'inprogress')->update(); + } + } + + // Set the appropriate headers for Excel file download + header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + header('Content-Disposition: attachment;filename="' . $export_data['file_name'] . '"'); + header('Cache-Control: max-age=0'); + + // Rewind the temporary file pointer + rewind($tempFile); + + // Output the contents of the temporary file to the browser + fpassthru($tempFile); + + // Close and remove the temporary file + fclose($tempFile); + + return true; + } else { + return false; + } + } + } + + /** * The below functions are Imports data from an Excel file for : * - Inception @@ -583,9 +668,29 @@ class EmpDataServiceController extends BaseController $file_name_with_path = WRITEPATH . "/uploads/import_excel/" . $file['file_name']; $excel_data = $this->readExcelFileToArray($file_name_with_path); + $excel_header = $excel_data[0]; unset($excel_data[0]); array_pop($excel_data); + $inceptionHeader = ['S.No', 'NAME OF EMP/DEP','EMP ID','EMP/DEP TYPE','RELATION','DOB','GENDER','PRE EXISTING AILMENTS','BASIC COVER SI','DATE OF COVERAGE','AGE','RELATIONSHIP','REMARKS','POLICY END DATE','NO OF DAYS','TPA ID','UHID','PREMIUM','PR0 RATA PREMIUM','GST','TOTAL']; + + foreach ($inceptionHeader as $key => $value) { + if($excel_header[$key] != $value){ + $data = [ + 'status' => 'failed-5', + ]; + + $this->batchFileModel->where('id', $file_id)->set($data)->update(); + + $file_data = $this->getDataByFileId($file_id, 'failure'); + $this->setPullNotification($file_data); + + $this->myLogger->logme('error', 'Inception File Validation -- Upload the worng excel file'); + return ['status' => 'error', 'message' => 'Upload the worng excel file']; + } + } + + $emp_count = count($excel_data); $employee_data = $this->employeePolicyModel @@ -1116,7 +1221,6 @@ class EmpDataServiceController extends BaseController //Endorsement Correction - public function importCorrectionValidation($params) { @@ -1143,8 +1247,29 @@ class EmpDataServiceController extends BaseController } $excel_data = $this->readExcelFileToArray($file_name_with_path); + $excel_header = $excel_data[0]; unset($excel_data[0]); + $headers = ['Emp Code','RISK ID','NAME OF EMP/DEP','EMP/DEP TYPE','RELATION','DOB','GENDER','Wrong Data','Correct Data','Remarks','Endorsement_Id']; + + + foreach ($headers as $key => $value) { + if($excel_header[$key] != $value){ + $data = [ + 'status' => 'failed-5', + ]; + + $this->batchFileModel->where('id', $file_id)->set($data)->update(); + + $file_data = $this->getDataByFileId($file_id, 'failure'); + $this->setPullNotification($file_data); + + $this->myLogger->logme('error', 'Correction File Validation -- Upload the worng excel file'); + return ['status' => 'error', 'message' => 'Upload the worng excel file']; + } + } + + $endorsement_data = $this->empEndorsementModel ->select(" @@ -1477,7 +1602,7 @@ class EmpDataServiceController extends BaseController if (isset($result['id']) && $result['id'] !== null) { // return $result; - $emp_details[] = array('id' => $result['emp_id'], 'group_key' => $result['group_key'], $result['field_name'] => $value[8]); + $emp_details[] = array('id' => $result['emp_id'], $result['field_name'] => $value[8]); $endorsement_details[] = array('group_key' => $result['group_key'], 'id' => $result['id'], 'endorsement_id' => $value[10], 'status' => 'complete'); } @@ -1486,7 +1611,7 @@ class EmpDataServiceController extends BaseController // return [$emp_details, $endorsement_details]; $this->empEndorsementModel->updateBatch($endorsement_details, 'group_key'); - $this->employeeModel->updateBatch($emp_details); + $this->employeePolicyModel->bulkUpdateForCorrection($emp_details); // Update batch file status and amount $this->batchFileModel->update($file_id, [ @@ -1531,9 +1656,30 @@ class EmpDataServiceController extends BaseController } $excel_data = $this->readExcelFileToArray($file_name_with_path); + $excel_header = $excel_data[0]; unset($excel_data[0]); + $headers = ['S.No','NAME OF EMP/DEP','EMP ID','EMP/DEP TYPE','RELATION','DOB','GENDER','PRE EXISTING AILMENTS','BASIC COVER SI','Old Sum Insured','Date of Coverage','Policy End Date','No Of Days','Old SI Premium','New SI premium','Difference premium','Pro Rata Premium','GST','Total','ENDORSEMENT_ID']; + + + foreach ($headers as $key => $value) { + if($excel_header[$key] != $value){ + $data = [ + 'status' => 'failed-5', + ]; + + $this->batchFileModel->where('id', $file_id)->set($data)->update(); + + $file_data = $this->getDataByFileId($file_id, 'failure'); + $this->setPullNotification($file_data); + + $this->myLogger->logme('error', 'SI Enhancement File Validation -- Upload the worng excel file'); + return ['status' => 'error', 'message' => 'Upload the worng excel file']; + } + } + + $db = \Config\Database::connect(); // Raw SQL query @@ -2113,9 +2259,28 @@ class EmpDataServiceController extends BaseController } $excel_data = $this->readExcelFileToArray($file_name_with_path); + $excel_header = $excel_data[0]; unset($excel_data[0]); array_pop($excel_data); + $headers = ['S.No','EMP ID','EMP NAME','DOB','GENDER','RELATIONSHIP','SUM INSURED','Date of Leaving','Policy End Date','No Of Days','Premium','Pro Rata Premium','GST','Total','Claim Status','ENDORSEMENT_ID']; + + + foreach ($headers as $key => $value) { + if($excel_header[$key] != $value){ + $data = [ + 'status' => 'failed-5', + ]; + + $this->batchFileModel->where('id', $file_id)->set($data)->update(); + + $file_data = $this->getDataByFileId($file_id, 'failure'); + $this->setPullNotification($file_data); + + $this->myLogger->logme('error', 'Deletion File Validation -- Upload the worng excel file'); + return ['status' => 'error', 'message' => 'Upload the worng excel file']; + } + } $db = \Config\Database::connect(); @@ -2524,17 +2689,17 @@ class EmpDataServiceController extends BaseController // Check if $employees_table_data is null or empty if (empty($employees_table_data)) { - return ['error' => true, 'message' => 'Employees table data is empty or null.']; + return ['status' => 'error', 'message' => 'Employees table data is empty or null.']; } // Check if $employee_policy_table_data is null or empty if (empty($employee_policy_table_data)) { - return ['error' => true, 'message' => 'Employee policy table data is empty or null.']; + return ['status' => 'error', 'message' => 'Employee policy table data is empty or null.']; } // Check if $emp_endorsement_table_data is null or empty if (empty($emp_endorsement_table_data)) { - return ['error' => true, 'message' => 'Employee endorsement table data is empty or null.']; + return ['status' => 'error', 'message' => 'Employee endorsement table data is empty or null.']; } $this->employeeModel->updateBatch($employees_table_data, 'id'); @@ -2576,6 +2741,403 @@ class EmpDataServiceController extends BaseController } + + + + //Endorsement Addition and Dependent Addition + + + public function AdditionAndDependentAddition($params) + { + + $this->myLogger->logme('error', 'Addition And Dependent Addition File Validation -- Function called'); + + $file_id = $params['file_id']; + $file = $this->batchFileModel->where('id', $file_id)->first(); + + $client_id = $file['client_id']; + $client_policy_id = $file['client_policy_id']; + $client_branch_id = $file['client_branch_id']; + $batch_code = $file['batch_code']; + $user_id = $file['created_by']; + + $file_name_with_path = WRITEPATH . "/uploads/import_excel/" . $file['file_name']; + + if (!file_exists($file_name_with_path)) { + + $this->myLogger->logme('error', 'Addition And Dependent Addition File Validation -- The Physical file not found'); + $this->myLogger->logme('error', 'Addition And Dependent Addition File Validation -- File Name : {data}', ['data' => $file['file_name']]); + $this->myLogger->logme('error', 'Addition And Dependent Addition File Validation -- File Path : {data}', ['data' => $file_name_with_path]); + + return 'The Physical file not found'; + } + + $excel_data = $this->readExcelFileToArray($file_name_with_path); + unset($excel_data[0]); + + + $endorsement_data = $this->empEndorsementModel + ->select(" + emp_endorsement.id, + emp_endorsement.pk, + emp_endorsement.emp_code, + emp_endorsement.endorsement_id, + emp_endorsement.old_value, + emp_endorsement.new_value, + emp_endorsement.field_name, + emp_endorsement.remarks, + emp_endorsement.actions, + employees.id AS primaryKey, + employees.name AS emp_name, + employees.dob AS emp_dob, + employees.gender AS emp_gender, + employees.client_id AS emp_client_id, + 'Has Define' AS emp_type, + employee_polices.uhid, + employees.relationship_code + ") + ->join("employees", "employees.id = emp_endorsement.pk", "left") + ->join("employee_polices", "employees.id = employee_polices.employee_id", "left") + ->where("employees.client_id", $client_id) + ->where("employee_polices.client_policy_id", $client_policy_id) + ->where("employees.client_branch_id", $client_branch_id) + ->where("employees.is_active", 1) + ->where("employees.emp_status", "active") + ->where("emp_endorsement.actions", "c") + ->where("(emp_endorsement.endorsement_id IS NULL OR emp_endorsement.endorsement_id = '')") + ->findAll(); + + + + // dd($endorsement_data, $excel_data); + + + if ($endorsement_data == null || empty($endorsement_data)) { + + $data = [ + 'status' => 'failed-1', + ]; + + $this->batchFileModel->where('id', $file_id)->set($data)->update(); + $this->myLogger->logme('error', 'correctionFileValidation ENDORSEMENT ID already updated'); + + $file_data = $this->getDataByFileId($file_id, 'failure'); + $this->setPullNotification($file_data); + + return 'The list of employees provided has already been updated with the ENDORSEMENT ID, or this is not the correct file'; + + $this->myLogger->logme('error', 'Addition And Dependent Addition File Validation ENDORSEMENT ID already updated or the uploadedfile is not correct'); + } + + $excel_data_count = count($excel_data); + $endorsement_data_count = count($endorsement_data); + + $this->myLogger->logme('error', 'Addition And Dependent Addition File Validation excel file count : {data}', ['data' => $excel_data_count]); + $this->myLogger->logme('error', 'Addition And Dependent Addition File Validation database count : {data}', ['data' => $endorsement_data_count]); + + + $difference = $endorsement_data_count - $excel_data_count; + + $status = 'in-progress'; + if ($excel_data_count < $endorsement_data_count) { + + $status = 'in-progress-partially'; + $partially_updated_data = 'Expected : ' . $endorsement_data_count . ', ' . 'Updated : ' . $excel_data_count . ', ' . 'difference : ' . $difference; + $this->myLogger->logme('error', 'Addition And Dependent Addition File Validation excel file count partially : {data}', ['data' => $partially_updated_data]); + } + + + + if ($endorsement_data_count < $excel_data_count) { + + $data = [ + 'status' => 'failed-3', + ]; + + $this->batchFileModel->where('id', $file_id)->set($data)->update(); + $this->myLogger->logme('error', 'Addition And Dependent Addition File Validation excel file count ( {excel} ) exceeds db count ( {db} )', ['db' => $endorsement_data_count, 'excel' => $excel_data_count]); + + $file_data = $this->getDataByFileId($file_id, 'failure'); + $this->setPullNotification($file_data); + + return 'The Excel record count exceeds the DB record count. excel file count : ' . $excel_data_count . 'db count : ' . $endorsement_data_count; + } + + + $errors = []; // Initialize an array to store errors + $missing_id = []; + $batch_list_id = []; + + foreach ($endorsement_data as $key => $endorsement_value) { + + $key = $key + 1; + + if (!isset($excel_data[$key])) { + break; + } + + + if ($excel_data[$key][10] === null) { + $missing_id[$key][] = [ + 'row' => $key, + 'column' => 10, + ]; + } + + + if ($endorsement_value['emp_name'] != $excel_data[$key][2]) { + $errors[$key][] = [ + 'row' => $key, + 'column' => 2, + 'db_data' => $endorsement_value['emp_name'], + 'excel_data' => $excel_data[$key][2] + ]; + } + + if ($endorsement_value['emp_code'] != $excel_data[$key][0]) { + $errors[$key][] = [ + 'row' => $key, + 'column' => 0, + 'db_data' => $endorsement_value['emp_code'], + 'excel_data' => $excel_data[$key][0] + ]; + } + + if ($endorsement_value['emp_dob'] != $excel_data[$key][5]) { + $errors[$key][] = [ + 'row' => $key, + 'column' => 5, + 'db_data' => $endorsement_value['emp_dob'], + 'excel_data' => $excel_data[$key][5] + ]; + } + + if ($endorsement_value['emp_gender'] != $excel_data[$key][6]) { + $errors[$key][] = [ + 'row' => $key, + 'column' => 6, + 'db_data' => $endorsement_value['emp_gender'], + 'excel_data' => $excel_data[$key][6] + ]; + } + + if ($endorsement_value['old_value'] != $excel_data[$key][7]) { + $errors[$key][] = [ + 'row' => $key, + 'column' => 7, + 'db_data' => $endorsement_value['old_value'], + 'excel_data' => $excel_data[$key][7] + ]; + } + + if ($endorsement_value['new_value'] != $excel_data[$key][8]) { + $errors[$key][] = [ + 'row' => $key, + 'column' => 8, + 'db_data' => $endorsement_value['new_value'], + 'excel_data' => $excel_data[$key][8] + ]; + } + + + + if ($endorsement_value['uhid'] != $excel_data[$key][1]) { + $errors[$key][] = [ + 'row' => $key, + 'column' => 1, + 'db_data' => $endorsement_value['uhid'], + 'excel_data' => $excel_data[$key][1] + ]; + } + + $batch_list_id[] = $endorsement_value['primaryKey']; + } + + + $error_count = count($errors); + $json_errors = json_encode($errors); + + + $missing_id_count = count($missing_id); + $json_missing_id = json_encode($missing_id); + + // dd($error_count, $missing_id_count, $json_errors, $json_missing_id, $batch_list_id); + + + if ($missing_id_count > 0) { + + $data = [ + + 'count' => $endorsement_data_count, + 'error_data' => $json_missing_id, + 'status' => 'failed', + ]; + + $this->batchFileModel->where('id', $file_id)->set($data)->update(); + + $file_data = $this->getDataByFileId($file_id, 'failure'); + $this->setPullNotification($file_data); + + return 'The ENDORSEMENT ID column is either partially or entirely empty.'; + + } + + + if ($error_count > 0) { + + $data = [ + + 'count' => $endorsement_data_count, + 'error_data' => $json_errors, + 'status' => 'failed', + ]; + + $this->batchFileModel->where('id', $file_id)->set($data)->update(); + return 'Correction Validation Failed'; + + } else { + + $data = [ + 'count' => $endorsement_data_count, + 'status' => $status, + 'error_data' => $partially_updated_data ?? null, + ]; + + $this->batchFileModel->where('id', $file_id)->set($data)->update(); + + + foreach ($batch_list_id as $key => $value) { + + $data = [ + 'emp_policy_id' => $value, + 'batch_code' => $batch_code, + 'created_by' => $user_id, + ]; + + $insert = $this->batchListModel->insert($data); + } + + + $job_details = new Jobs(); + $r = Jobs::addJob(['job_name' => 'importAdditionAndDependentAdditionUpdateEndorsementID','payload' => ['file_id' => $file_id]]); + + // $this->importAdditionAndDependentAdditionUpdateEndorsementID(['file_id' => $file_id]); + + return 'Correction Validation Success'; + } + } + + + public function importAdditionAndDependentAdditionUpdateEndorsementID($params){ + + $this->myLogger->logme('error', 'importCorrectionUpdateEndorsementID called'); + + $file_id = $params['file_id']; + $file = $this->batchFileModel->find($file_id); + if (!$file) { + + $data = [ + 'status' => 'failed-4', + ]; + + $this->batchFileModel->where('id', $file_id)->set($data)->update(); + $this->myLogger->logme('error', 'importCorrectionUpdateEndorsementID the Physical file not found - file id : {data}', ['data' => $file_id]); + + $file_data = $this->getDataByFileId($file_id, 'failure'); + $this->setPullNotification($file_data); + + return 'importCorrectionUpdateEndorsementID the Physical file not found'; // Return error code if file not found + } + + $client_id = $file['client_id']; + $client_policy_id = $file['client_policy_id']; + $client_branch_id = $file['client_branch_id']; + $insurer_or_tpa = $file['insurer_or_tpa']; + $status = $file['status']; + $batch_code = $file['batch_code']; + $user_id = $file['created_by']; + + + $status_val = 'success'; + if ($status == 'in-progress-partially') { + + $status_val = 'partially success'; + } + + $this->myLogger->logme('error', 'importCorrectionUpdateEndorsementID file name : {data}', ['data'=> $file['file_name']]); + + $file_name_with_path = WRITEPATH . "/uploads/import_excel/" . $file['file_name']; + $excel_data = $this->readExcelFileToArray($file_name_with_path); + unset($excel_data[0]); + + $emp_ids = []; + $emp_details = []; + $endorsement_id = []; + $endorsement_details = []; + + $emp_count = count($excel_data); + $db = \Config\Database::connect(); + + + foreach ($excel_data as $key => $value) { + + $emp_code = $value[0]; + $old_value = $value[7]; + $endorsement_id[] = $value[10]; + $uhid = $value[1]; + + + $result = $this->empEndorsementModel + ->select('emp_endorsement.*, employees.id as emp_id') + ->join('employees', 'employees.id = emp_endorsement.pk') + ->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', $client_policy_id) + ->where('employee_polices.uhid', $uhid) + ->where('emp_endorsement.old_value', $old_value) + + ->where('employee_polices.is_active', 1) + ->where('employee_polices.status', 'active') + ->where('employees.is_active', 1) + ->where('employees.emp_status', 'active') + ->first(); + + if (isset($result['id']) && $result['id'] !== null) { + + // return $result; + $emp_details[] = array('id' => $result['emp_id'], $result['field_name'] => $value[8]); + $endorsement_details[] = array('group_key' => $result['group_key'], 'id' => $result['id'], 'endorsement_id' => $value[10], 'status' => 'complete'); + } + + } + + // return [$emp_details, $endorsement_details]; + + $this->empEndorsementModel->updateBatch($endorsement_details, 'group_key'); + $this->employeePolicyModel->bulkUpdateForCorrection($emp_details); + + // Update batch file status and amount + $this->batchFileModel->update($file_id, [ + 'count' => $emp_count, + 'status' => $status_val, + ]); + + + $this->myLogger->logme('error', 'importCorrectionUpdateEndorsementID employee count : {data}', ['data'=> $emp_count]); + $this->myLogger->logme('error', 'importCorrectionUpdateEndorsementID batch file status : {data}', ['data'=> $status_val]); + + + $file_data = $this->getDataByFileId($file_id, 'success'); + $this->setPullNotification($file_data); + + + return 'Import Correction Updated '. $status_val . '- Updated Count : ' . $emp_count; + + } + + /** * The below functions are Calculates and records cash deposits for employee policies at inception. * @@ -2601,7 +3163,7 @@ class EmpDataServiceController extends BaseController ")->getRow(); $insurer_id = $this->clientPolicyModel->where('id', $arrayData['client_policy_id'])->first(); - $description = 'The following amount of Rs. ' . $amount->total_sum . '/- has been debited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.'; + $description = 'The following amount of Rs. ' . round($amount->total_sum, 2) . '/- has been debited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.'; if(get_session_userid() == null){ @@ -2643,7 +3205,7 @@ class EmpDataServiceController extends BaseController ")->getRow(); $insurer_id = $this->clientPolicyModel->where('id', $arrayData['client_policy_id'])->first(); - $description = 'The following amount of ' . $amount->total_sum . ' has been credited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.'; + $description = 'The following amount of ' . round($amount->total_sum, 2) . ' has been credited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.'; $data = [ @@ -2683,7 +3245,7 @@ class EmpDataServiceController extends BaseController ")->getRow(); $insurer_id = $this->clientPolicyModel->where('id', $arrayData['client_policy_id'])->first(); - $description = 'The following amount of ' . $amount->total_sum . ' has been credited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.'; + $description = 'The following amount of ' . round($amount->total_sum, 2) . ' has been credited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.'; $data = [ diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index dfe0f07e..644c97ff 100644 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -488,7 +488,7 @@ class EmployeeController extends AdminController // $return = $empDataServiceController->importInceptionFileValidation(['file_id' => $file_id]); if ($return == 1) { - session()->setFlashdata('success', 'Data updated successfully. File is being validated.'); + session()->setFlashdata('success', 'File Uploaded Successfully File is being validated.'); return redirect()->to(base_url('employee/upload')); } else { session()->setFlashdata($return['status'], $return['message']); @@ -506,7 +506,7 @@ class EmployeeController extends AdminController // $return = $empDataServiceController->importCorrectionValidation(['file_id' => $file_id]); if ($return == 1) { - session()->setFlashdata('success', 'Data updated successfully. File is being validated.'); + session()->setFlashdata('success', 'File Uploaded Successfully File is being validated.'); return redirect()->to(base_url('employee/upload')); } else { session()->setFlashdata('error', $return); @@ -525,7 +525,7 @@ class EmployeeController extends AdminController // $return = $empDataServiceController->importSIEnhancementValidation(['file_id' => $file_id]); if ($return == 1) { - session()->setFlashdata('success', 'Data updated successfully. File is being validated.'); + session()->setFlashdata('success', 'File Uploaded Successfully File is being validated.'); return redirect()->to(base_url('employee/upload')); } else { session()->setFlashdata('error', $return); @@ -544,7 +544,7 @@ class EmployeeController extends AdminController if ($return == 1) { - session()->setFlashdata('success', 'Data updated successfully. File is being validated.'); + session()->setFlashdata('success', 'File Uploaded Successfully File is being validated.'); return redirect()->to(base_url('employee/upload')); } else { session()->setFlashdata('error', $return); diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php index 04b52ec6..e55bc755 100644 --- a/app/Views/batch_list.php +++ b/app/Views/batch_list.php @@ -79,11 +79,11 @@ failed + title="= $file['event_type'] == 'inception' ? 'The list of employees provided has already been updated with the TPA ID.' : 'The list of employees provided has already been updated with the ENDORSEMENT ID.' ?> "> failed + title="= $file['event_type'] == 'inception' ? 'The list of employees provided has already been updated with the UHID.' : 'The list of employees provided has already been updated with the ENDORSEMENT ID.' ?>"> failed failed + + failed diff --git a/app/Views/employee_data_list.php b/app/Views/employee_data_list.php index 2e3be7b9..f1f3d935 100644 --- a/app/Views/employee_data_list.php +++ b/app/Views/employee_data_list.php @@ -20,6 +20,10 @@ border-radius: .25rem; transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out; } + +.table-responsive { + overflow-x: auto; +}
| SNO | - -Name/code | -Policy name | -Insurer name |
- TPA ID | -UHID | -Policy status |
- (₹)Sum Insured | -(₹)Premium | -
- (₹)Pro Rata Premium |
- (₹)GST - | - -
|---|
| SNO | + +Name/code | +Policy name | +Insurer name |
+ TPA ID | +UHID | +Policy status |
+ (₹)Sum Insured | +(₹)Premium | +
+ (₹)Pro Rata Premium |
+ (₹)GST + | + +|
|---|---|---|---|---|---|---|---|---|---|---|---|
| - | ( - - ) | -- | - | - | - | - ' . $employee['status'] . ''; - } elseif ($employee['status'] == 'active') { - echo '' . $employee['status'] . ''; - } elseif ($employee['status'] == 'inactive') { - echo '' . $employee['status'] . ''; - }elseif ($employee['status'] == 'expired') { - echo '' . $employee['status'] . ''; - }elseif ($employee['status'] == 'enrolled') { - echo '' . $employee['status'] . ''; - }else{ - echo $employee['status']; - } - ?> - | -- | - | - | - - | |
| - | - | - | - | - | - | - | - | Total | -- | - | - |