@extends('layouts.admin') @section('title', 'Data Pembayaran | Admin Rental') @section('page_title', 'Data Pembayaran') @push('styles') @endpush @section('content') @php $paymentMethodsConfig = config('payment_methods', []); $paymentStatusOptions = [ \App\Models\Payment::STATUS_UNPAID => 'Unpaid', \App\Models\Payment::STATUS_UPLOADED => 'Uploaded', \App\Models\Payment::STATUS_VERIFIED => 'Verified', \App\Models\Payment::STATUS_REJECTED => 'Rejected', ]; $bookingStatusOptions = [ \App\Models\Booking::BOOKING_WAITING_PAYMENT => 'Waiting Payment', \App\Models\Booking::BOOKING_WAITING_VERIFICATION => 'Waiting Verification', \App\Models\Booking::BOOKING_CONFIRMED => 'Confirmed', \App\Models\Booking::BOOKING_ONGOING => 'Ongoing', \App\Models\Booking::BOOKING_COMPLETED => 'Completed', \App\Models\Booking::BOOKING_CANCELLED => 'Cancelled', ]; @endphp
Admin Rental Data Pembayaran

Data Pembayaran

Pantau dan verifikasi pembayaran booking pelanggan di halaman ini.

{{ $rentalCompany->company_name ?? 'Rental Company' }}
Reset
@if ($bookings->count() > 0)
@foreach ($bookings as $index => $booking) @php $payment = $booking->payment; $paymentStatus = $payment?->payment_status ?? \App\Models\Payment::STATUS_UNPAID; $bookingStatus = $booking->booking_status; $paymentStatusClass = match ($paymentStatus) { \App\Models\Payment::STATUS_UPLOADED => 'is-uploaded', \App\Models\Payment::STATUS_VERIFIED => 'is-verified', \App\Models\Payment::STATUS_REJECTED => 'is-rejected', default => 'is-unpaid', }; $bookingStatusClass = match ($bookingStatus) { \App\Models\Booking::BOOKING_WAITING_PAYMENT => 'is-waiting-payment', \App\Models\Booking::BOOKING_WAITING_VERIFICATION => 'is-waiting-verification', \App\Models\Booking::BOOKING_CONFIRMED => 'is-confirmed', \App\Models\Booking::BOOKING_ONGOING => 'is-ongoing', \App\Models\Booking::BOOKING_COMPLETED => 'is-completed', \App\Models\Booking::BOOKING_CANCELLED => 'is-cancelled', default => 'is-default', }; $methodLabel = $payment && $payment->payment_method ? ($paymentMethodsConfig[$payment->payment_method]['label'] ?? $payment->payment_method) : '-'; @endphp @endforeach
No Booking Code Customer Kendaraan Metode Pembayaran Total Bayar Bukti Pembayaran Status Pembayaran Status Booking Tanggal Upload / Paid At Aksi
{{ ($bookings->firstItem() ?? 1) + $index }} {{ $booking->booking_code }} {{ $booking->customer_name }} {{ $booking->vehicle->name ?? '-' }} {{ $methodLabel }} Rp {{ number_format((float) $booking->total_amount, 0, ',', '.') }} @if ($payment?->proof_payment) Lihat Bukti @else Belum Upload @endif {{ $payment?->status_label ?? 'Belum Bayar' }} {{ $booking->booking_status_label }} @if ($payment?->paid_at) {{ $payment->paid_at->format('d M Y H:i') }} @else - @endif
Detail @if ($paymentStatus === \App\Models\Payment::STATUS_UPLOADED)
@csrf @method('PATCH')
Tolak @endif
{{ $bookings->appends(request()->query())->links() }}
@else

Belum ada data pembayaran

Pembayaran dari customer akan muncul di halaman ini setelah booking dibuat.

@endif
@endsection