{% load django_ledger %}
{% load i18n %}
<div class="box">
    <div class="table-container">
        <table class="table is-fullwidth is-striped is-hoverable is-narrow">
            <thead>
            <tr>
                <th>{% trans 'Item' %}</th>
                <th>{% trans 'UOM' %}</th>
                <th class="has-text-right">{% trans 'Quantity' %}</th>
                <th class="has-text-right">{% trans 'Value' %}</th>
            </tr>
            </thead>
            <tbody>
            {% for i in inventory_list %}
                <tr>
                    <td><span class="has-text-weight-bold">{{ i.item_model__name }}</span></td>
                    <td>{{ i.item_model__uom__name }}</td>
                    <td class="has-text-right">{{ i.total_quantity | floatformat:3 }}</td>
                    <td class="has-text-right">{% currency_symbol %}{{ i.total_value | currency_format }}</td>
                </tr>
            {% endfor %}
            </tbody>
            <tfoot>
            <tr>
                <th colspan="2"></th>
                <th class="has-text-right">{% trans 'Total Value' %}</th>
                <th class="has-text-right">{% currency_symbol %}{{ inventory_total_value | currency_format }}</th>
            </tr>
            </tfoot>
        </table>
    </div>
</div>