FIX_EMPTY_ROWS_ELIMINATED_IN_INS_STMT

This commit is contained in:
velz 2024-11-27 12:01:13 +05:30
parent cc61206101
commit dc290df50a

View File

@ -1676,6 +1676,7 @@ class PolicyTransactionController extends BaseController
public function validateInsurerStatement($params)
{
helper('excel_util_helper');
//get file info
$file_id = $params['file_id'];
$file = $this->insurerStatements->find($file_id);
@ -1728,6 +1729,12 @@ class PolicyTransactionController extends BaseController
// if all good return true, otherwise return false with messssage
foreach ($excel_data as $excel_key => $excel_row)
{
$is_row_empty = check_row_is_empty_or_null($excel_row);
if($is_row_empty)
{
continue;
}
$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