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

{% block body %}
<div id="genetableau">
	<center>
	<div>
		<form method="POST" id='formulaireliste'>
			<input type="hidden" name="divCode" value="{{ post.divCode }}" />
			<input type="hidden" name="divLibelle" value="{{ post.divLibelle }}" />
			
			<table class="table" id="tableau">
				<thead class="thead-dark">
    				<tr>
						<th>{{ triTable('type',  infoPagination.filter.tri_type, 'Type' | trad, 'genetableau', path('Ajax.liste.frsAndGrpFou'), 'formulaireliste') }}</th>
    					<th>{{ triTable('CODE',  infoPagination.filter.tri_CODE, 'Code' | trad, 'genetableau', path('Ajax.liste.frsAndGrpFou'), 'formulaireliste') }}</th>
    					<th>{{ triTable('RS',  infoPagination.filter.tri_RS, 'Raison social' | trad,'genetableau', path('Ajax.liste.frsAndGrpFou'), 'formulaireliste') }}</th>
    				</tr>
    			</thead>
    			<tbody>
    				<tr>
						<th>
							{{ filterSelect('type', infoPagination.filter.filter_type, {'Fournisseur' : 'Fournisseur' | trad, 'Groupement' : 'Groupement' | trad}, 'formulaireliste', '','genetableau',  path('Ajax.liste.frsAndGrpFou'), '', '') }}
						</th>
    					<th>{{ filterTable('CODE', infoPagination.filter.filter_CODE, '', 'genetableau', path('Ajax.liste.frsAndGrpFou'), 'formulaireliste') }}</th>
    					<th>{{ filterTable('RS', infoPagination.filter.filter_RS, '', 'genetableau', path('Ajax.liste.frsAndGrpFou'), 'formulaireliste') }}</th>
    				</tr>
    				{% for periode in entity %}

    				<tr onclick='changeCodeLibelle("{{ post.divCode }}","{{ periode.CODE | convert_encoding('UTF-8', 'ISO-8859-1')  }}", "{{ post.divLibelle }}", "{{ periode.RS~' ('~periode.CODE~')' | convert_encoding('UTF-8', 'ISO-8859-1') }}");desactivePopup ()'>
    					<td>{{ periode.type | trad  }}</td>
						<td>{{ periode.CODE | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
    					<td>{{ periode.RS | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>

    				</tr>
    				{% endfor %}
    			</tbody>
			</table>
			
		</form>
		
	{{ paginations(path('Ajax.liste.frsAndGrpFou'),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}
	</div>

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