<div id="historial<?php echo $reg['vena_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 de Abonos</h4>
            </div>
            <div class="modal-body">
                <table class="table table-bordered table-hover table-striped">
                    <thead>
                        <tr>
                            <th>FECHA</th>
                            <th>ABONO</th>
                            <th width="1px"></th>
                        </tr>
                    </thead>
                        <?php
                            $sqlh=mysqli_query($con,"SELECT * from venta_apartada_abonos where ventas_apartadas_vena_id='$vena_id' and veaa_abono<>0");
                            while ($rowh=mysqli_fetch_array($sqlh))
                            {
                        ?>
                        <tr>
                            <td><?php echo $rowh['veaa_fecha']; ?></td>
                            <td><span class="pull-right"><?php echo number_format($rowh['veaa_abono'],0); ?></span></td>
                            <td>
                                <?php if($fac_tamano=='Carta'){ ?>
                                    <a href="libraries/tcpdf/documentos/recibos_de_pago.php?mov_id=<?php echo $rowh['mov_id'];?>" target="_blank" title="Imprimir Abono" class="btn btn-success btn-xs"> <i class="btn-icon-only icon-print"></i> </a>
                                <?php } else {?>
                                    <a href="tirillas/tirilla_movimientos.php?mov_id=<?php echo $rowh['mov_id']; ?>" class="btn btn-success btn-xs" target="_blank" title="Imprimir"><i class="btn-icon-only icon-print"></i></a>
                                <?php } ?>
                            </td>
                        </tr>
                        <?php } ?>
                         <tr>
                            <td ><span class="pull-right">TOTAL A PAGAR $</span></td>
                            <td><span class="pull-right"><strong><?php echo number_format($sumador_articulos,0);?></strong></span></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td><span class="pull-right">TOTAL ABONO $</span></td>
                            <td><span class="pull-right"><strong><?php echo number_format($abono,0); ?></strong></span></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td ><span class="pull-right">SALDO $</span></td>
                            <td><span class="pull-right" color="red"><strong><?php echo number_format($sumador_articulos-$abono,0); ?></strong></span></td>
                            <td></td>
                        </tr>
                       
                </table>
                <div class="modal-footer">
                <?php if($fac_tamano=='Carta'){ ?>
                    <a href="libraries/tcpdf/documentos/apartado5.php?vena_id=<?php echo $vena_id;?>" target="_blank" title="Imprimir Abono" class="btn btn-success"> <i class="btn-icon-only icon-print"></i> Imprimir </a>
                <?php  } else {?>
                    <a href="tirillas/recivo_abono_apart.php?vena_id=<?php echo $vena_id;?>" target="_blank" class="btn btn-success"><span class="btn-icon-only icon-print"> </span>Imprimir Abonos</a>
                <?php } ?>
                    <button type="button" class="btn  btn-default" data-dismiss="modal">Cancelar</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div> 
</div>