include approved po's in the system

This commit is contained in:
omair saleh
2020-12-03 17:02:51 +08:00
parent 47690061e5
commit 34c2433082
+1 -1
View File
@@ -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 "<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->invoice->booking->id."/upload-invoice'>".$invoice->invoice->booking->id."</a><br>";