FIX_STATEMENT_UPLOAD
This commit is contained in:
parent
374aa0fa8c
commit
4bfd58a0e5
@ -5998,7 +5998,7 @@ class ClientController extends AdminController
|
|||||||
// ---------- POLICY TRANSACTION CONTROLLER --------------------------------------------------------------------------------
|
// ---------- POLICY TRANSACTION CONTROLLER --------------------------------------------------------------------------------
|
||||||
|
|
||||||
$policyTransactionController = new PolicyTransactionController();
|
$policyTransactionController = new PolicyTransactionController();
|
||||||
// $res = $policyTransactionController->validateInsurerStatement(['file_id' => '271']);
|
// $res = $policyTransactionController->validateInsurerStatement(['file_id' => '281']);
|
||||||
// $res = $policyTransactionController->updateInsurerStatement(['file_id' => '62']);
|
// $res = $policyTransactionController->updateInsurerStatement(['file_id' => '62']);
|
||||||
// dd('-----', $res);
|
// dd('-----', $res);
|
||||||
|
|
||||||
|
|||||||
@ -3798,6 +3798,7 @@
|
|||||||
|
|
||||||
// get uploaded month transactions data
|
// get uploaded month transactions data
|
||||||
$source_data = $this->PTCOShareDetailsModel->getNonReconcileredPolicyTransactions(insurer_id: $file['insurer_id'], insurer_branch_id: $file['branch_id']);
|
$source_data = $this->PTCOShareDetailsModel->getNonReconcileredPolicyTransactions(insurer_id: $file['insurer_id'], insurer_branch_id: $file['branch_id']);
|
||||||
|
// dd($source_data);
|
||||||
|
|
||||||
// check policy no,insurer and etc in DB for this month
|
// check policy no,insurer and etc in DB for this month
|
||||||
// if all good return true, otherwise return false with messssage
|
// if all good return true, otherwise return false with messssage
|
||||||
@ -3808,6 +3809,9 @@
|
|||||||
|
|
||||||
$row_number = $excel_key;
|
$row_number = $excel_key;
|
||||||
$is_row_empty = check_row_is_empty_or_null($excel_row);
|
$is_row_empty = check_row_is_empty_or_null($excel_row);
|
||||||
|
$policy_source_found = 0;
|
||||||
|
$endorsement_source_found = 0;
|
||||||
|
$dublicate_found = 0;
|
||||||
|
|
||||||
if (!$is_row_empty) {
|
if (!$is_row_empty) {
|
||||||
|
|
||||||
@ -3821,33 +3825,47 @@
|
|||||||
|
|
||||||
$source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null;
|
$source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null;
|
||||||
|
|
||||||
|
if (($policy_no == $source_row['policy_no']) ){
|
||||||
// Policy number mismatch
|
$policy_source_found = 1;
|
||||||
if ($policy_no != $source_row['policy_no']) {
|
|
||||||
$error_messages[$row_number]['policy_no_mismatch'] =
|
|
||||||
"Policy number <strong>({$policy_no}) </strong> not in NHance.";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Endorsement number mismatch
|
if( $endorsement_no == $source_endorsement_no) {
|
||||||
if (!empty($endorsement_no) && $endorsement_no != $source_endorsement_no) {
|
$endorsement_source_found = 1;
|
||||||
$error_messages[$row_number]['endorsement_no_mismatch'] =
|
|
||||||
"Endorsement number <strong>({$endorsement_no})</strong> not not in NHance.";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Duplicate check
|
// Duplicate check
|
||||||
if (isset($matched_entry[$policy_no . '|' . $endorsement_no])) {
|
if (isset($matched_entry[$policy_no . '|' . $endorsement_no])) {
|
||||||
$error_messages[$row_number]['duplicate'] =
|
$dublicate_found = 1;
|
||||||
"Duplicate entry found. This policy and endorsement <strong>({$policy_no} '|' {$endorsement_no})</strong> combination has already been matched.";
|
|
||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no) {
|
if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no) {
|
||||||
$line_items = $line_items + 1;
|
$line_items = $line_items + 1;
|
||||||
$matched_entry[] = $policy_no . '|' . $endorsement_no;
|
$matched_entry[] = $policy_no . '|' . $endorsement_no;
|
||||||
|
unset($source_data[$source_key]);
|
||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Policy number mismatch
|
||||||
|
if ($policy_source_found == 0) {
|
||||||
|
$error_messages[$row_number]['policy_no_mismatch'] =
|
||||||
|
"Policy number <strong>({$policy_no}) </strong> not in NHance.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Endorsement number mismatch
|
||||||
|
if (!empty($endorsement_no) && $endorsement_source_found == 0) {
|
||||||
|
$error_messages[$row_number]['endorsement_no_mismatch'] =
|
||||||
|
"Endorsement number <strong>({$endorsement_no})</strong> not in NHance.";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Duplicate check
|
||||||
|
if ($dublicate_found == 1) {
|
||||||
|
$error_messages[$row_number]['duplicate'] =
|
||||||
|
"Duplicate entry found. This policy and endorsement <strong>({$policy_no} '|' {$endorsement_no})</strong> combination has already been matched.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// print_rr($error_messages);die;
|
// print_rr($error_messages);die;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user