CHANGE_STATEMENT_UPLOAD_BDS_CRS : RV

This commit is contained in:
VENKATESHWARAN 2025-08-05 11:42:25 +05:30
parent f30ca93c5e
commit 742f81e7ce
2 changed files with 18 additions and 6 deletions

View File

@ -5100,9 +5100,9 @@ class ClientController extends AdminController
// return $this->downloadInsurerExcelExport($batch_data);
// dd($res); die;
// $PolicyTransactionController = new PolicyTransactionController();
// $res = $PolicyTransactionController->validateInsurerStatement(['file_id' => '36']);
$PolicyTransactionController = new PolicyTransactionController();
$res = $PolicyTransactionController->validateInsurerStatement(['file_id' => '131']);
dd($res);
// $params = [
// 'client_policy_id' => 6090,

View File

@ -2279,7 +2279,9 @@ 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) {
// $excel_row = ExcelSanitizeHelper::sanitizeArrayData($excel_row);
$is_source_found = 0;
// Kint::dump($excel_key,$excel_row[1],$excel_row[2]);
@ -2297,8 +2299,17 @@ class PolicyTransactionController extends BaseController
// Kint::dump($excel_key,$policy_no,$endorsement_no,$policy_start_date,$policy_end_date);//die();
foreach ($source_data as $source_key => $source_row) {
$source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null;
// Kint::dump($source_endorsement_no);
if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name'])
// Kint::dump($source_row, $source_endorsement_no, $policy_no, $endorsement_no);
// if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name'])
// {
// $is_source_found = 1;
// $line_items = $line_items + 1;
// unset($source_data[$source_key]);
// continue 2;
// }
if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no)
{
$is_source_found = 1;
$line_items = $line_items + 1;
@ -2395,7 +2406,8 @@ class PolicyTransactionController extends BaseController
foreach ($source_data as $source_key => $source_row) {
// Kint::dump(change_date_format($excel_row[3],'d-m-Y','Y-m-d'));
$source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null;
if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name']) {
// if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name']) {
if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no) {
$is_source_found = 1;
//calculate percentage first