diff --git a/routes/web.php b/routes/web.php index b253c2f4..54540f19 100644 --- a/routes/web.php +++ b/routes/web.php @@ -462,7 +462,13 @@ Route::get('/refund/fix', function(){ $notPlaced[] = $booking; continue; } + $bill = $payment->transactions()->where('type', TransactionType::BILL)->first(); + if(!$bill){ + $notPlaced[] = $booking; + continue; + } + if(in_array($bill->status, [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])){ $completed[] = $booking; continue;