templates/bundles/AccesoBundle/ordenes/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Ordenes index{% endblock %}
  3. {% block body %}
  4.    <div class="row">
  5.     <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
  6.         <h4>Ordenes de Servicio Registradas</h4> 
  7.     </div>
  8.         <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
  9.              {% if maxPages > 1 %}
  10.         <nav aria-label="Page navigation" class="text-right">
  11.   
  12.     <ul class="pagination">
  13.                   <li>
  14.                  <span class="label label-primary">Pagina ({{thisPage}}) de {{maxPages}}
  15.                  </span>
  16.             
  17.         </li>
  18.         {%if thisPage > 1 %}
  19.             <li >
  20.                 <a aria-label="Previous" href="{{ path('ordenes_index', {currentPage: thisPage-1 < 1 ? 1 : thisPage-1}) }}">
  21.                     <i class="glyphicon glyphicon-chevron-left"></i>
  22.                 </a>
  23.             </li>
  24.         {% endif %}
  25.     
  26.         {# `»` arrow #}
  27.         {%if thisPage < maxPages %}
  28.             <li>
  29.                 <a aria-hidden="true" href="{{ path('ordenes_index', {currentPage: thisPage+1 <= maxPages ? thisPage+1 : thisPage}) }}">
  30.                      <i class="glyphicon glyphicon-chevron-right"></i>
  31.                 </a>
  32.             </li>
  33.         {% endif %}
  34.     </ul>
  35.                 </nav>
  36. {% endif %}
  37.         </div>
  38. </div>
  39.    <form name="formfiltros" method="POST" action="{{ path('ordenes_index', {currentPage:1}) }}">
  40.     <div class="row" style="margin-top: 5px">
  41.         <div class="col-md-12 text-left">
  42.         <label  class="col-md-1 control-label"> N° Orden:</label>
  43.         <div class="col-md-2">
  44.             <input type="text" name="norden" value="{{ norden }}" class="form-control">
  45.             </div>
  46.              <label  class="col-md-2 control-label"> N° Contrato:</label>
  47.         <div class="col-md-2">
  48.             <input type="text" name="ncontrato" value="{{ ncontrato }}" class="form-control">
  49.             </div>
  50.                     <label  class="col-md-1 control-label"> Cliente:</label>
  51.                         <div class="col-sm-1">
  52.             <select class="form-control" name="tipoid">
  53.                 <option value="">-</option>
  54.                 <option value="V" {% if tipoid=='V'%} selected="selected" {% endif%} >V</option>
  55.                 <option value="E" {% if tipoid=='E'%} selected="selected" {% endif%} >E</option>
  56.                 <option value="M" {% if tipoid=='M'%} selected="selected" {% endif%} >M</option>
  57.             </select>
  58.         </div>
  59.         <div class="col-md-2">
  60.             <input type="text" name="numid" value="{{ numid }}" class="form-control">
  61.             </div>
  62.               <div class="col-md-1">
  63.                    
  64.             </div>
  65.           
  66.         </div>
  67.             </div>
  68.             <div class="row" style="margin-top: 5px">
  69.         <div class="col-md-12 text-left">
  70.               <div class="col-md-10 text-right">
  71.                    <input type="submit" class="btn btn-xs btn-primary"  value="Consultar"/>
  72.             </div>
  73.                 <div class="col-md-1">
  74.                    <a href="{{ path('ordenes_index', {currentPage:1}) }}" class="btn btn-xs btn-default" >Limpiar Filtros</a>
  75.             </div>
  76.               <div class="col-md-1">
  77.                    <a target="_black" href="{{ path('ordenes_generarexcel') }}"  type="button" class="btn btn-xs btn-primary" >Generar Excel</a>
  78.             </div>
  79.             
  80.              </div>
  81.             </div>
  82.             </form>
  83.         <br>
  84.     <p class="alert-info text-right"><strong> Cantidad de registros que retornó la consulta: ({{ ordenes|length }})</strong></p>
  85.     <div class="table-responsive">
  86.         <table class="table table-bordered table-condensed table-hover">
  87.         <thead>
  88.             <tr class="active">
  89.                 <th>N° Orden</th>
  90.                 <th>Afiliado</th>
  91.                 <th>Contrato</th>
  92.                 <th>Certificado</th>
  93.                 <th>Servicio</th>
  94.                 <th>Fecha Emisión</th>
  95.                 <th>Estatus</th>
  96.                 <th>Monto Autorizado</th>
  97.                 <th>Monto $ </th>
  98.                 <th>actions</th>
  99.             </tr>
  100.         </thead>
  101.         <tbody>
  102.         {% for ordene in ordenes %}
  103.               {% set class='' %}
  104.             {% if ordene.estatusordenes == 'Anulada' or ordene.estatusordenes == 'Rechazada' %}
  105.                 {% set class='danger' %}
  106.             {% endif %}
  107.             <tr class="{{class}}">
  108.                 <td>{{ ordene.id }}
  109. {% if ordene.contratos.vip=='1' %} 
  110.             <i class="glyphicon glyphicon-king"></i> 
  111.             {% endif %} 
  112.                     </td>
  113.                 <td>{{ ordene.Clientes }}</td>
  114.                 <td>{{ ordene.contratos }}</td>
  115.                 <td>{{ ordene.certificados }}</td>
  116.                 <td>{{ ordene.tiposervicios }}</td>
  117.                 <td>{{ ordene.fechaservicio ? ordene.fechaservicio|date('d-m-Y') : '' }}</td>
  118.                 <td>{{ ordene.estatusordenes }} </td>
  119.                 <td class="text-right">{{ ordene.montoautorizado|number_format(2, ',', '.') }}</td>
  120. <td class="text-right">{{ ordene.tasacambio==0 ? 0 : (ordene.montoautorizado/ordene.tasacambio)|number_format(2, ',', '.') }}</td>
  121.                 <td>
  122.                         <a href="{{ path('ordenes_show', { 'id': ordene.id }) }}"><i class="glyphicon glyphicon-eye-open"></i></a> |
  123.                         <a href="{{ path('ordenes_edit', { 'id': ordene.id }) }}"><i class="glyphicon glyphicon-edit"></i></a>
  124.                 </td>
  125.             </tr>
  126.         {% else %}
  127.             <tr>
  128.                 <td colspan="6">no records found</td>
  129.             </tr>
  130.         {% endfor %}
  131.         </tbody>
  132.     </table>
  133.         </div>
  134.       <p class="text-right">
  135.         <a href="{{ path('ordenes_new') }}" class="btn btn-large btn-primary">
  136.                 Registrar nueva Orden
  137.         </a>
  138.     </p>
  139. {% endblock %}