<div class="table-responsive">
    <table class="table table-striped table-bordered">
        <thead>
            <tr>
                <th width="10%">FACT Nº</th>
                <th>FECHA</th>
                <th>VENDEDOR</th>
                <th>NETO</th>
                <th>DESCUENTO</th>
                <th>TOTAL</th>
                <th width="2%"></th>
            </tr>
        </thead>
        <tbody  class="buscar"> 
        <?php 
            $clie_id=$_GET['clie_id'];
            $registros=mysqli_query($con,"SELECT * from ventas where Cliente_clie_id='$clie_id' and ven_estado='pagada' order by ven_n_venta desc") or die(mysqli_error($con));
            while ($reg=mysqli_fetch_array($registros))
            {  
                $ven_id=$reg['ven_id'];
                $ven_n_venta=$reg['ven_n_venta'];
                $ven_fecha=$reg['ven_fecha'];
                $usuario=$reg['vendedor'];

                $sumador_combo=0;
                $sumador_total=0;

                $neto=0;
                $total_descuento=0;
                $total_iva=0;
                $total_retencion=0;
                $sumador_articulos=0;

                $ret=mysqli_query($con, "SELECT * FROM retencion_venta where ventas_ven_id='$ven_id' ") or die(mysqli_error($con)); 
                $rets=mysqli_fetch_array($ret);
                $ret_porcentaje=!empty($rets['porcentaje']);

                include('include/total_venta.php');
                $total_retencion+=($neto+$sumador_combo-$total_descuento)*($ret_porcentaje/100);
                $sumador_total=$sumador_articulos+$sumador_combo-$total_retencion;
            ?>
              <tr>
                <td><?php echo $ven_n_venta; ?></td>
                <td><?php echo $ven_fecha; ?></td>
                <td>
                <?php  
                $sql_tar=mysqli_query($con, "SELECT * from usuario where usu_id='$usuario'");
                $bo=mysqli_fetch_array($sql_tar);
                echo $usu_n=$bo['usu_nombre'];?>
                </td>
                <td><p class="pull-right"><?php echo number_format($neto,0); ?></p></td>
                <td><p class="pull-right"><?php  echo number_format($total_descuento,0); ?></p></td>
                <td><p class="pull-right"><?php  echo number_format($sumador_total,0); ?></p></td>
                <td width="2%">
                  <?php include ('include/boton_venta2.php'); ?>
                </td>
            </tr>
            <?php } ?>
        </tbody>
    </table>
</div>