
{% extends 'layout.twig' %}

{% block body %}
	
    <div class="contenu clearfix"  id="marche">
    	<h1>{{ TITRE }}</h1>
                                      
		            {{ ariane() }} 

		<div class="tab-content">
        	<div id="historique-accord-cadre" class="tab-pane fade in active clearfix padding15">
		
        		<h2>{{ SOUSTITRE }} 
 					{# {{ ButtonExport(path('Fournisseur.Articles.exportArticleFG', {MODULE:MODULE, id:id}), 'filtre_CE') }} #}
				</h2>
        		{% if type=='fournisseur' or type=='groupement' %}
					{{ arianeSub() }}
				{% endif %}
            	
            	<table class="table table-hover">
                	<thead class="thead-dark">
                    	<tr>
                        	<th scope="col" width="9%">{{'AV' | trad}}</th>
                            <th scope="col">{{'Fournisseur' | trad }}</th>
                            <th scope="col" width="12%" class="align-center">{{'Début validité' | trad}}</th>
                            <th scope="col" width="12%" class="align-center">{{'Fin validité' | trad }}</th>
                            <th scope="col" width="10%">{{'Code Marché' | trad }}</th>
                            <th scope="col" width="12%" class="align-center">{{'Autorisé eProc' | trad }} ?</th>
                            <th scope="col" width="12%" class="align-center">{{'Aut. Cde Auto ?' | trad }}</th>
                            <th scope="col">{{'Acheteur Responsable' | trad }}</th>
                         
                        </tr>
                    </thead>
                    <tbody>
                      	{% set compteur = 1 %}
                       	{% for acc in accListe %}
							{% set compteur =  compteur + 1 %}
							
							<tr id="commande{{ compteur }}">

								<td class="loupe">{{ acc.AVENANT }}</td>
								<td> {{ acc.CODE_FOUR | fournisseurTrad }} ({{ acc.CODE_FOUR }})</td>
								<td class="align-center">{{ acc.DATE_DEB | dateTrad }}</td>
								<td class="align-center">{{ acc.DATE_FIN | dateTrad}}</td>
								<td>{{ acc.MARCHE }}</td>
								<td class="align-center">{{ acc.AUTOCC | boolTrad}}</td>
								<td class="align-center">{{ acc.CDEAUTO | boolTrad }}</td>
								<td>{{  acc.ACHRESP }} {% if acc.ACHRESP != '' %} ({{ acc.ACHRESP }}) {% endif %}</td>
								
							</tr>
							<tr id="commande{{  compteur  }}detail" class="detail_ligne hide_detail">
								<td colspan="11">
									<div class="colonne3">
										<div class="informations conditions">
											<p>
												<span class="champs_label">{{'Type de fournisseur F/G' | trad }} :</span>
												<span class="resultat">{{ acc.TYPE_FG=='F'? 'Fournisseur' | trad : 'Groupement' | trad }}</span>
											</p>
											<p>
												<span class="champs_label">{{'Délai préavis' | trad }} :</span>
												<span class="resultat">{{ acc.DEL_PRE }} {{ acc.JOU_MOI=='J'? 'Jours' | trad : 'Mois' | trad }} </span>
											</p>        									
										</div>
									</div>
									<div class="colonne3">
										<div class="informations">
											<p>
												<span class="champs_label">{{'Délai d\'alerte' | trad}} :</span>
												<span class="resultat">{{ acc.DEL_ALE ~ ' ' ~ 'Jours' | trad }}</span>
											</p>
											<p>
												<span class="champs_label">{{'Déjà alerté' | trad }} :</span>
												<span class="resultat">{{ acc.DEJ_ALE | boolTrad }}</span>
											</p>
										</div>
									</div>
									<div class="colonne3">
										<div class="informations">
											<p>
												<span class="champs_label">{{'Motif Avenant' | trad}} :</span>
												<span class="resultat">{{ acc.MOT_AVNT }}</span>
											</p>
											<p>
												<span class="champs_label">{{'Commentaire de l\'accord-cadre' | trad }} {{ id }} :</span>
												<span class="resultat">{{ acc.ACD_COMMENT }}</span>
											</p>
										</div>
									</div>

									{{ VisualisationCS('ACD', acc.CODE_ACD) }}

								</td>
							</tr>
                   		{% endfor %}
                   		
                    </tbody>
                </table>

				{{ paginations('',infoPagination.nombreDePage, infoPagination.page, infoPagination.post, '') }}

			</div>
        </div>
    </div>

{% endblock %}