diff --git a/routes/web.php b/routes/web.php index ba8bd29d..a177dc5c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -456,7 +456,7 @@ Route::get('/refund/fix', function(){ $completed = []; foreach ($bookings as $booking){ - $payments = $booking->transactions()->where('type', TransactionType::PAYMENT)->get(); + $payments = $booking->transactions()->where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->get(); foreach ($payments as $payment){ if($payment->status === ApprovalStatus::APPROVED){ $notPlaced[] = $booking;