{% extends '@RxConnexion/Admin/global.html.twig' %}
{% block body %}
    <h3>{{ page_title }}</h3>
    <table class="report-data" width="50%">
        <thead class="header">
        <tr>
            <th>MRN</th>
            <th>Reference No.</th>
            <th>Title</th>
            <th>Request Date</th>
            <th>Branch</th>
            <th>Department</th>
            <th>Requested By</th>
            <th>Status</th>
            <th>Quantity Added</th>
        </tr>
        </thead>
        <tbody>
        {% set totalCount = 0 %}
        {% for materialrequisition in materialRequisitions %}
            {% set totalCount = totalCount + 1 %}

            <tr>
                <td>{{ materialrequisition.materialrequisitionno }}</td>
                <td>{{ materialrequisition.referenceno }}</td>
                <td>{{ materialrequisition.title }}</td>
                <td>{{ materialrequisition.requestdateasstring }}</td>
                <td>{{ materialrequisition.branch.description }}</td>
                <td>{{ materialrequisition.department.description }}</td>
                <td>{{ materialrequisition.user.fullname }}</td>
                <td>{{ materialrequisition.status }}</td>
                <td>{{ materialrequisition.quantityadded }}</td>
            </tr>
        {% endfor %}
        <tr>
            <td colspan="2">Total Records: {{ totalCount }}</td>
        </tr>
        </tbody>
    </table>

    {% include '@RxConnexion/Admin/js.html.twig' %}

    <script>
        //<![CDATA[
        jQ(document).ready(function(){
            report_preview.init();
        });
        //]]>
    </script>
{% endblock %}