From ef83674935240896214d6379d8b3d671c274cda7 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Thu, 25 Nov 2021 01:32:01 +0800 Subject: [PATCH] add command for sending do to vt --- app/Console/Commands/EmailDoToVTCommand.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/Console/Commands/EmailDoToVTCommand.php b/app/Console/Commands/EmailDoToVTCommand.php index 8fd1ec12..665ab903 100644 --- a/app/Console/Commands/EmailDoToVTCommand.php +++ b/app/Console/Commands/EmailDoToVTCommand.php @@ -73,9 +73,6 @@ class EmailDoToVTCommand extends Command foreach ($bookings as $booking) { $file = $booking->documents()->where('document_type', DocumentType::SUPPLIER_DELIVER_ORDER)->first()->files()->first(); - if(!file_exists(Storage::disk('documents')->path($file->file->file_info->original->file))){ - echo 'file doesnot exist'; - } $zip->addFile(Storage::disk('documents')->path($file->file->file_info->original->file), $booking->created_at->format('d_m_Y').'_'.$booking->marking.'.pdf'); } @@ -84,9 +81,9 @@ class EmailDoToVTCommand extends Command Mail::raw( "Attention to VT Admin team:\r\n\r\nKindly refer to the attachment for our DAILY DO COMPILATION from 12-11-2021 to 23-11-2021.\r\n\r\n**This is an automatically generated email – please do not reply to it. If you have any queries kindly contact our admin team through Wechat.\r\n\r\n\r\nCIEF WORLDWIDE SDN BHD", function($message) use ($attachment){ $message->from('exchange@cief-malaysia.com'); - $message->to(['uldvstar@gmail.com']); -// $message->to(['vtnation16@gmail.com', 'vtnation@gmail.com', 'atvantic04@gmail.com', 'vtnation2@gmail.com']); -// $message->cc(['shafiqa_sukeri@cief-malaysia.com', 'frontendcief@gmail.com', 'pm@cief-malaysia.com', 'hasan@cief-malaysia.com', 'shipping_admin@cief-malaysia.com', 'hasanakbar27@gmail.com', 'pmwong2019@gmail.com']); +// $message->to(['uldvstar@gmail.com']); + $message->to(['vtnation16@gmail.com', 'vtnation@gmail.com', 'atvantic04@gmail.com', 'vtnation2@gmail.com']); + $message->cc(['shafiqa_sukeri@cief-malaysia.com', 'frontendcief@gmail.com', 'pm@cief-malaysia.com', 'hasan@cief-malaysia.com', 'shipping_admin@cief-malaysia.com', 'hasanakbar27@gmail.com', 'pmwong2019@gmail.com']); $message->subject('CIEF DO COMPILATION from 12-11-2021 to 23-11-2021'); $message->attach($attachment);