From c91273d15b0a3cf1dc18cc49d0f0dfa5ef907ba4 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Tue, 18 Jun 2024 12:49:12 +0800 Subject: [PATCH] update pending_orders, exclude approved refunds order from pending_orders list --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 2c4af1f5..12269a21 100644 --- a/routes/web.php +++ b/routes/web.php @@ -398,7 +398,7 @@ Route::get('/segments', function (Request $request) { Route::get('/pending_orders', function(){ $payments = Transaction::where('type', TransactionType::PAYMENT)->where('owner_type', Booking::class)->whereIn('status', [ApprovalStatus::APPROVED]) ->whereDoesntHave('transactions', function ($query) { - return $query->where('type', TransactionType::REFUND)->whereIn('status', [ApprovalStatus::PENDING_SUBMISSION, ApprovalStatus::PENDING_VERIFICATION]); + return $query->where('type', TransactionType::REFUND)->whereIn('status', [ApprovalStatus::PENDING_SUBMISSION, ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED]); }) ->get();