list po pending approval

This commit is contained in:
omair saleh
2020-09-29 13:04:24 +08:00
parent 14b32b7b6c
commit ddfd4003be
+1 -1
View File
@@ -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($approvedInvoices);
$invoices = \App\Invoice::whereNotIn('id', $approvedInvoices);
echo "<h1>Total PO Pending Approval:<b>".count($invoices)."</b></h1>";
foreach ($invoices as $invoice){
echo "<a target='_blank' href='https://exchange.cief-malaysia.com/booking/".$invoice->booking->id."/upload-invoice'>".$invoice->booking->id."</a><br>";