@extends('temple.layouts.app') @section('title', 'Receipts Report') @section('content') {{-- Filters --}}

{{ $receipts->total() }} receipts

₹{{ number_format($totalAmount, 2) }}
@forelse($receipts as $receipt) {{-- Reads from new (devotees.items) AND old (items) tables --}} @empty @endforelse
# Receipt No Date Devotee Vazhipad(s) Method Status Amount
{{ $receipts->firstItem() + $loop->index }} {{ $receipt->id }} {{ optional($receipt->receipt_date)->format('d-m-Y') ?? optional($receipt->created_at)->format('d-m-Y') ?? '—' }} {{ $receipt->devotee_name ?? '—' }} {{ $receipt->vazhipad_names ?: '—' }} {{ ucfirst($receipt->payment_method ?? '—') }} {{ ucfirst( str_replace( '_', ' ', $receipt->payment_status ?? '—' ) ) }} ₹{{ number_format($receipt->total_amount ?? 0, 2) }}
No receipts found for the selected filters.
{{ $receipts->withQueryString()->links() }}
@endsection @push('scripts') @endpush