{% extends 'layout.twig' %}

{% block body %}

    
	<div class="contenu clearfix"  id="ImportBudget">
        <h1>{{ 'Paramétrage' | trad }}</h1>        
        {{ ariane() }}
        <h2 style="padding: 0px 15px;"></h2>            
        {{ arianeSub() }}

        <div id="importBudgetaire" class="padding15">
            {{ Button('Fermer' | trad, 1, path('Parametrage.ParametrageLAD.fournisseur'), '', '', true, 'button_right') }}
            <span style="font-size:15px;">
                {{'Nombre de ligne(s) lue(s)' | trad}} : {{ post.totalRow }}<br/> {{'Nombre de ligne(s) importée(s)' | trad}} : {{ post.rowAdd }}<br/> {{'Nombre de ligne(s) en erreur' | trad}} : {{ post.rowError }}
            </span>

            {% if post.rowError != 0 %}
            <table class="table table-V2 table-hover main-table" style="margin-bottom:0px;margin-top:10px;">
                <thead class="thead-dark">
                    <tr>
                        <th scope="col" class="fixed-side align-center" width='75px'>{{ 'Statut' | trad }}</th>
                        <th scope="col" class="fixed-side">{{ 'Code fournisseur' | trad }}</th>
                        <th scope="col" class="fixed-side">{{ 'Code article' | trad }}</th>
                        <th scope="col" class="fixed-side">{{ 'Motif' | trad }}</th>
                    </tr>
                </thead>
                <tbody>
                    {% for row in arrayFinal %}
                        {% if row.statut == 'E' %}
                        <tr>
                            <td class="borderLeft {% if loop.last %}borderBottom{% endif %}" 
                                style="font-weight: bold; color:#ff3636;">
                                {{ 'Erreur' | trad }}
                            </td>
                            <td class=" {% if loop.last %}borderBottom{% endif %}">
                                {{ row.valueInsert.CODE }}
                            </td>
                            <td {% if loop.last %}class="borderBottom"{% endif %}>                                
                                {{ row.valueInsert.ARTICLE_INIT_FAC_LAD }}
                            </td>
                            <td {% if loop.last %}class="borderBottom"{% endif %}>
                                {{ row.error.MOTIF }}
                            </td>


                        </tr>
                        {% endif %}
                    {% endfor %}
                </tbody>
            </table>
            {% endif %}
        </div>
    </div>

{% endblock %}

