{% 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>
<header>
    <h4>Receiving Report</h4>
</header>
<table>
    <tr>
        <td>Branch : {{ addInventory.healthFacility.description }}</td>
        <td>Status : {{ addInventory.status }}</td>
    </tr>
</table>
<table class="report-data" width="100%">
    <thead class="header">
    <tr>
        <th>Quantity</th>
        <th>Item</th>
        <th>Price</th>
        <th>Amount</th>
    </tr>
    </thead>
    <tbody>
    {% set amount = 0 %}
    {% set totalAmount = 0 %}

    {% for item in addInventory.addinventoryitems %}
        {% set amount = item.quantity * item.price %}
        {% set totalAmount = totalAmount + amount %}
        <tr class="{{ trC }}">
            <td>{{ item.quantity }}</td>
            <td>{{ item.item.description }}</td>
            <td>{{ item.price }}</td>
            <td>{{ amount|number_format(2, '.', ',') }}</td>
        </tr>
    {% endfor %}
    <tr>
        <td>Total</td>
        <td>
            {{ totalAmount|number_format(2, '.', ',') }}
        </td>
    </tr>
</table>
</body>
</html>