hoja-ruta.html 11.7 KB
<div class="crear-hoja-ruta foca-crear row">
    <foca-cabecera-facturador 
    titulo="'Hoja de ruta'"
    numero="puntoVenta + '-' + comprobante"
    fecha="now"
    class="mb-0 col-lg-12"
    ></foca-cabecera-facturador>
    <div class="col-lg-12">
        <div class="row mt-4">
            <div class="col-12 col-md-10 border border-light rounded">
                <div class="row px-5 py-2 botonera-secundaria">
                    <div class="col">
                        <foca-botonera-facturador botones="botoneraPrincipal" max="botoneraPrincipal.length" class="row"></foca-botonera-facturador>
                    </div>
                </div>
            </div>
        </div>
        <div class="row mt-2">
            <div class="col-12 col-md-10 border border-light rounded">
                <div class="row px-5 py-2 botonera-secundaria">
                    <div class="col">
                        <foca-botonera-facturador botones="botonera" max="botonera.length" class="row"></foca-botonera-facturador>
                    </div>
                </div>
                <div class="row">
                    <div class="col">
                    <!-- PC -->
                        <div class="row grilla-articulo align-items-end d-none d-sm-flex">
                            <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom">
                                <thead>
                                    <tr class="d-flex">
                                        <th class="">#</th>
                                        <th class="col">Código</th>
                                        <th class="col-4">Descripción</th>
                                        <th class="col text-right">Cantidad</th>
                                        <th class="col text-right">Precio Unitario</th>
                                        <th class="col text-right">SubTotal</th>
                                        <th class="text-right">
                                            <button
                                                class="btn btn-outline-light selectable"
                                                ng-click="show = !show; masMenos()"
                                            >
                                                <i
                                                    class="fa fa-chevron-down"
                                                    ng-show="show"
                                                    aria-hidden="true"
                                                >
                                                </i>
                                                <i
                                                    class="fa fa-chevron-up"
                                                    ng-hide="show"
                                                    aria-hidden="true">
                                                </i>
                                            </button>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody class="tabla-articulo-body">
                                    <tr
                                        ng-repeat="(key, articulo) in articulos"
                                        ng-show="show || key == (articulos.length - 1)"
                                        class="d-flex"
                                    >
                                        <td ng-bind="key + 1"></td>
                                        <td 
                                            class="col" 
                                            ng-bind="articulo.sector + '-' + articulo.codigo"
                                        ></td>
                                        <td
                                            class="col-4"
                                            ng-bind="articulo.descripcion"
                                        ></td>
                                        <td class="col text-right">
                                            <input
                                                ng-show="articulo.editCantidad"
                                                ng-model="tmpCantidad"
                                                class="form-control"
                                                foca-tipo-input
                                                min="1"
                                                foca-focus="articulo.editCantidad"
                                                ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio);"
                                                esc-key="cancelarEditar(articulo)"
                                                ng-focus="selectFocus($event);
                                                        tmpCantidad = articulo.cantidad;
                                                        tmpPrecio = 0"
                                                teclado-virtual
                                            >
                                            <i
                                                class="selectable"
                                                ng-click="cambioEdit(articulo, 'cantidad')"
                                                ng-hide="articulo.editCantidad"
                                                ng-bind="articulo.cantidad">
                                            </i>
                                        </td>
                                        <td class="col text-right">
                                            <i
                                                class="selectable"
                                                ng-bind="0 | number: 4">
                                            </i>
                                        </td>
                                        <td
                                            class="col text-right"
                                            ng-bind="0 | number: 2">
                                        </td>
                                        <td class="text-center">
                                            <button
                                                class="btn btn-outline-light"
                                                ng-click="quitarArticulo(key, articulo)"
                                            >
                                                <i class="fa fa-trash"></i>
                                            </button>
                                        </td>
                                    </tr>
                                </tbody>
                                <tfoot>
                                    <tr ng-show="!cargando" class="d-flex">
                                        <td 
                                            class="align-middle" 
                                            ng-bind="articulosFiltro.length + 1"
                                        ></td>
                                        <td class="col">
                                            <input
                                                class="form-control"
                                                ng-model="articuloACargar.sectorCodigo"
                                                readonly
                                            >
                                        </td>
                                        <td class="col-4 tabla-articulo-descripcion">
                                            <input
                                                class="form-control"
                                                ng-model="articuloACargar.descripcion"
                                                readonly
                                            >
                                        </td>
                                        <td class="col text-right">
                                            <input
                                                class="form-control"
                                                foca-tipo-input
                                                min="1"
                                                ng-model="articuloACargar.cantidad"
                                                foca-focus="!cargando"
                                                esc-key="resetFilter()"
                                                ng-keypress="agregarATabla($event.keyCode)"
                                                teclado-virtual
                                            >
                                        </td>
                                        <td class="col text-right">
                                            <input
                                                class="form-control"
                                                ng-model="articuloACargar.precio"
                                                ng-show="idLista != -1"
                                                ng-keypress="agregarATabla($event.keyCode)"
                                            >
                                            <input
                                                class="form-control"
                                                foca-tipo-input
                                                step="0.0001"
                                                ng-model="articuloACargar.precio"
                                                esc-key="resetFilter()"
                                                ng-keypress="agregarATabla($event.keyCode)"
                                                ng-show="idLista == -1"
                                                teclado-virtual
                                            >
                                        </td>
                                        <td class="col text-right">
                                            <input
                                                class="form-control"
                                                ng-value="getSubTotal() | number: 2"
                                                readonly
                                            >
                                        </td>
                                    </tr>
        
                                    <tr class="d-flex">
                                        <td colspan="4" class="no-border-top">
                                            <strong>Items:</strong>
                                            <a ng-bind="articulos.length"></a>
                                        </td>
                                        <td class="text-right ml-auto table-celda-total no-border-top">
                                            <h3>Total:</h3>
                                        </td>
                                        <td class="table-celda-total text-right no-border-top" colspan="1">
                                            <h3>{{getTotal() | currency: hojaRuta.cotizacion.moneda.SIMBOLO}}</h3>
                                        </td>
                                        <td class="text-right no-border-top">
                                            <button
                                                type="button"
                                                class="btn btn-sm"
                                            >
                                                Totales
                                            </button>
                                        </td>
                                    </tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>