<commit_before><table class="table table-hover">
    <thead>
    <tr>
        <th>{{ 'budget'|_ }}</th>
        <th class="hidden-xs">{{ 'date'|_ }}</th>
        <th>{{ 'budgeted'|_ }}</th>
        <th>{{ 'spent'|_ }}</th>
        <th>{{ 'left'|_ }}</th>
        <th>{{ 'overspent'|_ }}</th>
    </tr>
    </thead>
    <tbody>
    {% for budgetLine in budgets.getBudgetLines %}
        <tr>
            <td>
                {% if budgetLine.getBudget.id %}
                    <a href="{{ route('budgets.show',budgetLine.getBudget.id) }}">{{ budgetLine.getBudget.name }}</a>
                {% else %}
                    <em>{{ 'no_budget'|_ }}</em>
                {% endif %}
            </td>
            <td class="hidden-xs">
                {% if budgetLine.getRepetition.id %}
                    <a href="{{ route('budgets.showWithRepetition', [budgetLine.getBudget.id, budgetLine.getRepetition.id]) }}">
                        {{ budgetLine.getRepetition.startdate.formatLocalized(monthAndDayFormat) }}
                        &mdash;
                        {{ budgetLine.getRepetition.enddate.formatLocalized(monthAndDayFormat) }}
                    </a>
                {% endif %}
            </td>
            <td>
                {% if budgetLine.getRepetition.id %}
                    {{ budgetLine.getRepetition.amount|formatAmount }}
                {% else %}
                    {{ 0|formatAmount }}
                {% endif %}
            </td>
            <td>
                {% if budgetLine.getSpent != 0 %}
                    {{ budgetLine.getSpent|formatAmount }} <i class="fa fa-fw text-muted fa-info-circle firefly-info-button"
                                                              data-location="budget-spent-amount" data-budget-id="{{ budgetLine.getBudget.id }}"
                ></i>
                {% endif %}

                {% if budgetLine.getSpent == 0 %}
                    {{ budgetLine.getSpent|formatAmount }}
                {% endif %}

            </td>
            <td>
                {% if(budgetLine.getOverspent == 0) %}
                    {{ budgetLine.getLeft|formatAmount }}
                {% endif %}
            </td>
            <td>
                {% if budgetLine.getOverspent != 0 %}
                    {{ budgetLine.getOverspent|formatAmount }}
                {% endif %}
            </td>
        </tr>
    {% endfor %}
    </tbody>
    <tfoot>
    <tr>
        <td><em>{{ 'sum'|_ }}</em></td>
        <td class="hidden-xs">&nbsp;</td>
        <td>{{ budgets.getBudgeted|formatAmount }}</td>
        <td>
            {% if budgets.getSpent != 0 %}
                <span class="text-danger">{{ budgets.getSpent|formatAmountPlain }}</span>
            {% endif %}
            {% if budgets.getSpent == 0 %}
                {{ budgets.getSpent|formatAmount }}
            {% endif %}
        </td>
        <td>{{ budgets.getLeft|formatAmount }}</td>
        <td><span class="text-danger">{{ budgets.getOverspent|formatAmountPlain }}</span></td>
    </tr>
    </tfoot>
</table><commit_msg>Add sorting to a report table [skip ci]<commit_after><table class="table table-hover sortable">
    <thead>
    <tr>
        <th data-defaultsign="az">{{ 'budget'|_ }}</th>
        <th data-defaultsign="month" class="hidden-xs">{{ 'date'|_ }}</th>
        <th data-defaultsign="_19">{{ 'budgeted'|_ }}</th>
        <th data-defaultsign="_19">{{ 'spent'|_ }}</th>
        <th data-defaultsign="_19">{{ 'left'|_ }}</th>
        <th data-defaultsign="_19">{{ 'overspent'|_ }}</th>
    </tr>
    </thead>
    <tbody>
    {% for budgetLine in budgets.getBudgetLines %}
        <tr>

            {% if budgetLine.getBudget.id %}
                <td data-value="{{ budgetLine.getBudget.name }}">
                    <a href="{{ route('budgets.show',budgetLine.getBudget.id) }}">{{ budgetLine.getBudget.name }}</a>
                </td>
            {% else %}
                <td data-value="zzzzzzz">
                    <em>{{ 'no_budget'|_ }}</em>
                </td>
            {% endif %}


            {% if budgetLine.getRepetition.id %}
                <td class="hidden-xs" data-value="{{ budgetLine.getRepetition.startdate.format('Y-m-d') }}">
                    <a href="{{ route('budgets.showWithRepetition', [budgetLine.getBudget.id, budgetLine.getRepetition.id]) }}">
                        {{ budgetLine.getRepetition.startdate.formatLocalized(monthAndDayFormat) }}
                        &mdash;
                        {{ budgetLine.getRepetition.enddate.formatLocalized(monthAndDayFormat) }}
                    </a>
                </td>
            {% else %}
                <td data-value="0000-00-00">

                </td>
            {% endif %}


            {% if budgetLine.getRepetition.id %}
                <td data-value="{{ budgetLine.getRepetition.amount }}">
                    {{ budgetLine.getRepetition.amount|formatAmount }}
                </td>
            {% else %}
                <td data-value="0">
                    {{ 0|formatAmount }}
                </td>
            {% endif %}

            <td data-value="{{ budgetLine.getSpent }}">
                {% if budgetLine.getSpent != 0 %}
                    {{ budgetLine.getSpent|formatAmount }}
                    <i class="fa fa-fw text-muted fa-info-circle firefly-info-button"
                       data-location="budget-spent-amount" data-budget-id="{{ budgetLine.getBudget.id }}"></i>
                {% endif %}

                {% if budgetLine.getSpent == 0 %}
                    {{ budgetLine.getSpent|formatAmount }}
                {% endif %}

            </td>
            <td data-value="{{ budgetLine.getLeft }}">
                {% if(budgetLine.getOverspent == 0) %}
                    {{ budgetLine.getLeft|formatAmount }}
                {% endif %}
            </td>
            <td data-value="{{ budgetLine.getOverspent }}">
                {% if budgetLine.getOverspent != 0 %}
                    {{ budgetLine.getOverspent|formatAmount }}
                {% endif %}
            </td>
        </tr>
    {% endfor %}
    </tbody>
    <tfoot>
    <tr>
        <td><em>{{ 'sum'|_ }}</em></td>
        <td class="hidden-xs">&nbsp;</td>
        <td>{{ budgets.getBudgeted|formatAmount }}</td>
        <td>
            {% if budgets.getSpent != 0 %}
                <span class="text-danger">{{ budgets.getSpent|formatAmountPlain }}</span>
            {% endif %}
            {% if budgets.getSpent == 0 %}
                {{ budgets.getSpent|formatAmount }}
            {% endif %}
        </td>
        <td>{{ budgets.getLeft|formatAmount }}</td>
        <td><span class="text-danger">{{ budgets.getOverspent|formatAmountPlain }}</span></td>
    </tr>
    </tfoot>
</table>
{'fraction_non_alphanumeric': 0.16979459139943845, 'fraction_numerical': 0.004581055120437417, 'mean_word_length': 1.457516339869281, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 0, '>': 137, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7580410', 'n_tokens_mistral': 2203, 'n_tokens_neox': 1903, 'n_words': 319}