{% load django_ledger %}
{% load i18n %}

<div class="box">
    <div class="table-container">
        <table class="table is-fullwidth is-striped is-hoverable is-narrow django-ledger-table-bottom-margin-75">
            <thead>
            <tr>
                <th>{% trans 'Account' %}</th>
                <th>{% trans 'Unit' %}</th>
                <th>{% trans 'Activity' %}</th>
                <th class="has-text-centered">{% trans 'TX Type' %}</th>
                <th class="has-text-right">{% trans 'Balance' %}</th>
            </tr>
            </thead>
            <tbody>
            {% for ce_tx in ce_txs_list %}
                <tr id="{{ ce_tx.get_html_id }}">
                    <td><span class="has-text-weight-bold">{{ ce_tx.account_model }}</span></td>
                    <td><span class="tag is-white">{{ ce_tx.unit_model.name }}</span></td>
                    <td>{% if ce_tx.activity %}<span class="tag is-light is-info">{{ ce_tx.get_activity_display }}</span>{% endif %}</td>
                    <td class="has-text-centered">
                        <span class="tag is-light {% if ce_tx.is_credit %}is-success{% else %}is-danger{% endif %} has-text-weight-bold">
                            {{ ce_tx.get_tx_type_display | upper }}
                        </span>
                    </td>
                    <td class="has-text-right">{% currency_symbol %}{{ ce_tx.balance | currency_format }}</td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
</div>
