show old invoices

This commit is contained in:
omair saleh
2020-09-25 17:55:38 +08:00
parent 1dea589c87
commit 515badf8e4
+2 -1
View File
@@ -16,7 +16,8 @@ Route::post('password/reset', 'Auth\ResetPasswordController@postReset')->name('p
Route::get('/old-invoices', function(){
$bookings = \App\Booking::where('status', 6)->whereHas('purchaseOrder', function($q){
$q->whereNotNull('image_path');
})->get();
})->groupby('year','month')->get();
dd($bookings);
echo "<h1>Total pending invoices:<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> <small>date: ".$booking->created_at."</small><br>";