From 5335b8affb2d78b56b21206b198d2dfc23b4eeac Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Fri, 17 Feb 2023 13:48:26 +0800 Subject: [PATCH] auto generate invoices --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index bcc18e2d..835380b1 100644 --- a/routes/web.php +++ b/routes/web.php @@ -766,7 +766,7 @@ Route::get('/generate/invoices', function(){ Route::get('/invoices/approve', function(Request $request){ // whereDoesntHave - $invoices = Transaction::where('type', TransactionType::SHIPPING_INVOICE)->get(); + $invoices = Transaction::where('type', TransactionType::SHIPPING_INVOICE)->where('status', ApprovalStatus::PENDING_SUBMISSION)->get(); dd($invoices); foreach ($invoices as $invoice) { $order = $invoice->owner->owner;