From a23e0b35a27115604b9903345368ddd0614545ce Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Fri, 17 Feb 2023 12:53:10 +0800 Subject: [PATCH] auto generate invoices --- routes/web.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 5cfc6a5c..95511c41 100644 --- a/routes/web.php +++ b/routes/web.php @@ -739,7 +739,10 @@ Route::get('/generate/invoices', function(){ $packingLists = (App()->make(ListsPackingLists::class))->execute(['does_not_have_transaction_type' => 1, 'type' => 2]); foreach ($packingLists as $packingList){ $order = $packingList->owner; - if(!($order instanceof Order)) echo 'failed to generate...'; continue; + if(!($order instanceof Order)) { + echo 'failed to generate...'; + continue; + } $companyModule = $order->companyModule; $billingAddress = $companyModule->addresses()->where('type', \App\Classes\ValueObjects\Constants\AddressType::BILLING)->first();