mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 14:04:01 +00:00
debug do email to vt
This commit is contained in:
@@ -66,13 +66,13 @@ class EmailDoToVTCommand extends Command
|
||||
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open($attachment, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE)) {
|
||||
echo 'yes';
|
||||
|
||||
$bookings = \App\Models\Booking::where('status', ApprovalStatus::COMPLETED)->whereDate('updated_at', Carbon::yesterday())
|
||||
->whereHas('transactions', function ($query){
|
||||
return $query->where('type', TransactionType::BILL)->where('issuer', 2);
|
||||
})->get();
|
||||
|
||||
if(!$bookings){ return; }
|
||||
if(!count($bookings)){ return; }
|
||||
|
||||
foreach ($bookings as $booking) {
|
||||
$file = $booking->documents()->where('document_type', DocumentType::SUPPLIER_DELIVER_ORDER)->first()->files()->first();
|
||||
|
||||
Reference in New Issue
Block a user