<?php 
session_start();
require_once ("../conexion.php");
require_once('../include/sesiones.php'); 

$pen_id=$_GET['id']; 


$banc=mysqli_query($con,"SELECT * from banco where empresa='$empresa' order by ban_nombre asc") or die(mysqli_error($con));
while ($banc1=mysqli_fetch_array($banc))
    {
        $ban_id=$banc1["ban_id"];        
        $ban_nombre=$banc1["ban_nombre"];
        include('totales_bancos.php');
    ?>
         <input type="hidden" name="banco" id="banco" value="<?php echo $ban_nombre;?>">
        <div class="col-md-6">
            <pre style="font-size:18px;text-align:center;font-family: sans-serif;"><strong class="text-info"><?php echo $ban_nombre; ?></strong></pre>
        </div>
        <div class="col-md-5">
            <pre style="font-size:18px;text-align:center;font-family: sans-serif;"><strong class="text-danger">$<?php echo number_format($total_medio_pago,0); ?></strong></pre>
        </div>
         <div class="col-md-1">
            <a data-id="<?php echo $ban_nombre?>" href="#" class="btn btn-detalle btn-xs btn-default"><i class="btn-icon-only icon-eye-open"></i></a> 
        </div>

<?php   }   ?>

        <div class="col-md-6" style="padding-left:0px">
            <pre style="font-size:18px;text-align:center;font-family: sans-serif;"><strong class="text-success">Efectivo</strong></pre>
        </div>
        <div class="col-md-5" style="padding-right:0px">
            <pre style="font-size:18px;text-align:center;font-family: sans-serif;"><strong class="text-danger">$<?php echo number_format($total_efectivo+0,0); ?></strong></pre>
        </div>
        <div class="col-md-1">
            <a data-id="<?php echo $pen_id;?>" href="#" class="btn btn-detalle_efe btn-xs btn-default"><i class="btn-icon-only icon-eye-open"></i></a> 
        </div>

        <br>
        <div class="col-md-6" style="padding-left:0px">
            <pre style="font-size:18px;text-align:center;font-family: sans-serif;"><strong class="text-black">TOTAL ABONOS</strong></pre>
        </div>
        <div class="col-md-6" style="padding-right:0px">
            <pre style="font-size:18px;text-align:center;font-family: sans-serif;"><strong class="text-black">$<?php echo number_format($total_suma+0,0); ?></strong></pre>
        </div>

        

<script type="text/javascript">

 $(".btn-detalle").click(function(){
       var pen_id='<?php echo $pen_id; ?>';  
        banco = $(this).data("id");
        $.get("./php_pedidos/tabla_detalle_abono.php?banco="+banco,"pen_id="+pen_id,function(data){
            $("#detalle").html(data);
        });
        $('#tabla_detalle').modal('show');
    });

  $(".btn-detalle_efe").click(function(){
        pen_id = $(this).data("id");
        $.get("./php_pedidos/tabla_detalle_abono_efec.php?pen_id="+pen_id,function(data){
            $("#detalle").html(data);
        });
        $('#tabla_detalle').modal('show');
    });
</script>