diff --git a/app/Console/Commands/EmailDoToVTCommand.php b/app/Console/Commands/EmailDoToVTCommand.php index 95aa5f45..ee605c1c 100644 --- a/app/Console/Commands/EmailDoToVTCommand.php +++ b/app/Console/Commands/EmailDoToVTCommand.php @@ -61,12 +61,13 @@ class EmailDoToVTCommand extends Command $zip = new ZipArchive(); if ($zip->open($attachment, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE)) { - Log::info('success'); + $bookings = \App\Models\Booking::where('status', ApprovalStatus::COMPLETED)->whereDate('updated_at', '>=', $startDate)->whereDate('updated_at', '<=', $endDate) ->whereHas('transactions', function ($query){ return $query->where('type', TransactionType::BILL)->where('issuer', 2); })->get(); + Log::info(count($bookings)); if(!count($bookings)){ return; } foreach ($bookings as $booking) {