From 7ad1fd23384148cceabd6b2df41534e22db40fae Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 29 Sep 2020 12:57:23 +0800 Subject: [PATCH] list po pending approval --- routes/web.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/routes/web.php b/routes/web.php index ef22321c..bd6ab1a9 100644 --- a/routes/web.php +++ b/routes/web.php @@ -18,8 +18,7 @@ Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm Route::post('password/reset', 'Auth\ResetPasswordController@postReset')->name('password.reset'); Route::get('/po-approval', function(){ - $invoices = InvoiceStatuses::distinct()->get(['invoice_id'])->pluck('invoice_id'); - $invoices = \App\Invoice::all(); + $invoices = InvoiceStatuses::where('status', 'approve')->distinct()->get(['invoice_id'])->pluck('invoice_id'); dd($invoices); echo "

Total PO Pending Approval:".count($invoices)."

"; foreach ($invoices as $invoice){