<?php
$id_cliente = $_POST['id_cliente'];
if($id_cliente == '0'){ ?>
    <input type="hidden" id="vanombrede" value="">
    <input type="hidden" id="varucde" value="">
<?php 
}else{
    require '../../conexion.php';
    $conexion = conexion::con();
    $c = pg_fetch_all(pg_query($conexion, "SELECT * FROM v_clientes WHERE id_cliente = $id_cliente;"));?>
    <div class="form-group">
        <label>A nombre de</label>
        <input type="text" id="vanombrede" class="form-control" value="<?= $c[0]['cliente'];?>">
    </div>
    <div class="form-group">
        <label>RUC de</label>
        <input type="text" id="varucde" class="form-control" value="<?= $c[0]['per_ci'];?>">
    </div>
    <div class="form-group">
        <label>Delivery</label>
        <input type="checkbox" id="vcondely" name="vdelivery" class="form-control toggle" value="1" data-toggle="toggle" data-on="<i class='fa fa-check'></i> SI" data-off="<i class='fa fa-close'></i> NO" data-width="80" data-offstyle="danger">
    </div>    
<?php  } ?>
    <script type="text/javascript">
        
        $('.toggle').bootstrapToggle();
    </script>