<?php include "Views/templates/header.php"; ?>
<?php if ($_SESSION['permisos']['agregar pago o abono']) { ?>
    <a class="btn btn-primary mb-2" href="<?php echo base_url; ?>creditoventas/registrar"><i class="fas fa-plus"></i></a>
<?php  }  ?>
<?php if ($_SESSION['permisos']['ver pago o abono']) { ?>
    <button type='button' class="btn btn-outline-warning mb-2 btn-toolbar-status" disabled onclick="open_link(base_url +'creditoventas/generarPdf/'+active_row)"><i class="fas fa-file-pdf"></i></button>
<?php } ?>
<?php if ($_SESSION['permisos']['anular pago o abono']) {?>
    <button class="btn btn-danger  mb-2 btn-toolbar-status" type="button" disabled onclick="rechaza_abono(active_row);"><i class="far fa-credit-card"></i></button>
<?php } ?>

<div class="card">

    <div class="card-header bg-success">

    LISTADO DE PAGOS Y ABONOS

    </div>

 

    <div class="card-body">

        <div class="row">

            <div class="col-md-4">

                <label for="">Desde</label>

                <input class="form-control" id="min" type="date" name="vabono_desde" placeholder="Selecciona Fecha Inicio">

            </div>

            <div class="col-md-4">

                <label for="">Hasta</label>

                <input class="form-control" id="max" type="date" name="vabono_hasta" placeholder="Selecciona Fecha Fin">

            </div>

            <div class="col-md-4">

                <div class="form-group">

                    <label for="my-input">Registros</label><br>

                    <button class="btn btn-outline-primary btn-block" type="button" name="historial_abonos" onclick="mostrarTodo(event)">Mostrar Todo</button>

                </div>

            </div>

        </div>

        <div class="table-responsive">

            <table class="table table-striped table-hover table-striped display responsive nowrap" id="t_abonos" style="width: 100%;">

                <thead>

                    <tr>
                        <th>Recibo</th>
                        <th>Número</th>
                        <th>Fecha</th>                        
                        <th>Valor</th>
                        <th>Cliente</th>
                        <th>Referencia</th>                        
                        <th>Tipo</th>                        
                        <th>Factura</th>                        
                        <th>Estado</th>                                                
                        <th>Observaciones</th>                                                

                    </tr>

                </thead>

                <tbody>

                </tbody>

                <tfoot>

                    <tr>

                        <td></td>
                        <td></td>

                        <td></td>

                        <td></td>                        

                        <td></td>

                        <td></td>                        

                        <td></td>

                        <td></td>

                        <td></td>

                        <td></td>                        

                    </tr>

                </tfoot>

            </table>

        </div>

    </div>

</div>



<?php include "Views/templates/footer.php"; ?>