<?php
$id_fc = $_POST['id_fc'];
require '../../conexion.php';
$conexion = conexion::con();
?>
<?php if($id_fc == '1'){ ?>
<div class="form-group">
    <label>Monto</label>
    <input type="number" id="monto" class="form-control">
</div>
<button class="btn btn-danger" data-dismiss="modal"><i class="fa fa-ban"></i> Cerrar</button>
<button class="btn btn-success" onclick="agregar_forma(1,0,0);" ><i class="fa fa-save"></i> Grabar</button>
<?php } ?>
<?php if($id_fc == '2'){
    $entidad_emisora = pg_fetch_all(pg_query($conexion, "SELECT * FROM entidad_emisora;"));
    $marca_tarjetas = pg_fetch_all(pg_query($conexion, "SELECT * FROM marca_tarjetas;"));
    ?>
<div class="form-group">
    <label>Nro Tarjeta</label>
    <input type="number" id="nro_tarjeta" class="form-control">
</div>
<div class="form-group">
    <label>Entidad Emisora</label>
    <select class="form-control select2" id="id_ee">
        <?php foreach($entidad_emisora as $e){ ?>
            <option value="<?= $e['id_ee']; ?>"><?= $e['ee_nombre']; ?></option>
        <?php } ?>
    </select>
</div>
<div class="form-group">
    <label>Marca Tarjeta</label>
    <select class="form-control select2" id="id_mt">
        <?php foreach($marca_tarjetas as $m){ ?>
            <option value="<?= $m['id_mt']; ?>"><?= $m['mt_descri']; ?></option>
        <?php } ?>
    </select>
</div>
<div class="form-group">
    <label>Nro Cupón</label>
    <input type="number" id="nro_cupon" class="form-control">
</div>
<div class="form-group">
    <label>Tipo Tarjeta</label>
    <select class="form-control select2" id="tipo">
        <option value="CREDITO">CRÉDITO</option>
        <option value="DEBITO">DÉBITO</option>
    </select>
</div>
<div class="form-group">
    <label>Monto</label>
    <input type="number" id="monto" class="form-control">
</div>
<button class="btn btn-danger" data-dismiss="modal"><i class="fa fa-ban"></i> Cerrar</button>
<button class="btn btn-success" onclick="agregar_forma(2,0,0);" ><i class="fa fa-save"></i> Grabar</button>
<?php } ?>
<?php if($id_fc == '3'){
    $banco = pg_fetch_all(pg_query($conexion, "SELECT * FROM banco;"));
    ?>
<div class="form-group">
    <label>Banco</label>
    <select class="form-control select2" id="id_banco">
        <?php foreach($banco as $b){ ?>
            <option value="<?= $b['id_banco']; ?>"><?= $b['descripcion']; ?></option>
        <?php } ?>
    </select>
</div>
<div class="form-group">
    <label>Nro Cheque</label>
    <input type="number" id="nro_cheque" class="form-control">
</div>
<div class="form-group">
    <label>A Orden De</label>
    <input type="text" id="a_orden_de" class="form-control" value="FARMMEDI">
</div>
<div class="form-group">
    <label>Tipo Cheque</label>
    <select class="form-control select2" id="tipo">
        <option value="AL DIA">AL DIA</option>
        <option value="DIFERIDO">DIFERIDO</option>
    </select>
</div>
<div class="form-group">
    <label>Vencimiento</label>
    <input type="date" id="cheque_venc" class="form-control" value="<?= date('Y');?>-12-31">
</div>
<div class="form-group">
    <label>Monto</label>
    <input type="number" id="monto" class="form-control">
</div>
<button class="btn btn-danger" data-dismiss="modal"><i class="fa fa-ban"></i> Cerrar</button>
<button class="btn btn-success" onclick="agregar_forma(3,0,0);" ><i class="fa fa-save"></i> Grabar</button>
<?php } ?>