<?php include "Views/templates/header.php"; ?>

<div class="card">

        <div class="card-header bg-light">
            <button class="btn btn-secondary" type="button" onclick="" id="btnClientesHide"><i class="fas fa-caret-square-up"></i></button>
            <button class="btn btn-secondary d-none" type="button" onclick="" id="btnClientesShow"><i class="fas fa-caret-square-down"></i></button>
            <button class="btn btn-success " type="button" id="btnGenerar"><i class="fas fa-save"></i></button>
            <button class="btn btn-danger  " onclick="location.href='<?php echo base_url; ?>cotizaciones/historial'" type="button"><i class="fas fa-sign-out-alt"></i></button>
        </div>

    <div class="card-body">
            <div class="row" id='areaClienteMinimizado'>
                <div class="col-12"></div>
            </div>
            <div class="row" id='areaCliente'>
                <div class="col-md-3">
                    <div class="form-group">
                        <div id='buscarClienteContainer'>
                            <label for="buscarCliente"><i class="fas fa-users"></i> Buscar Cliente <span class="text-danger">*</span></label>
                            <input type="hidden" id="id_cliente" name="id_cliente" value="1">
                            <input id="buscarCliente" class="form-control" type="text" placeholder="Buscar nombre del cliente">
                        </div>
                        <div id='ClienteContainer' class='d-none'>
                            <label for="nombreCliente"><i class="fas fa-users"></i> Nombre Cliente <span class="text-danger">*</span></label>
                            <input id="nombreCliente" class="form-control" type="text" placeholder="Nombre del cliente">
                        </div>
                        <div class="custom-control custom-checkbox">
                            <input type="checkbox" class="custom-control-input" id="customCheck" onchange="clienteCustom(this.checked)">
                            <label class="custom-control-label" for="customCheck">Cliente Mostrador</label>
                        </div>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="condicion">Condiciones de pago: <span class="text-danger">*</span></label>
                        <select id="condicion" class="form-control" name="condicion">
                            <option value="1">Contado</option>
                            <option value="2">Credito</option>
                        </select>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="vendedores">Vendedor</label>
                        <select class="form-control" required name="vendedores" id="vendedores">
                        </select>
                    </div>
                </div>                
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="validez">Validez: <span class="text-danger">*</span></label>
                        <select id="validez" class="form-control" name="validez">
                            <option value="5">5 días</option>
                            <option value="10">10 días</option>
                            <option value="15">15 días</option>
                            <option value="30">30 días</option>
                            <option value="60">60 días</option>
                        </select>
                    </div>
                </div>

                <div class="col-md-3">
                    <div class="form-group">
                        <label for="fecha">Fecha</label>
                        <input type="date" id="fecha" name="fecha" class="form-control">
                    </div>
                </div>                

                <div class="col-md-6">
                    <div class="form-group">
                        <label for="nota">Nota <span class="text-danger">*</span></label>
                        <textarea id="nota" class="form-control" name="nota" rows="2" placeholder="Nota"></textarea>
                    </div>
                </div>

            </div>
    </div>
</div>



<div class="card">
    <div class="card-body">
        <div class="form-group">
            <label for="buscarProducto"><i class="fas fa-barcode"></i> Buscar Producto</label>
            <input id="buscarProducto" class="form-control" type="text" placeholder="Código o nombre del producto">
            <span class="text-danger" id="error_producto"></span>
        </div>
        <div class="table-responsive">
            <table class="" id="t_ventas_hist" style="width: 100%;">
            <!-- <table class="table table-bordered table-hover display responsive nowrap" id="table_cotizacion" style="width: 100%;">
                <thead>
                    <tr>
                        <th>Descripción</th>
                        <th>Cant.</th>
                        <th>Desc.</th>
                        <th>Precio</th>
                        <th>Sub Total</th>
                        <th></th>
                    </tr>
                </thead> -->
                <tbody id="tbody_cotizacion">
                </tbody>
            </table>
        </div>
    </div>
</div>


<div class="card">
    <div class="card-body">
            <div class="row">
                <div class="col-md-4 ml-auto">
                    <div class="form-group">
                        <label for="total" class="font-weight-bold">Total a Pagar</label>
                        <input id="total" class="form-control" type="text" name="total" placeholder="Total" disabled>
                        
                        <!--
                        <button class="btn btn-warning mt-2 btn-block" type="button" id="btnGenerar"><i class="fas fa-print"></i> Guardar</button>
                        <button class="btn btn-danger  mt-2 btn-block" onclick="location.href='<?php echo base_url; ?>cotizaciones/historial'" type="button">Salir</button>
                        -->
                        
                    </div>

                </div>
            </div>
    </div>
</div>


<?php include "Views/templates/footer.php"; ?>