<div id="verdetalle<?php echo $reg['pen_id']; ?>" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog  modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title">Detalle de Venta</h4>
            </div>
            <div class="modal-body">
                <div class="col-md-12">
                    <div class="table-responsive">
                    <strong><h2>N°<?php echo $reg['pen_n']; ?></h2></strong>
                        <div class="table-responsive">
                            <table class="table table-striped table-bordered" style="font-size: 9pt;">
                                <tr>
                                    <th width="7%">CANT.</th>
                                    <th><span class="pull-center">DESCRIPCION</span></th>
                                    <th width="10%"><span class="pull-right">ESTADO</span></th>
                                    <th width="10%"><span class="pull-right">PRECIO U</span></th>
                                    <th width="5%"><span class="pull-right">DESC_%</span></th>
                                    <th width="10%"><span class="pull-right">TOTAL</span></th>
                                </tr>
                                <?php
                                $neto=0;
                                $descuentof=0;
                                $sumador_total=0;
                                $sql=mysqli_query($con, "SELECT * from  pedido_detalle where pedido_pen_id='$pen_id' ");
                                while ($row=mysqli_fetch_array($sql))
                                {
                                    $id=$row["pend_id"];
                                    $pend_id=$row["pend_id"];
                                    $pend_art_id=$row["pend_art_id"];
                                    $pend_cantidad=$row['pend_cantidad'];
                                    $pend_precio=$row['pend_precio'];
                                    $descuento=$row['pend_descuento'];
                                    $pend_nombre=$row['pend_nombre'];

                                    $precio_total=$pend_precio*$pend_cantidad;
                                    $sumador_total+=$precio_total;//Sumador
                                    ?>
                                    <tr>
                                        <td><?php echo $pend_cantidad;?></td>
                                        <td><?php echo $pend_nombre;
                                            echo '(';
                                            $art=mysqli_query($con,"SELECT * FROM sabores_pedido_temp WHERE pend_id='$pend_id'")or die(mysqli_error($con));
                                            while ($row1=mysqli_fetch_array($art))
                                              {
                                                echo '-'; 
                                                echo $row1['sabor'];
                                                echo '-'; 
                                              }
                                            echo ')'; 
                                            ?>
                                        </td>
                                         <td><span class="pull-right"><?php echo $row['pend_estado'];;?></span></td>
                                        <td><span class="pull-right"><?php echo number_format($pend_precio,0);?></span></td>
                                        <td><span class="pull-right"><?php echo number_format($descuento,0);?></span></td>
                                        <td><span class="pull-right"><?php echo number_format($precio_total,0);?></span></td>
                                    </tr>   
                                <?php }
                                    $descuento_combo_total=0;
                                    $neto_combo=0;
                                    $sumador_combo=0;
                                    $sql2=mysqli_query($con, "SELECT * from  pedido_detalle_combo where pedido_pen_id='$pen_id'");
                                    while ($row2=mysqli_fetch_array($sql2))
                                    {
                                        $pedcom_id=$row2['pedcom_id'];
                                        $combo_id=$row2['combo_id'];
                                        $precio=($row2['pedcom_cantidad']*$row2['pedcom_precio']);
                                    ?>
                                    <tr>
                                        <td><?php echo $row2['pedcom_cantidad'];?></td>
                                        <td><?php echo $row2['pedcom_nombre'];
                                                  echo '(';
                                                  $art=mysqli_query($con,"SELECT * FROM sabores_pedido_combos_temp WHERE pedcom_id='$pedcom_id' ")or die(mysqli_error($con));
                                                  while ($row1=mysqli_fetch_array($art))
                                                      {
                                                        echo '-'; 
                                                        echo $row1['sabor'];
                                                        echo '-'; 
                                                      }
                                                  echo ')'; 
                                            ?>
                                        </td>
                                          <td><span class="pull-right"><?php echo $row2['pend_estado'];;?></span></td>
                                        <td><span class="pull-right"><?php echo number_format($row2['pedcom_precio'],0);?></span></td>
                                        <td><span class="pull-right"><?php echo $row2['pend_desc'];?></span></td>
                                        <td><span class="pull-right"><?php echo number_format($precio,0);?></span></td>
                                    </tr> 
                        <?php } ?>
                                <tr>
                                    
                                    <td colspan="5"><span class="pull-right">TOTAL</span></td>
                                    <td><span class="pull-right">$ <?php echo number_format($sumador_total+$sumador_combo,0);?></span></td>
                                </tr>
                            </table>
                    </div> <!-- /.form-group -->
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div> 
    </div>
</div>