{% extends 'layout.twig' %}

{% block body %}
	<div class="contenu clearfix" >
	<h1>
    	{{ Titre }}
    </h1>
    {{ ariane() }}
    
    <div class="clearfix titre_div">
        <h2>
        	{% if MODULE=='Fournisseur' %}
                {{ MODULE }} : {{ libelle }} ({{ id }})
            {% else %}
            	{{ 'Fournisseur' }} : {{ libelle }} ({{ id }})
            {% endif %}
        </h2>
        
            {{ arianeSub() }}

    <form method='POST' id='FormAccArticle' name='FormAccArticle'  class="padding15">
    	<div id="accArticle" class="tab-pane fade in active clearfix">
			<table class="table table-hover sans_actions">
            	<thead class="thead-dark">
                	<tr>
                    	<th scope="col" width="7%">{{ 'Code' | trad }}</th>
                        <th scope="col">{{ 'Libellé Accord' | trad }}</th>
                        <th scope="col" width='10%'>{{ 'Fournisseur/Groupement' | trad }}</th>
                        <th scope="col" width="7%">{{ 'Code' | trad }}</th>
                        <th scope="col">{{ 'Nom fournisseur' | trad }}</th>
                    </tr>
                </thead>
                <tbody>
                	<tr>
                    	<td>{{ filterTable('CODE_ACD', infoPagination.filter.filter_CODE_ACD, '', '', '', 'FormAccArticle', '') }}</td>
                    	<td>{{ filterTable('LIBELLE', infoPagination.filter.filter_LIBELLE, '', '', '', 'FormAccArticle', '') }}</td>
                    	<td>{{ filterSelect('typeDoc', infoPagination.filter.filter_typeDoc, { F : 'Fournisseur' | trad , G : 'Groupement' | trad }) }}</td>
                    	<td>{{ filterTable('FOURNISS', infoPagination.filter.filter_FOURNISS, '', '', '', 'FormAccArticle', '') }}</td>
                    	<td>{{ filterTable('RS', infoPagination.filter.filter_RS, '', '', '', 'FormAccArticle', '') }}</td>
                	</tr>
                	{% for AccCadre in listeAcc %}
                    	<tr id={{ loop.index }}>
                        	<td class="loupe">{{ AccCadre.CODE_ACD }}</td>
                        	<td>{{ AccCadre.LIBELLE }}</td>
                        	<td>{{ AccCadre.TYPE_FG }}</td>
                        	<td>{{ AccCadre.FOURNISS }}</td>
                        	<td>{{ AccCadre.RS_FG }}</td>
                    	</tr>   
                    	<tr class="hide_detail detail_ligne" id="{{ loop.index }}detail">
                    		<td colspan='5'>
                    			<h4>{{ 'Information complémentaire' | trad }}</h4>
                    			<div class="colonne3">
                        			<div class="informations">
                        				<p>
                        					<span class="champs_label">{{ 'Prix de base' | trad }}</span>
                        					<span class="resultat">{{ AccCadre.PU }} {{ AccCadre.DEVISE }}</span>
                        				</p>
                        				<p>
                        					<span class="champs_label">{{ 'Délai' | trad }}</span>
                        					<span class="resultat">{{ AccCadre.DELAI }}</span>
                        				</p>
                        				<p>
                        					<span class="champs_label">{{ 'Budget' | trad }}</span>
                        					<span class="resultat">{{ AccCadre.BUDGET }}</span>
                        				</p>
                        			</div>
                    			</div>
                    			<div class="colonne3">
                        			<div class="informations">
                        				<p>
                        					<span class="champs_label">{{ 'Quantité maximale' | trad }}</span>
                        					<span class="resultat">{{ AccCadre.QTEMAX }}</span>
                        				</p>
                        				<p>
                        					<span class="champs_label">{{ 'Quantité commandée' | trad }}</span>
                        					<span class="resultat">{{ AccCadre.QTECDEE }}</span>
                        				</p>
                        			</div>
                    			</div>
                    			<div class="colonne3">
                        			<div class="informations">
                        				<p>
                        					<span class="champs_label">{{ 'Date début validité' | trad }}</span>
                        					<span class="resultat">{{ AccCadre.DDEBVAL |dateTrad }}</span>
                        				</p>
                        				<p>
                        					<span class="champs_label">{{ 'Date fin validité' | trad }}</span>
                        					<span class="resultat">{{ AccCadre.DFINVAL | dateTrad }}</span>
                        				</p>
                        			</div>
                    			</div>
                    		</td>
                    	</tr>       	
                	{% endfor %}
                </tbody>
            </table>
            {{ paginations('',infoPagination.nombreDePage, infoPagination.page, infoPagination.post, '') }}
    	</div>
    </form>
</div>
</div>

{% endblock %}