{% extends '@ajax-layout/layout.twig' %}
{% block body %}
	<div id="genetableau">
		<center>
			<div>
				<form method="POST" id='batchList'>
					<table class="table" id="table">
						<thead class="thead-dark">
							<tr>
								<th>{{ 'N° de lot' | trad }}</th>
								<th>{{ 'Prix d\'entrée du lot' | trad }}</th>
								<th>{{ 'Date de péremption' | trad }}</th>
							</tr>
						</thead>
						<tbody>
							{% for batch in list %}
								<tr onclick='updateBatch("{{ post.divCode[6:] }}","{{ batch.NO_LOT }}");desactivePopup()'>
									<td>{{ batch.NO_LOT }}</td>
									<td>{{ batch.PRIX ~ batch.DEVISE }}</td>
									<td>{{ batch.DTE_PEREM | dateTrad }}</td>
								</tr>
							{% endfor %}
						</tbody>
					</table>
				</form>
				{{ paginations(path(path), infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}
			</div>
		</center>
	</div>

	<script>
		$("#modal-title").html('{{ titrePopup ? titrePopup : ('Erreur'|trad) }}');
        $("#modal-content").removeClass('modal_small');
        $("#modal-content").addClass('modal_large');
	</script>
{% endblock %}
