From b555924897810e781ebb42bc331db102a1898352 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Sat, 26 Feb 2022 16:54:23 +0800 Subject: [PATCH] send missing dos to vt --- app/Console/Commands/EmailDoToVTCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/EmailDoToVTCommand.php b/app/Console/Commands/EmailDoToVTCommand.php index f4d6eeb8..544feb51 100644 --- a/app/Console/Commands/EmailDoToVTCommand.php +++ b/app/Console/Commands/EmailDoToVTCommand.php @@ -62,12 +62,13 @@ class EmailDoToVTCommand extends Command $zip = new ZipArchive(); if ($zip->open($attachment, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE)) { - $bookings = \App\Models\Booking::where('status', ApprovalStatus::COMPLETED)->whereBetween('updated_at', [$startDate, $endDate]) + $bookings = \App\Models\Booking::where('status', ApprovalStatus::COMPLETED)->whereDate('updated_at', '>=', $startDate) ->whereHas('transactions', function ($query){ return $query->where('type', TransactionType::BILL)->where('issuer', 2); })->get(); Log::info(count($bookings)); + dd(); if(!count($bookings)){ return; } foreach ($bookings as $booking) {