mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
add command for sending do to vt
This commit is contained in:
@@ -73,8 +73,8 @@ class EmailDoToVTCommand extends Command
|
||||
|
||||
foreach ($bookings as $booking) {
|
||||
$file = $booking->documents()->where('document_type', DocumentType::SUPPLIER_DELIVER_ORDER)->first()->files()->first();
|
||||
if(!$zip->addFile(Storage::disk('documents')->path($file->file->file_info->original->file), $booking->created_at->format('d_m_Y').'_'.$booking->marking.'.pdf')){
|
||||
echo 'Could not add file to ZIP: ' . $file;
|
||||
if(file_exists(Storage::disk('documents')->path($file->file->file_info->original->file))){
|
||||
$zip->addFile(Storage::disk('documents')->path($file->file->file_info->original->file), $booking->created_at->format('d_m_Y').'_'.$booking->marking.'.pdf');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user