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

{% block body %}
<div  id="genetableau">
	<center>
	<div>
		<form method="POST" id='formulaireListeCommande'>
			<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('NO_CDE',  infoPagination.filter.tri_NO_CDE, 'Code commande' | trad, 'code commande', path(path), 'formulaireListeCommande') }}</th>
        					<th>{{ triTable('CODE_FOU',  infoPagination.filter.tri_CODE_FOU, 'Code fournisseur' | trad, 'Code fournisseur', path(path), 'formulaireListeCommande') }}</th>
        					{% if MODELE %}
            					<th>{{ triTable('CODE_FOU',  infoPagination.filter.tri_MODELE, 'Libellé modèle' | trad, 'modele', path(path), 'formulaireListeCommande') }}</th>
        					{% endif %}
        				</tr>
        			</thead>
        			<tbody>
        				<tr>
        					<th>{{ filterTable('NO_CDE', infoPagination.filter.filter_NO_CDE, '', 'genetableau', path(path), 'formulaireListeCommande') }}</th>
        					<th>{{ filterTable('CODE_FOU', infoPagination.filter.filter_CODE_FOU, '', 'genetableau', path(path), 'formulaireListeCommande') }}</th>
        					{% if MODELE %}
        						<th>{{ filterTable('MODELE', infoPagination.filter.filter_MODELE, '', 'genetableau', path(path), 'formulaireListeCommande') }}</th>
        					{% endif %}
        				</tr>
        				</tr>
        				{% for commande in entity %}
        				
        				<tr onclick='changeCodeLibelle("{{ post.divCode }}","{{ commande.NO_CDE |e('js')|raw }}", "", "");desactivePopup ()'>
        					<td>{{ commande.NO_CDE }}</td>        
        					<td>{{ commande.CODE_FOU }}</td> 
        					{% if MODELE %}
        						<td>{{ commande.MODELE }}</td> 
        					{% endif %}
        				</tr>
        				{% endfor %}
        			</tbody>
    			</table>
			
		</form>
		
	{{ paginations(path(path),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}
	</div>

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