{% extends 'base.html.twig' %}
{% block title %}Contratos index{% endblock %}
{% block body %}
<h4>Contratos Registrados</h4>
<legend></legend>
<form name="formfiltros" method="POST" action="{{ path('contratos_index') }}">
<div class="row" style="margin-top: 5px">
<div class="col-md-12 text-left">
<label class="col-md-2 control-label"> Cédula/RIF del Cliente:</label>
<div class="col-sm-1">
<select class="form-control" name="tipoid">
<option value="-">-</option>
<option value="V" {% if tipoid=='V'%} selected="selected" {% endif%} >V</option>
<option value="J" {% if tipoid=='J'%} selected="selected" {% endif%} >J</option>
</select>
</div>
<div class="col-md-2">
<input type="text" name="cedula" value="{{ cedula }}" class="form-control">
</div>
<label class="col-md-2 control-label"> N° del Contrato:</label>
<div class="col-md-2">
<input type="text" name="ncontrato" value="{{ ncontrato }}" class="form-control">
</div>
<div class="col-md-1">
<input type="submit" class="btn btn-xs btn-primary" value="Consultar">
</div>
<div class="col-md-1">
<a href="{{ path('contratos_index') }}" class="btn btn-xs btn-default" >Limpiar</a>
</div>
</div>
</div>
</form>
<br>
<p class="alert-info text-right"><strong> Cantidad de registros que retornó la consulta: ({{ contratos|length }})</strong></p>
<div class="table-responsive">
<table class="table table-bordered table-condensed table-hover">
<thead>
<tr class="active">
<th>N°</th>
<th>Tipo</th>
<th>Tipo facturación</th>
<th>Clientes</th>
<th>C.I/RIF</th>
<th>Fecha Registro</th>
<th>Estatus</th>
<th>Fecha Estatus</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for contrato in contratos %}
<tr>
<td>{{ contrato.id }}
{% if contrato.vip=='1' %}
<i class="glyphicon glyphicon-king"></i>
{% endif %}
</td>
<td>{{ contrato.tipocontrato }}</td>
<td>{{ contrato.tipofacturacion }}</td>
<td>{{ contrato.clientes }}</td>
<td>{{ contrato.tipoid }}-{{ contrato.numid }}</td>
<td>{{ contrato.fecharegistro ? contrato.fecharegistro|date('d-m-Y') : '' }}</td>
<td>{{ contrato.estatuscontratos }}</td>
<td>{{ contrato.fechaestatus ? contrato.fechaestatus|date('d-m-Y') : '' }}</td>
<td>
<a href="{{ path('contratos_show', { 'id': contrato.id }) }}"><i class="glyphicon glyphicon-eye-open"></i></a> |
<a href="{{ path('contratos_edit', { 'id': contrato.id }) }}"><i class="glyphicon glyphicon-edit"></i></a> |
<a href="{{ path('contratos_indicadores', { 'id': contrato.id }) }}"><i class="glyphicon glyphicon-dashboard"></i></a>
</td>
</tr>
{% else %}
<tr>
<td colspan="6">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<p class="text-right">
<a href="{{ path('contratos_new') }}" class="btn btn-large btn-primary">
Registrar nuevo Contrato
</a>
</p>
{% endblock %}