From 34c24330826372721ecf364abb7c8dadde8ffaf7 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Thu, 3 Dec 2020 17:02:51 +0800 Subject: [PATCH] include approved po's in the system --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index ae5fc51a..eea61379 100644 --- a/routes/web.php +++ b/routes/web.php @@ -23,7 +23,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'); $pendingChangeInvoices = InvoiceStatuses::where('status', 'request_change')->distinct()->get(['invoice_id'])->pluck('invoice_id'); - $invoices = InvoiceStatuses::whereNotIn('invoice_id', $approvedInvoices)->whereNotIn($pendingChangeInvoices)->get(); + $invoices = InvoiceStatuses::whereNotIn('invoice_id', $approvedInvoices)->whereNotIn('invoice_id', $pendingChangeInvoices)->get(); echo "

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

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