add command for sending do to vt

This commit is contained in:
omair saleh
2021-11-25 01:20:45 +08:00
parent 9a71eeaf9b
commit 33fea09710
+1 -1
View File
@@ -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);