<table class="table table-hover sortable">
    <thead>
    <tr>
        <th data-defaultsign="az">{{ 'name'|_ }}</th>
        <th data-defaultsign="_19" class="text-right">{{ 'spent'|_ }}</th>
        <th data-defaultsign="_19" class="text-right">{{ 'earned'|_ }}</th>
        <th data-defaultsign="_19" class="text-right">{{ 'sum'|_ }}</th>
    </tr>
    </thead>
    <tbody>
    {% for account in report %}
        <tr>
            <td>
                <a href="{{ route('accounts.show', [account.account_id]) }}" title="{{ account.account_name }}">{{ account.account_name }}</a>
            </td>
            <td class="text-right">
                {{ formatAmountBySymbol(account.spent, account.currency_symbol, account.currency_decimal_places) }}
            </td>
            <td class="text-right">
                {{ formatAmountBySymbol(account.earned, account.currency_symbol, account.currency_decimal_places) }}
            </td>
            <td class="text-right">
                {{ formatAmountBySymbol(account.sum, account.currency_symbol, account.currency_decimal_places) }}
            </td>
        </tr>
    {% endfor %}
    </tbody>
    <tfoot>
    {% for sum in sums %}
        <tr>
            <td>{{ 'sum'|_ }} ({{ sum.currency_name }})</td>
            <td class="text-right">
                {{ formatAmountBySymbol(sum.spent, sum.currency_symbol, sum.currency_decimal_places) }}
            </td>
            <td class="text-right">
                {{ formatAmountBySymbol(sum.earned, sum.currency_symbol, sum.currency_decimal_places) }}
            </td>
            <td class="text-right">
                {{ formatAmountBySymbol(sum.sum, sum.currency_symbol, sum.currency_decimal_places) }}
            </td>
        </tr>
    {% endfor %}
    </tfoot>
</table>
