mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 04:24:16 +00:00
add command for sending do to vt
This commit is contained in:
@@ -64,7 +64,6 @@ class EmailDoToVTCommand extends Command
|
||||
$attachment = storage_path().'/'.$zip_file;
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open($attachment, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)) {
|
||||
chmod($attachment, 0777);
|
||||
$bookings = \App\Models\Booking::where('status', ApprovalStatus::COMPLETED)->whereDate('updated_at', '>=', Carbon::parse('12-11-2021'))->whereDate('updated_at', '<=', Carbon::parse('23-11-2021'))
|
||||
->whereHas('transactions', function ($query){
|
||||
return $query->where('type', TransactionType::BILL)->where('issuer', 2);
|
||||
@@ -78,7 +77,7 @@ class EmailDoToVTCommand extends Command
|
||||
echo 'Could not add file to ZIP: ' . $file;
|
||||
}
|
||||
}
|
||||
|
||||
chmod($attachment, 0777);
|
||||
$zip->close();
|
||||
|
||||
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){
|
||||
|
||||
Reference in New Issue
Block a user