diff --git a/routes/web.php b/routes/web.php index b8b95e8f..1aaebd28 100644 --- a/routes/web.php +++ b/routes/web.php @@ -764,4 +764,14 @@ Route::get('/generate/invoices', function(){ } })->name('generate.invoices'); +Route::get('/invoices/approve', function(Request $request){ +// whereDoesntHave + $invoices = Transaction::where('type', TransactionType::SHIPPING_INVOICE)->where('status', ApprovalStatus::PENDING_VERIFICATION)->whereHas('owner', function ($packingList) use ($request) { + return $packingList->whereHas('owner', function ($order) use ($request) { + return $order->whereIn('reference', json_decode($request->input('exclude'))); + }); + })->get(); + dd($invoices); +})->name('generate.invoices'); +