mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
test sending booking do to email
This commit is contained in:
@@ -33,7 +33,7 @@ class Kernel extends ConsoleKernel
|
||||
$schedule->call(function(){
|
||||
$zipname = 'do_'.Carbon::today()->format('Y_m_d').'.zip';
|
||||
$zip = new ZipArchive;
|
||||
$zip->open($zipname, ZipArchive::CREATE);
|
||||
$zip->open(public_path().'/'.$zipname, ZipArchive::CREATE);
|
||||
$approvedInvoices = InvoiceStatuses::where('status', 'approve')->whereDate('created_at', Carbon::today())->distinct()->get(['invoice_id']);
|
||||
$bookings = [];
|
||||
foreach($approvedInvoices as $approved){
|
||||
@@ -43,7 +43,6 @@ class Kernel extends ConsoleKernel
|
||||
$do = app(InvoiceController::class)->generateSupplierDo($id);
|
||||
$zip->addFromString('do_'.Carbon::today()->format('Y_m_d').'_'.$id.'.pdf', $do->Output('do.pdf', 'S'));
|
||||
}
|
||||
$zip->extractTo(public_path());
|
||||
$zip->close();
|
||||
$attachment = public_path($zipname);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user