<commit_before>{% block open_miam_miam_payments_for_allocate_payment_label %}

{% endblock %}

{% block open_miam_miam_payments_for_allocate_payment_widget %}
    <table class="payments">
        {% for child in form %}
            {% set payment = form.vars.choices[child.vars.value].data %}
            <tr class="payment">
                <td class="checkbox">{{ form_widget(child) }}</td>
                <td>
                    <label for="{{ child.vars.id }}">
                        {% set paymentAmount = payment.amount %}
                        {% set paymentRest = payment.rest %}

                        <span class="payment-rest">
                            {{ paymentRest|number_format_currency(open_miam_miam.currency) }}
                        </span>

                        {% if paymentRest < paymentAmount %}
                            <span class="payment-amount">
                                / {{ paymentAmount|number_format_currency(open_miam_miam.currency) }}
                            </span>
                        {% endif %}
                    </label>
                </td>
                <td>
                    <label for="{{ child.vars.id }}">
                        {{ payment.date|date('d/m/Y') }}
                    </label>
                </td>
                <td>
                    <label for="{{ child.vars.id }}">
                        {{ ("admin.association.sales_orders.payment.type_"~payment.type)|trans }}
                    </label>
                </td>
            </tr>
        {% endfor %}
    </table>

{% endblock %}

{% block open_miam_miam_payment_row %}
    <table class="new-payment">
        <tr>
            {% if without_checkbox is not defined or without_checkbox == false %}
                <td class="checkbox"></td>
            {% endif %}
            <td>
                <strong>{{ 'admin.association.sales_orders.payment.form.new_payment'|trans }}</strong>
                <div class="new-payment row">
                    <div class="col-md-6">
                        {{ form_widget(form.amount) }}
                    </div>
                    <div class="col-md-6">
                        {{ form_widget(form.type, {'attr': {'class': 'form-control'}}) }}
                    </div>
                </div>
            </td>
        </tr>
    </table>
{% endblock %}

{% block money_widget %}
    {% set currency = money_pattern|replace({'{{ widget }}': ''}) %}

    <div {% if form.vars.errors %}class="has-error"{% endif %}>
        <div class="input-group">
            {{ form_widget(form, {'attr': {'class': 'form-control'}}) }}
            <span class="input-group-addon">{{ currency }}</span>
        </div>
        {{ form_errors(form) }}
    </div>

{% endblock %}

{% block open_miam_miam_sales_orders_for_allocate_payment_label %}

{% endblock %}

{% block open_miam_miam_sales_orders_for_allocate_payment_widget %}
    <table class="sales-orders">
        {% for child in form %}<commit_msg>Fixed all fields in red (other one)<commit_after>{% block open_miam_miam_payments_for_allocate_payment_label %}

{% endblock %}

{% block open_miam_miam_payments_for_allocate_payment_widget %}
    <table class="payments">
        {% for child in form %}
            {% set payment = form.vars.choices[child.vars.value].data %}
            <tr class="payment">
                <td class="checkbox">{{ form_widget(child) }}</td>
                <td>
                    <label for="{{ child.vars.id }}">
                        {% set paymentAmount = payment.amount %}
                        {% set paymentRest = payment.rest %}

                        <span class="payment-rest">
                            {{ paymentRest|number_format_currency(open_miam_miam.currency) }}
                        </span>

                        {% if paymentRest < paymentAmount %}
                            <span class="payment-amount">
                                / {{ paymentAmount|number_format_currency(open_miam_miam.currency) }}
                            </span>
                        {% endif %}
                    </label>
                </td>
                <td>
                    <label for="{{ child.vars.id }}">
                        {{ payment.date|date('d/m/Y') }}
                    </label>
                </td>
                <td>
                    <label for="{{ child.vars.id }}">
                        {{ ("admin.association.sales_orders.payment.type_"~payment.type)|trans }}
                    </label>
                </td>
            </tr>
        {% endfor %}
    </table>

{% endblock %}

{% block open_miam_miam_payment_row %}
    <table class="new-payment">
        <tr>
            {% if without_checkbox is not defined or without_checkbox == false %}
                <td class="checkbox"></td>
            {% endif %}
            <td>
                <strong>{{ 'admin.association.sales_orders.payment.form.new_payment'|trans }}</strong>
                <div class="new-payment row">
                    <div class="col-md-6">
                        {{ form_widget(form.amount) }}
                    </div>
                    <div class="col-md-6">
                        {{ form_widget(form.type, {'attr': {'class': 'form-control'}}) }}
                    </div>
                </div>
            </td>
        </tr>
    </table>
{% endblock %}

{% block money_widget %}
    {% set currency = money_pattern|replace({'{{ widget }}': ''}) %}

    <div {% if form.vars.errors|length %}class="has-error"{% endif %}>
        <div class="input-group">
            {{ form_widget(form, {'attr': {'class': 'form-control'}}) }}
            <span class="input-group-addon">{{ currency }}</span>
        </div>
        {{ form_errors(form) }}
    </div>

{% endblock %}

{% block open_miam_miam_sales_orders_for_allocate_payment_label %}

{% endblock %}

{% block open_miam_miam_sales_orders_for_allocate_payment_widget %}
    <table class="sales-orders">
        {% for child in form %}
{'fraction_non_alphanumeric': 0.14826498422712933, 'fraction_numerical': 0.0006641208699983397, 'mean_word_length': 1.4457978075517661, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 93, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '6546364', 'n_tokens_mistral': 1779, 'n_tokens_neox': 1587, 'n_words': 282}