From 55eb93f49ad4b7abb1ca8a9409d07bbc2844ce2d Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 29 Sep 2020 13:06:18 +0800 Subject: [PATCH] list po pending approval --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 3b20cad2..b6d53dcd 100644 --- a/routes/web.php +++ b/routes/web.php @@ -19,7 +19,7 @@ Route::post('password/reset', 'Auth\ResetPasswordController@postReset')->name('p Route::get('/po-approval', function(){ $approvedInvoices = InvoiceStatuses::where('status', 'approve')->distinct()->get(['invoice_id'])->pluck('invoice_id'); - $invoices = \App\Invoice::whereNotIn('id', $approvedInvoices)->get(); + $invoices = \App\Invoice::whereNotIn('id', $approvedInvoices)->whereNotNull('po_number')->get(); echo "

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

"; foreach ($invoices as $invoice){ echo "".$invoice->booking->id."
";