modal-cotizacion.html 3.32 KB
<div class="modal-header py-1">
    <div class="row">
        <h5 class="modal-title">Seleccione Cotización <span ng-bind="moneda.SIMBOLO"></span></h5>
        <button 
            class="btn btn-sm btn-primary ml-auto"
            ng-click="obtenerCotizacion()"
            ng-hide="moneda.CODIGO_AFIP == 'PES'"
            ladda="obteniendoCotizacion">Obtener cotización</button>
    </div>
</div>
<div class="modal-body" id="modal-body">
    <div class="input-group">
        <table class="table table-striped table-sm">
            <thead>
                <tr>
                    <th>Fecha</th>
                    <th class="text-right">Compra</th>
                    <th class="text-right">Venta</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <tr
                    class="selectable"
                    ng-repeat="(key,cotizacion) in currentPageCotizacion"
                    ng-click="select(cotizacion)"
                >
                    <td ng-bind="cotizacion.FECHA | date:'dd/MM/yyyy HH:mm': 'UTC-3'"></td>
                    <td ng-bind="cotizacion.COTIZACION | number: 2" class="text-right"></td>
                    <td ng-bind="cotizacion.VENDEDOR | number: 2" class="text-right"></td>
                    <td>
                        <button
                            type="button"
                            class="btn btn-xs p-1 float-right"
                            ng-class="{
                                'btn-secondary': selectedCotizacion != key,
                                'btn-primary': selectedCotizacion == key
                            }"
                            foca-focus="selectedCotizacion == {{key}}"
                            ng-keydown="itemProducto($event.keyCode)"
                        >
                            <i class="fa fa-circle-thin" aria-hidden="true"></i>
                        </button>
                    </td>
                </tr>
            </tbody>
        </table>
        
    </div>
</div>
<div class="modal-footer py-1">
    <nav class="mr-auto">
        <ul class="pagination pagination-sm justify-content-end mb-0">
            <li class="page-item" ng-class="{'disabled': currentPage == 1}">
                <a class="page-link" href="javascript:void()" ng-click="selectPage(currentPage - 1)">
                    <span aria-hidden="true">&laquo;</span>
                    <span class="sr-only">Anterior</span>
                </a>
            </li>
            <li
                class="page-item"
                ng-repeat="pagina in paginas"
                ng-class="{'active': pagina == currentPage}"
            >
                <a
                    class="page-link"
                    href="javascript:void()"
                    ng-click="selectPage(pagina)"
                    ng-bind="pagina"
                ></a>
            </li>
            <li class="page-item" ng-class="{'disabled': currentPage == lastPage}">
                <a class="page-link" href="javascript:void()" ng-click="selectPage(currentPage + 1)">
                    <span aria-hidden="true">&raquo;</span>
                    <span class="sr-only">Siguiente</span>
                </a>
            </li>
        </ul>
    </nav>
    <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button>
</div>