{% 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>
<h3 class="report-header"><strong>{{ page_title }}</strong> From: {{ dateFrom }} To: {{ dateTo }}</h3>
<h6 style="text-align: center">CBT Productivity Report</h6>
<h6 style="text-align: center">Scheduling</h6>
<table class="report-data" width="100%">
    <thead class="header">
    <tr>
        <th>ACTIVITY</th>
        <th>BOOKED</th>
        <th>Total Actual Number</th>
        <th>Target</th>
    </tr>
    </thead>
    <tbody>
    {% set hsatTarget = 0 %}
    {% for record in records %}
        {% set trC = loop.index > 1 and loop.index % 2 == 0 ? 'even' : 'odd' %}
        {% set hsatTarget = (record.totalBookedCount / 240) * 100 %}
        <tr class="{{ trC }}">
            <td>{{ record.chartType }}</td>
            <td>{{ record.totalBookedCount }}</td>
            <td>{{ record.totalCount }}</td>
            {% if record.chartType == 'HSAT' %}
                <td>{{ hsatTarget|number_format(2, '.', ',')~'%' }}</td>
            {% endif %}
        </tr>
    {% endfor %}
</table>

</body>
</html>