Claim tpa push issue : GWM

This commit is contained in:
Gowtham M 2026-05-22 14:55:07 +05:30
parent 55486f2665
commit 49b70875a0
2 changed files with 9 additions and 23 deletions

View File

@ -3785,14 +3785,6 @@ class EmployeeRestController extends AdminController
$this->handleCliamFiles($file_data, $ticket_id, $ticket_message_id);
// Merge all uploaded PDFs for this ticket into a single combined PDF
try {
helper('merge_pdf');
merge_ticket_pdfs((int) $ticket_id);
} catch (\Throwable $e) {
log_message('error', 'EmployeeRestController::initiateClaim | merge_ticket_pdfs failed | ticket_id=' . $ticket_id . ' | ' . $e->getMessage());
}
$mail_sent_status = ($this->ticketController->sendAutoMailTrigger($ticket_id));
if (gettype($mail_sent_status) == 'array') {
$message = 'Claim Iniated Successfully';
@ -3931,6 +3923,15 @@ class EmployeeRestController extends AdminController
}
}
if (! empty($insert_ids)) {
try {
helper('merge_pdf');
merge_ticket_pdfs((int) $ticket_id);
} catch (\Throwable $e) {
log_message('error', 'EmployeeRestController::handleCliamFiles | merge_ticket_pdfs failed | ticket_id=' . $ticket_id . ' | ' . $e->getMessage());
}
}
$count = $this->ticketMaster->where('id', $ticket_id)->where('is_active', 1)->where('tpa_claim_push_reference_no IS NULL')->countAllResults();
log_message('error', 'Ticket validation | Ticket ID: ' . $ticket_id . ' | Matching active tickets with NULL TPA reference: ' . $count);
if ($count > 0 && $pdf_exist_in_the_file && $tpa_claim_push == true) {
@ -5452,14 +5453,6 @@ class EmployeeRestController extends AdminController
$result = $this->handleCliamFiles($file_data, $ticket_id, null, false, true);
if (! empty($result)) {
// Merge all uploaded PDFs for this ticket into a single combined PDF
try {
helper('merge_pdf');
merge_ticket_pdfs((int) $ticket_id);
} catch (\Throwable $e) {
log_message('error', 'EmployeeRestController::uploadIRDocs | merge_ticket_pdfs failed | ticket_id=' . $ticket_id . ' | ' . $e->getMessage());
}
// $this->ticketMaster->where('id', $ticket_id)->set(['required_docs', $required_docs])->update();
db_connect()->query(
"UPDATE ticket_master SET required_docs = ? WHERE id = ?",

View File

@ -3677,13 +3677,6 @@ class TicketController extends BaseController
$employeeRest = new EmployeeRestController();
$result = $employeeRest->handleCliamFiles($file_data, $ticket_id);
if(!empty($result)){
// Merge all uploaded PDFs for this ticket into a single combined PDF
try {
helper('merge_pdf');
merge_ticket_pdfs((int) $ticket_id);
} catch (\Throwable $e) {
log_message('error', 'TicketController::upload_url | merge_ticket_pdfs failed | ticket_id=' . $ticket_id . ' | ' . $e->getMessage());
}
return $this->respond(['status' => true, 'message' => 'File uploaded successfully ']);
}else{
return $this->respond(['status' => false, 'message' => 'Failed to upload file ']);