send missing dos to vt

This commit is contained in:
omair saleh
2022-02-26 16:49:54 +08:00
parent 5ca20f1b54
commit 280066fcb4
+2 -1
View File
@@ -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) {