list pending po pending approval

This commit is contained in:
omair saleh
2020-09-29 12:02:06 +08:00
parent 914b02bf02
commit 405de46203
+11 -1
View File
@@ -1,5 +1,6 @@
<?php
use App\InvoiceStatuses;
use Carbon\Carbon;
/*
@@ -15,6 +16,14 @@ use Carbon\Carbon;
Route::get('/', 'WelcomeController@index');
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.request');
Route::post('password/reset', 'Auth\ResetPasswordController@postReset')->name('password.reset');
Route::get('/po-approval', function(){
$invoices = InvoiceStatuses::where('status', 'pending');
foreach ($invoices as $invoice){
echo $invoice->invoice->booking->id;
}
})->name('po.approval');
Route::get('/old-invoices', function(){
$bookings = \App\Booking::where('status', 6)->whereHas('purchaseOrder', function($q){
$q->whereNotNull('image_path');
@@ -30,7 +39,8 @@ Route::get('/old-invoices', function(){
}
echo "<br><br><br>";
}
})->name('home');
})->name('invoice.old');
Route::group(['middleware' => ['role:admin']], function() {
Route::get('bulkBookings', function () {
return view('booking.bulkBooking');