mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
show old invoices
This commit is contained in:
+3
-2
@@ -18,11 +18,12 @@ 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(function($item) {
|
||||
})->get();
|
||||
$months = $bookings->groupBy(function($item) {
|
||||
return $item->created_at->format('Y-m');
|
||||
});
|
||||
echo "<h1>Total pending invoices:<b>".count($bookings)."</b></h1>";
|
||||
foreach ($bookings as $month => $bookings) {
|
||||
foreach ($months as $month => $bookings) {
|
||||
echo "<h3>".$month."</h3><br>";
|
||||
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>";
|
||||
|
||||
Reference in New Issue
Block a user