fix refunded bookings

This commit is contained in:
Omair Saleh
2022-11-24 22:50:09 +08:00
parent 9fde5db903
commit b120d44e86
+1 -1
View File
@@ -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;