FIX_EXCEL_EXTRA_SPACE

This commit is contained in:
Srinivas-Saravanan 2025-04-22 15:48:11 +05:30
parent ef3283b933
commit 1860d57d3e
2 changed files with 8 additions and 1 deletions

View File

@ -445,7 +445,8 @@ $routes->group("/api", ["filter" => "authJWT"], function ($routes) {
$routes->post("employeeRest/saveMpin", "RestAuthenticationController::saveMpin"); $routes->post("employeeRest/saveMpin", "RestAuthenticationController::saveMpin");
$routes->post("employeeRest/updateMpin", "RestAuthenticationController::updateMpin"); $routes->post("employeeRest/updateMpin", "RestAuthenticationController::updateMpin");
// $routes->post("employeeRest/createOrUpdateEmployeePolicySiAmount", "EmployeeRestController::createOrUpdateEmployeePolicySiAmount");
// $routes->post("employeeRest/calculatePremium", "EmployeeRestController::calculatePremium");
$routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) { $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {

View File

@ -28,6 +28,9 @@ use App\Controllers\JobWorker ;
use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Spreadsheet;
use Kint\Kint; use Kint\Kint;
use App\Helpers\ExcelSanitizeHelper;
class EmployeeServiceController extends AdminController class EmployeeServiceController extends AdminController
{ {
@ -1656,6 +1659,8 @@ class EmployeeServiceController extends AdminController
// $this->myLogger->logme('error',('Insert - ' . $value['emp_code'] .' - '. $value['name'])); // $this->myLogger->logme('error',('Insert - ' . $value['emp_code'] .' - '. $value['name']));
// echo 'update emp'; // echo 'update emp';
} }
$value = ExcelSanitizeHelper::sanitizeArrayData($value);
$this->employeeModel->save($value); $this->employeeModel->save($value);
if (isset($value['id'])) { if (isset($value['id'])) {
$emp_id = $value['id']; $emp_id = $value['id'];
@ -2077,6 +2082,7 @@ public function getFileMetaDataByFileId($file_id, $status = 'success'){
$value['created_by'] = $file['created_by']; $value['created_by'] = $file['created_by'];
$log_message = 'Enrollment Insert Employee- '.$value['name'] .'('.$value['emp_code'] .') with PK '; $log_message = 'Enrollment Insert Employee- '.$value['name'] .'('.$value['emp_code'] .') with PK ';
} }
$value = ExcelSanitizeHelper::sanitizeArrayData($value);
$this->employeeModel->save($value); $this->employeeModel->save($value);
if (isset($value['id'])) if (isset($value['id']))