Laravel Vapor - Debug approve purchase order issue

This commit is contained in:
Dillon Ngo
2024-10-16 14:30:21 +08:00
parent e92f24e57b
commit 118efc734c
@@ -77,16 +77,19 @@ class CreateInvoiceDocumentProcessor
$localFilePath = storage_path('app/documents/' . $currentFile);
$oMerger->addPDF($localFilePath, 'all');
if($filesystemDriver === 's3'){
$filePathForS3 = 'documents/'.$currentFile;
Log::info('CreateInvoiceDocumentProcessor 2: ' . $filePathForS3);
Storage::disk('s3')->put($filePathForS3, file_get_contents($localFilePath));
}
}
$oMerger->merge();
$order_pdf = $oMerger;
if($filesystemDriver === 's3'){
$finalTempPdfPath = storage_path('app/documents/temp.pdf');
$filePathForS3 = 'documents/temp.pdf';
$fileContent = file_get_contents($finalTempPdfPath);
Log::info('CreateInvoiceDocumentProcessor 2: ' . $filePathForS3);
Storage::disk('s3')->put($filePathForS3, $fileContent);
}
}
$document_object = new DocumentObject(