FIX_ENROL_INSERT_EMPTY_ROW&INS_STMT_NULL_HANDLING
This commit is contained in:
parent
808fdfc247
commit
4fa7537a63
@ -1981,7 +1981,9 @@ public function employeesEnrollmentInsert($params)
|
||||
|
||||
foreach ($excel_data as $key => $row)
|
||||
{
|
||||
// dd($key.'-'.count($excel_data));
|
||||
$is_row_empty = check_row_is_empty_or_null($row);
|
||||
if(!$is_row_empty)
|
||||
{
|
||||
$value = [];
|
||||
$policy_data = [];
|
||||
$temp_unit = '';
|
||||
@ -2104,8 +2106,11 @@ public function employeesEnrollmentInsert($params)
|
||||
|
||||
}
|
||||
}
|
||||
}// endof if row is empty check
|
||||
} //end of for loop
|
||||
|
||||
|
||||
|
||||
$this->fileModel->where('id', $file_id)->set(['status' => 'success','reason' => ''])->update();
|
||||
$this->myLogger->logme("error",'{file_id} uploaded success',['file_id' => $file_id]);
|
||||
|
||||
|
||||
@ -1730,9 +1730,9 @@ class PolicyTransactionController extends BaseController
|
||||
foreach ($excel_data as $excel_key => $excel_row)
|
||||
{
|
||||
$is_row_empty = check_row_is_empty_or_null($excel_row);
|
||||
if($is_row_empty)
|
||||
if(!$is_row_empty)
|
||||
{
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
$is_source_found = 0;
|
||||
@ -1773,6 +1773,7 @@ class PolicyTransactionController extends BaseController
|
||||
|
||||
public function updateInsurerStatement($params)
|
||||
{
|
||||
helper('excel_util_helper');
|
||||
//get file info
|
||||
$file_id = $params['file_id'];
|
||||
$file = $this->insurerStatements->find($file_id);
|
||||
@ -1826,6 +1827,12 @@ class PolicyTransactionController extends BaseController
|
||||
$data_to_update = [];
|
||||
foreach ($excel_data as $excel_key => $excel_row)
|
||||
{
|
||||
$is_row_empty = check_row_is_empty_or_null($excel_row);
|
||||
if(!$is_row_empty)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
$is_source_found = 0;
|
||||
$policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]);//policy_start_date from excel
|
||||
$policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]);//policy_end_date from excel
|
||||
|
||||
Loading…
Reference in New Issue
Block a user