Merge branch 'dillon/34.1-jenkins-vapor' into vapor/development

This commit is contained in:
Dillon Ngo
2024-04-26 16:07:27 +08:00
@@ -70,7 +70,7 @@ class BulkDownloadCustomerInvoicesLogic
if ($zip->open($zip_file, ZipArchive::CREATE | ZipArchive::OVERWRITE)) {
foreach ($invoicebookings as $booking) {
$invoice_file = $booking->documents()->where('document_type', DocumentType::INVOICE)->whereNull('deleted_at')->first()->files()->first();
$zip->addFile(Storage::disk('documents')->path($invoice_file->file->file_info->original->file), 'invoice-' . $booking->created_at->format('d_m_Y') . '_' . $booking->marking . '.pdf');
$zip->addFile(Storage::disk('s3')->get('documents/'.$invoice_file->file->file_info->original->file), 'invoice-' . $booking->created_at->format('d_m_Y') . '_' . $booking->marking . '.pdf');
}
$zip->close();