diff --git a/app/Console/Commands/EmailDoToVTCommand.php b/app/Console/Commands/EmailDoToVTCommand.php index 25a1a3e2..89f2ed14 100644 --- a/app/Console/Commands/EmailDoToVTCommand.php +++ b/app/Console/Commands/EmailDoToVTCommand.php @@ -63,7 +63,7 @@ class EmailDoToVTCommand extends Command $zip_file = 'do_from_11_nov_to_23_nov.zip'; $attachment = storage_path().'/'.$zip_file; $zip = new ZipArchive(); - if ($zip->open($attachment, ZIPARCHIVE::OVERWRITE)) { + if ($zip->open($attachment, ZIPARCHIVE::CREATE)) { $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);