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."
";