templates/admin/invoice/list.html.twig line 1

Open in your IDE?
  1. {% extends "admin/home/base.html.twig" %}
  2. {% block content %}
  3.                         <!-- start page title -->
  4.                         <div class="row">
  5.                             <div class="col-12">
  6.                                 <div class="page-title-box">
  7.                                     <div class="page-title-right">
  8.                                         <a class="btn btn-primary" href="{{ path('invoice_new') }}"><i class="mdi mdi-plus mr-1"></i> Agregar</a>
  9.                                     </div>
  10.                                     <h4 class="page-title">Facturas</h4>
  11.                                 </div>
  12.                             </div>
  13.                         </div>     
  14.                         <!-- end page title -->
  15.                         <div class="row">
  16.                             <div class="col-lg-12">
  17.                                 <div class="card-box">
  18.                                     <div class="table-responsive">
  19.                                         <table class="table table-striped mb-0">
  20.                                             <thead>
  21.                                                 <tr>
  22.                                                     <th>#</th>
  23.                                                     <th>Factura</th>
  24.                                                     <th>Cliente</th>
  25.                                                     <th>Bill / Guía / Carta Porte</th>
  26.                                                     <th>Total</th>
  27.                                                     <th>Estado</th>
  28.                                                     <th>Acciones</th>
  29.                                                 </tr>
  30.                                             </thead>
  31.                                             <tbody>
  32.                                                 {% for invoice in pagination %}
  33.                                                     <tr>
  34.                                                         <th scope="row">{{ loop.index }}</th>
  35.                                                         <td>{{ invoice.number }}</td>
  36.                                                         <td>
  37.                                                             {% if invoice.Customer.id %}
  38.                                                             <strong>{{ invoice.Customer.businessName }}</strong>
  39.                                                             <p class="small">{{ invoice.Customer.firstname }} {{ invoice.Customer.lastname }}</p>
  40.                                                             {% endif %}
  41.                                                         </td>
  42.                                                         <td>{{ invoice.guideNumber }}</td>
  43.                                                         <td>{{ invoice.total|number_format(2, '.', ',') }}</td>
  44.                                                         <td>
  45.                                                             {% if invoice.paid %}
  46.                                                             <span class="badge badge-success">Pagada</span>
  47.                                                             {% else %}
  48.                                                             <span class="badge badge-danger">Pendiente</span>
  49.                                                             {% endif %}
  50.                                                         </td>
  51.                                                         <td>
  52.                                                             <div class="btn-group">
  53.                                                                 <a class="btn btn-primary" href="{{ path('invoice_edit', {invoice_id: invoice.id}) }}"><i class="mdi mdi-lead-pencil mr-1"></i> Editar</a>
  54.                                                                 <a class="btn btn-primary" href="{{ path('invoice_print', {invoice_id: invoice.id}) }}" target="_blank"><i class="mdi mdi-printer mr-1"></i> Imprimir</a>                                                            
  55.                                                                 <a class="btn btn-warning" href="{{ path('invoice_delete', {invoice_id: invoice.id}) }}" onclick="return confirm('Confirmar eliminar: Factura #{{ invoice.number }}')"><i class="mdi mdi-delete mr-1"></i> Eliminar</a>
  56.                                                             </div>
  57.                                                             <!--<div class="btn-group">
  58.                                                                 <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  59.                                                                 <i class="mdi mdi-truck mr-1"></i> Inventario <i class="mdi mdi-chevron-down"></i>
  60.                                                                 </button>
  61.                                                                 <div class="dropdown-menu">
  62.                                                                     <a class="dropdown-item" href="{{ path('inventory_in_new', {invoice_id: invoice.id}) }}">Entrada</a>
  63.                                                                 </div>
  64.                                                             </div>-->
  65.                                                             <div class="btn-group">
  66.                                                                 <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  67.                                                                 <i class="mdi mdi-bank mr-1"></i> Pago <i class="mdi mdi-chevron-down"></i>
  68.                                                                 </button>
  69.                                                                 <div class="dropdown-menu">
  70.                                                                     {% if invoice.paid %}
  71.                                                                     <a class="dropdown-item" href="{{ path('invoice_unpaid', {invoice_id: invoice.id}) }}" onclick="return confirm('Confirmar eliminar pago de: Factura #{{ invoice.number }}')">Eliminar Pago</a>
  72.                                                                     {% else %}
  73.                                                                     <a class="dropdown-item" href="{{ path('invoice_paid', {invoice_id: invoice.id}) }}" onclick="return confirm('Confirmar pago de: Factura #{{ invoice.number }}')">Confirmar Pagada</a>
  74.                                                                     {% endif %}
  75.                                                                 </div>
  76.                                                             </div>
  77.                                                     </tr>
  78.                                                 {% endfor %}
  79.                                             </tbody>
  80.                                             <tfoot>
  81.                                                 <td colspan="4">
  82.                                                     {{ knp_pagination_render(pagination) }}
  83.                                                 </td>
  84.                                                 <td colspan="3">
  85.                                                     <p class="text-right">{{ pagination.getPaginationData.current }} / {{ pagination.getPaginationData.last }} - {{ pagination.getTotalItemCount }} resultados</p>
  86.                                                 </td>
  87.                                             </tfoot>
  88.                                         </table>
  89.                                     </div> <!-- end table-responsive-->
  90.         
  91.                                 </div> <!-- end card-box -->
  92.                             </div> <!-- end col -->
  93.                         </div>
  94.                         <!-- end row -->
  95. {% endblock %}