{% set absUrl = app.request.getSchemeAndHttpHost() ~ app.request.baseUrl|replace({'/app_dev.php': ''}) %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="{{ absUrl ~ asset('bundles/rxconnexion/admin/css/report/report_wkpdf.css') }}" />
</head>
<body>
<h2><strong>{{ page_title }}</strong></h2>
<table class="report-data" width="100%">
    <thead class="header">
    <tr>
        <th>Payment Type</th>
        <th>Patient</th>
        <th>Financing Company</th>
        <th>Pay Date</th>
        <th>Amount</th>
        <th>Bill Due Amount</th>
        <th>Bill Paid Amount</th>
        <th>Bill Balance Amount</th>
        <th>Status</th>
        <th>Note</th>
    </tr>
    </thead>
    <tbody>
    {% set totalCount = 0 %}
    {% for record in records %}
        {% set trC = loop.index > 1 and loop.index % 2 == 0 ? 'even' : 'odd' %}
        {% set totalCount = totalCount + 1 %}
        <tr class="{{ trC }}">
            <td>{{ record.pay_type }}</td>
            <td>{{ record.patientName }}</td>
            <td>{{ record.financingCompany }}</td>
            <td>{{ record.pay_date }}</td>
            <td class="text-right">{{ record.amount|number_format(2, '.', ',') }}</td>
            <td class="text-right">{{ record.bill_due_amount|number_format(2, '.', ',') }}</td>
            <td class="text-right">{{ record.bill_paid_amount|number_format(2, '.', ',') }}</td>
            <td class="text-right">{{ record.bill_bal_amount|number_format(2, '.', ',') }}</td>
            <td>{{ record.payment_status }}</td>
            <td>{{ record.note|raw }}</td>
        </tr>
    {% endfor %}
</table>
<div>Total Record(s): {{ totalCount }}</div>
</body>
</html>