fix refunded bookings

This commit is contained in:
Omair Saleh
2022-11-24 22:36:41 +08:00
parent 3468864687
commit 84c8f238fe
+6
View File
@@ -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;