include approved po's in the system

This commit is contained in:
omair saleh
2020-12-04 10:19:54 +08:00
parent 513c57f622
commit 5abe670590
+4 -1
View File
@@ -29,7 +29,10 @@ Route::get('/po-approval', function(){
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>";
}
$bookings = Booking::where('admin_status', 6)->whereDoesntHave('purchaseOrder')->orWhereDoesntHave('invoice')->get();
$bookings = Booking::where('admin_status', 6)->where(function($q){
$q->WhereDoesntHave('invoice')->WhereDoesntHave('purchaseOrder');
})->get();
echo "<h1>Total Po Pending Customer Update: <b>".count($bookings)."</b></h1>";
foreach ($bookings as $booking){
echo "<a target='_blank' href='https://exchange.cief-malaysia.com/booking/".$booking->id."/upload-invoice'>".$booking->id."</a><br>";