diff --git a/routes/web.php b/routes/web.php
index 0b21a361..37ee3796 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -91,14 +91,6 @@ Route::group(['middleware' => ['role:admin']], function() {
})->name('po.approval');
Route::get('/po-pending-customers', 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('invoice_id', $pendingChangeInvoices)->get();
- echo "
Total PO Pending Approval: ".count($invoices)."
";
- foreach ($invoices as $invoice){
- echo "".$invoice->invoice->booking->id."
";
- }
-
$bookings = Booking::where('admin_status', 6)->where(function($q){
$q->WhereDoesntHave('invoice')->WhereDoesntHave('purchaseOrder');
})->get();
@@ -107,14 +99,14 @@ Route::group(['middleware' => ['role:admin']], function() {
});
echo "Total Po Pending Customer Update: ".count($bookings)."
";
foreach ($customers as $customer => $bookings) {
- echo "".$bookings->user->marking."(".count($bookings).")
";
+ echo "".$customer."(".count($bookings).")
";
foreach ($bookings as $booking) {
echo "".$booking->id." ".$booking->user->marking." / ".$booking->created_at."
";
}
echo "
";
}
- })->name('po.approval');
+ })->name('po.approval.customer');
Route::get('/po-approved', function(){
$approvedInvoices = InvoiceStatuses::where('status', 'approve')->distinct()->get(['invoice_id'])->pluck('invoice_id');