remito.html 12 KB
<div class="crear-nota-remito foca-crear row">
        <foca-cabecera-facturador 
        titulo="'Remito'"
        numero="puntoVenta + '-' + comprobante"
        fecha="now"
        class="mb-0 col-lg-12"
        busqueda="seleccionarRemito"
        ></foca-cabecera-facturador>
        <marquee
            bgcolor="#FF9900"
            behavior="scroll"
            direction="left"
            >{{remito.observaciones}}</marquee>
    <div class="col-lg-12">
        <div class="row mt-4">
            <div class="col-12 col-md-10 col-lg-10 border border-light rounded">
                <div class="row p-1 botonera-secundaria px-5 py-2">
                    <div class="col-12">
                        <foca-botonera-facturador botones="botonera" extra="4" class="row"></foca-botonera-facturador>
                    </div>
                </div>
                <!-- 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 remito.articulosRemito"
                                ng-show="show || key == (remito.articulosRemito.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="articulo.cantidad"
                                        class="form-control"
                                        foca-tipo-input
                                        min="1"
                                        foca-focus="articulo.editCantidad"
                                        ng-keypress="editarArticulo($event.keyCode, articulo)"
                                        ng-focus="selectFocus($event)"
                                        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">
                                    <input
                                        ng-show="articulo.editPrecio"
                                        ng-model="articulo.precio"
                                        class="form-control"
                                        foca-tipo-input
                                        min="1"
                                        step="0.0001"
                                        foca-focus="articulo.editPrecio"
                                        ng-keypress="editarArticulo($event.keyCode, articulo)"
                                        ng-focus="selectFocus($event)"
                                        teclado-virtual
                                    >
                                    <i
                                        class="selectable"
                                        ng-click="cambioEdit(articulo, 'precio')"
                                        ng-hide="articulo.editPrecio"
                                        ng-bind="articulo.precio | number: 4">
                                    </i>
                                </td>
                                <td
                                    class="col text-right"
                                    ng-bind="(articulo.precio * articulo.cantidad) | number: 2">
                                </td>
                                <td class="text-center">
                                    <button
                                        class="btn btn-outline-light"
                                        ng-click="quitarArticulo(key)"
                                    >
                                        <i class="fa fa-trash"></i>
                                    </button>
                                    <button
                                        class="btn btn-outline-light"
                                        ng-click="editarArticulo(13, articulo)"
                                        ng-show="articulo.editCantidad || articulo.editPrecio"
                                    >
                                        <i class="fa fa-save"></i>
                                    </button>
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr ng-show="!cargando" class="d-flex">
                                <td 
                                    class="align-middle" 
                                    ng-bind="remito.articulosRemito.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>
                                <td class="text-center align-middle">
                                    <button
                                        class="btn btn-outline-light"
                                        ng-click="agregarATabla(13)"
                                    >
                                        <i class="fa fa-save"></i>
                                    </button>
                                </td>
                            </tr>

                            <tr class="d-flex">
                                <td colspan="4" class="no-border-top">
                                    <strong>Items:</strong>
                                    <a ng-bind="remito.articulosRemito.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: remito.cotizacion.moneda.SIMBOLO}}</h3>
                                </td>
                                <td class="text-right no-border-top">
                                    <button
                                        type="button"
                                        class="btn btn-default btn-sm"
                                    >
                                        Totales
                                    </button>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row d-md-none fixed-bottom">
        <div class="w-100 bg-dark d-flex px-3 acciones-mobile">
            <span class="ml-3 text-muted" ng-click="salir()">Salir</span>
            <span
                class="mr-3 ml-auto"
                ng-class="saveLoading ? 'text-muted' : ''"
                ng-click="crearRemito()"
                ladda="saveLoading"
                data-style="expand-left"
            >Guardar</span>
        </div>
    </div>
</div>