{% 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 }} - {{ type }}</strong></h2>
<table class="report-data" width="100%">
    <thead class="header">
    <tr>
        <th>Invoice No.</th>
        <th>Date</th>
        <th>Patient</th>
        <th>Company</th>
        <th>Branch</th>
        <th>Branch Address</th>
        <th>Status</th>
        <th>File</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><a href="{{ path('patient_detail', {patient_id : record.patientId|base64Encode, tab:'b', invoiceNo:record.invoiceNo}) }}" target="_blank">{{ record.invoiceNo }}</a></td>
            <td>{{ record.billingDate }}</td>
            <td><a href="{{ path('patient_detail', {patient_id : record.patientId|base64Encode, tab:'b'}) }}" target="_blank">{{ record.patient }}</a></td>
            <td>{{ record.companyDesc }}</td>
            <td>{{ record.healthFacility }}</td>
            <td>{{ record.healthFacilityAddress }}</td>
            <td>{{ record.billingStatus }}</td>
            <td><a href="" target="_blank">{{ record.patientFileDesc }}</a></td>
            <td>{{ record.note|raw }}</td>
        </tr>
    {% endfor %}
</table>
<div style="margin-bottom: 10px;">Total Record(s): {{ totalCount }}</div>
</body>
</html>