<!DOCTYPE html>
<html>
<head>
    <title>Payment Reports</title>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 8px;
        }
        th, td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2;
        }
        span {
            font-size: 9px;
        }
    </style>
</head>
<body>
<h1>Payment Reports</h1>
<table>
    <thead>
    <tr>
                                <th>Sl No</th>
                                <th>Date Subscribed</th>
                                <th>User Details</th>
                                <th>Plan Name</th>
                                <th>Plan Duration</th>
                                <th>Amount</th>
                                <th>Payment Method</th>
                                <th>Status</th>
                            </tr>
    </thead>
    <tbody>
    @foreach($paymentReports as $index => $report)
        <tr>
            <td>{{ $index + 1 }}</td>
            <td>{{ $report->created_at ? $report->created_at->format('d M, Y - h:i A') : 'N/A' }}</td>
            <td>{{ $report->user_number }}<br>{{ $report->name }}<br><span>{{ $report->dial_code }} {{ $report->phone }}</span></td>
            <td>{{ $report->user_plan_name ?? 'N/A' }}</td>
            <td>{{ $report->plan_type ?? 'N/A' }}</td>
            <td>{{ $report->amount }} {{ $report->currency }}</td>
            <td>{{ $report->method_type == 1 ? 'Credit Card' : 'N/A' }}</td>
            <td>{{ $report->payment_status }}</td>
        </tr>
    @endforeach
    </tbody>
</table>
</body>
</html>
