{{ $title ?? 'Season Transaction Report' }}

Generated Date: {{ $generatedDate ?? now()->format('d/m/Y H:i') }} Date Filter: {{ $dateRange ?: 'All Dates' }}
Parking Site: {{ $siteName ?? 'All Accessible Sites' }} Total Records: {{ $datas->count() }}
@forelse ($datas as $i => $row) @php $st = strtolower($row->payment_status); $badgeClass = match($st) { 'approved', 'success', 'paid' => 'badge-success', 'pending', 'pending_approval' => 'badge-warning', 'failed', 'rejected' => 'badge-danger', default => '', }; $period = '-'; if ($row->period_start && $row->period_end) { $monthLabel = ($row->period_start->format('Y-m') === $row->period_end->format('Y-m')) ? $row->period_start->format('F Y') : ($row->period_start->format('M Y') . ' - ' . $row->period_end->format('M Y')); $period = $monthLabel . ' (' . $row->period_start->format('d/m/Y') . ' - ' . $row->period_end->format('d/m/Y') . ')'; } elseif ($row->billing_month) { $period = $row->billing_month->format('M Y'); } $date = $row->payment_date ? $row->payment_date->format('d/m/Y H:i') : ($row->submitted_at ? $row->submitted_at->format('d/m/Y H:i') : optional($row->created_at)?->format('d/m/Y H:i')); @endphp @empty @endforelse
# Invoice / Ref Site Customer Name Pass ID Billing Period Method Amount (RM) Status Payment Date
{{ $i + 1 }} {{ $row->invoice_no ?: $row->external_transaction_id }} @if($row->reference_no)
Ref: {{ $row->reference_no }} @endif
{{ optional($row->site)->site_name ?? ('Site #' . $row->site_id) }} {{ $row->customer_name }} {{ $row->seasonPass?->external_season_id ?: ('#' . $row->season_pass_id) }} {{ $period }} {{ ucwords(str_replace('_', ' ', (string)$row->payment_method)) }} {{ number_format((float)($row->amount ?? 0), 2) }} {{ ucwords(str_replace('_', ' ', (string)$row->payment_status)) }} {{ $date }}
No transaction records found matching the filter.
Total Amount: RM {{ number_format($datas->sum('amount'), 2) }}