{% extends 'navbar.html.twig' %}
{% block title %}Informe Ordenes Compra{% endblock %}
{% block content_user %}
<h5>Informe Ingreso Articulos</h5>
{{ form_start(form, { 'attr' : { 'novalidate' : 'novalidate', 'class' : 'form-diag' }}) }}
<div class="card">
<div class="card-body">
<div class="form-row">
<div class="col-lg-3">
{{ form_label(form.fechaDesde) }}
{{ form_widget(form.fechaDesde, { 'attr' : { 'class' : 'form-control inherit'} }) }}
{{ form_errors(form.fechaDesde) }}
</div>
<div class="col-lg-3">
{{ form_label(form.fechaHasta) }}
{{ form_widget(form.fechaHasta, { 'attr' : { 'class' : 'form-control inherit'} }) }}
{{ form_errors(form.fechaHasta) }}
</div>
<div class="col-lg-4">
{{ form_label(form.deposito) }}
{{ form_widget(form.deposito, { 'attr' : { 'class' : 'form-control form-select inherit'} }) }}
{{ form_errors(form.deposito) }}
</div>
<div class="col-lg-2 pt-4">
<button type="submit" class="btn btn-primary mt-4">Buscar</button>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% if articulos is defined %}
<br>
<div class="d-flex justify-content-between align-items-center">
<div>
</div>
<a href="{{ urlExcel }}" class="btn btn-success btn-sm">Exportar a Excel</a>
</div>
<table id="example" class="table table-striped table-bordered table-hover mt-3">
<thead>
<tr>
<th>Numero</th>
<th>Fecha OC</th>
<th>Fecha Recepcion</th>
<th>Proveedor</th>
<th>Articulo</th>
<th>Cantidad Ingresada</th>
<th>Insumo Calidad</th>
<th>Producto Calidad</th>
<th>Tipo Calidad</th>
<th>Descripcion Calidad</th>
</tr>
</thead>
<tbody>
{% for articulo in articulos %}
<tr>
<td>{{ "%06d"|format(articulo.numero) }}</td>
<td>{{ articulo.fecha ? articulo.fecha|date('d/m/Y') : '' }}</td>
<td>{{ articulo.fechaRecepcion ? articulo.fechaRecepcion|date('d/m/Y') : '' }}</td>
<td>{{ articulo.proveedor|upper }}</td>
<td>{{ articulo.articulo }}</td>
<td class="text-right">{{ articulo.cantidad }}</td>
<td>{{ articulo.insumoCalidad }}</td>
<td>{{ articulo.productoCalidad }}</td>
<td>{{ articulo.tipoCalidad }}</td>
<td>{{ articulo.descripcionCalidad }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% block javascripts_footer %}
{{ parent() }}
<script type="text/javascript">
$(document).ready(function() {
$('#example').DataTable({
fixedHeader: true,
paging: true,
responsive: true,
order: [[ 0, 'desc' ]],
language: {
url: '{{ asset('i18n/spanish.json') }}'
}
});
});
</script>
{% endblock %}