<div id="abonos<?php echo $reg['ven_id']; ?>" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog ">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">Historial Abonos</h4>
            </div>
            <div class="modal-body">
                <div  class="col-md-12">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover table-striped">
                            <thead>
                                <tr>
                                    <th>FECHA</th>
                                    <th>ABONO</th>
                                </tr>
                            </thead>
                                <tbody  class="buscar">
                                <?php
                                    $sql=mysqli_query($con, "SELECT * from venta_abonos where ventas_ven_id='$ven_id' and veab_abono<>0 ");
                                    while ($row=mysqli_fetch_array($sql))
                                    {
                                ?>
                                <tr>
                                    <td><?php echo $row['veab_fecha']; ?></td>
                                    <td><span class="pull-right"><?php echo number_format($row['veab_abono'],0); ?></span></td>
                                    
                                </tr>
                                <?php } ?>
                                <tr>
                                    <td ><span class="pull-right">TOTAL ABONO $</span></td>
                                    <td><span class="pull-right"><strong><?php echo number_format($total_abono,0); ?></strong></span></td>
                                </tr>
                                 <tr>
                                    <td ><span class="pull-right">DEVOLUCIÓN $</span></td>
                                    <td><span class="pull-right"><strong><?php echo number_format($devo_total,0);?></strong></span></td>
                                </tr>
                                <tr>
                                    <td ><span class="pull-right">SALDO $</span></td>
                                    <td><span class="pull-right" color="red"><strong><?php echo number_format($saldo,0); ?></strong></span></td>
                                </tr>
                                </tbody> 
                        </table>
                    </div> <!-- /.form-group -->
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
                         <?php
                          if($fac_tamano=='Carta'){ 
                           ?>
                                <a href="libraries/pdf/pdf_recibos/historial_abono_venta.php?ven_id=<?php echo $reg['ven_id'];?>" target="_blank" class="btn btn-success"><span class="btn-icon-only icon-print"> Imprimir Abonos</span></a>
                            
                        <?php  } else {?>
                           <a href="tirillas/recivo_abono.php?ven_id=<?php echo $reg['ven_id'];?>" target="_blank"   class="btn btn-success" ><span class="btn-icon-only icon-print"> Imprimir Abonos</span></a>
                        <?php } ?>
                      
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div> 
    </div>
</div>
