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

{% block body %}
<div id="genetableau">
	<center>
	<div>
		<form method="POST" id='formulaireListeTVA'>
			<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('CODE_TVA',  infoPagination.filter.tri_CODE_TVA, 'Code' | trad, 'genetableau', path('Ajax.liste.TVA'), 'formulaireListeTVA') }}</th>
        					<th>{{ triTable('LIBELLE',  infoPagination.filter.tri_LIBELLE, 'Libellé' | trad, 'genetableau', path('Ajax.liste.TVA'), 'formulaireListeTVA') }}</th>
        				</tr>
        			</thead>
        			<tbody>
        				<tr>
        					<th>{{ filterTable('CODE_TVA', infoPagination.filter.filter_CODE_TVA, '', 'genetableau', path('Ajax.liste.TVA'), 'formulaireListeTVA') }}</th>
        					<th>{{ filterTable('LIBELLE', infoPagination.filter.filter_LIBELLE, '', 'genetableau', path('Ajax.liste.TVA'), 'formulaireListeTVA') }}</th>
        				</tr>
        				{% for type in TVA %}
        				
        				<tr onclick="{{ attrJs('changeCodeLibelle', [ post.divCode, type.CODE_TVA | number_format(2, '.'), post.divLibelle, type.LIBELLE ~ ' (' ~ type.CODE_TVA | number_format(2, '.') ~')']) }};desactivePopup()">
        					<td id ="{{type.CODE_TVA}}">{{ type.CODE_TVA | number_format(2, '.') }}</td>
        					<td>{{ type.LIBELLE  | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
        
        				</tr>
        				{% endfor %}
        			</tbody>
    			</table>
			
		</form>
		
	{{ paginations(path('Ajax.liste.TVA'),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}
	</div>

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