<style>
    table {
        font-size: 10px;
        border-collapse: collapse;
        width: 100%;
        table-layout: fixed;
        word-wrap: break-word;
    }

    th,
    td {
        border: 1px solid black;
    }

    th,
    td {
        padding: 4px;
        text-align: left;
        /* border: 1px solid #ddd; */
    }

    th {
        text-align: left;
    }

    .page-break {
        page-break-after: always;
    }

    .header {
        font-size: 22px;
        text-align: center;
        margin-bottom: 20px;
    }

    .logo {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
</style>
<div class="header">
    <h2>{{ $general->site_name }}</h2>
</div>

<h3>Donation List</h3>

<table>
    <tr>
        <th>Payer User ID</th>
        <th>Payer Full Name</th>
        <th>Payer User Name</th>
        <th>Payer Email</th>
        <th>Amount</th>
        <th>Receiver User ID</th>
        <th>Receiver Full Name</th>
        <th>Receiver User Name</th>
        <th>Receiver Email</th>
        <th>Staus</th>
        <th>Payment Method</th>
        <th>UTR No</th>
        <th>TRX</th>
        <th>Created At</th>
    </tr>
    @foreach($donationList as $trx)
        <tr>
            <td>{{ $trx->payerUser->system_id }}</td>
            <td>{{ $trx->payerUser->firstname . ' ' . $trx->payerUser->lastname }}</td>
            <td>{{ $trx->payerUser->username }}</td>
            <td>{{ $trx->payerUser->email }}</td>
            <td> {{ $general->cur_text }}{{ getAmount($trx->amount) }}</td>
            <td>{{ $trx->receiverUser->system_id }}</td>
            <td>{{ $trx->receiverUser->firstname . ' ' . $trx->receiverUser->lastname }}</td>
            <td>{{ $trx->receiverUser->username }}</td>
            <td>{{ $trx->receiverUser->email }}</td>
            <td>{{ $trx->status == 1 ? 'Approved' : ($trx->status == 2 ? 'Rejected' : ($trx->status == 3 ? 'Pending' : 'Unknown')) }}</td>
            <td>{{ $trx->payment_mode }}</td>
            <td>{{ $trx->utr_no }}</td>
            <td>{{ $trx->trx }}</td>
            <td>{{ $trx->created_at->format('d M Y') }}</td>

        </tr>
    @endforeach
</table>

