{% 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>Branch</th>
        <th>Item</th>
        <th>Code</th>
        <th>Status</th>
        <th>Quantity</th>
        {% if hasCost %}
            <th>Ave Cost</th>
        {% endif %}
    </tr>
    </thead>
    <tbody>
    {% set totalCount = 0 %}
    {% for record in records %}
        {% set totalCount = totalCount + 1 %}
        <tr>
            <td>{{ record.branch }}</td>
            <td>{{ record.item }}</td>
            <td>{{ record.codes }}</td>
            <td>{{ record.status }}</td>
            <td>{{ record.quantity }}</td>
            {% if hasCost %}
                <td>{{ record.ave_cost }}</td>
            {% endif %}
        </tr>
    {% endfor %}
</table>
<div>Total Records: {{ totalCount }}</div>
</body>
</html>