@extends('layouts.staff') @section('content')
Track and process customer security deposits and refunds.
Customer
Refund Amount
@php $depositAmount = $booking->payments->sum('depoAmount'); $totalPaid = $booking->payments->whereNotIn('paymentStatus', ['Void', 'Rejected'])->sum('amount'); $isFullRefund = in_array($booking->bookingStatus, ['Cancelled', 'Rejected']); $finalAmount = $isFullRefund ? $totalPaid : $depositAmount; $label = $isFullRefund ? 'Full Refund' : 'Deposit Only'; $depositPayment = $booking->payments->where('depoAmount', '>', 0)->first(); $currentDepoStatus = $depositPayment ? $depositPayment->depoStatus : 'Unknown'; @endphpStatus
@php $statusClasses = match($currentDepoStatus) { 'Requested' => 'bg-orange-50 text-orange-600 border-orange-100 animate-pulse', 'Refunded' => 'bg-green-50 text-green-600 border-green-100', 'Pending' => 'bg-yellow-50 text-yellow-600 border-yellow-100', 'Forfeited', 'Void' => 'bg-slate-800 text-white border-slate-900', default => 'bg-gray-100 text-gray-500 border-gray-200' }; @endphp {{ $currentDepoStatus }}No deposits found in this category.