
{% extends '@ajax-layout/layout.twig' %}

{% block body %}
<div id="genetableau">
	<center>
	<div>
		<form method="POST" id='formulaireListeAcheteurPopup'>
			<input type="hidden" name="divCode" value="{{ post.divCode }}" />
			<input type="hidden" name="divLibelle" value="{{ post.divLibelle }}" />
			<input type="hidden" name="filter_egal_CODE_STE" value="{{ post.filter_egal_CODE_STE }}"/>
			<table class="table" id="tableau">
				<thead class="thead-dark">
    				<tr>
    					<th>{{ triTable('CODE',  infoPagination.filter.tri_CODE, 'Code Acheteur' | trad, 'genetableau', path('Ajax.liste.acheteur'), 'formulaireListeAcheteurPopup') }}</th>
    					<th>{{ triTable('NOM',  infoPagination.filter.tri_NOM, 'Nom Acheteur' | trad,'genetableau', path('Ajax.liste.acheteur'), 'formulaireListeAcheteurPopup') }}</th>
    				</tr>
    			</thead>
    			<tbody>
    				<tr>
    					<th>{{ filterTable('CODE', infoPagination.filter.filter_CODE, '', 'genetableau', path('Ajax.liste.acheteur'), 'formulaireListeAcheteurPopup') }}</th>
    					<th>{{ filterTable('NOM', infoPagination.filter.filter_NOM, '', 'genetableau', path('Ajax.liste.acheteur'), 'formulaireListeAcheteurPopup') }}</th>
    				</tr>
    				{% for acheteur in acheteurs %}
    				
    				<tr onclick='changeCodeLibelle("{{ post.divCode }}","{{ acheteur.CODE | convert_encoding('UTF-8', 'ISO-8859-1')  }}", "{{ post.divLibelle }}", "{{ acheteur.NOM~' ('~acheteur.CODE~')' | convert_encoding('UTF-8', 'ISO-8859-1') }}");desactivePopup ()'>
    					<td id ="{{accadre.CODE}}">{{ acheteur.CODE | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
    					<td>{{ acheteur.NOM | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
    				</tr>
    				{% endfor %}
    			</tbody>
			</table>
			
		</form>
        	{{ paginations(path('Ajax.liste.acheteur'),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'genetableau') }}
		
	</div>

	</center>
	</div>
{% endblock %}