<?php use_helper( 'UrlFunctions' ); ?>
<?php use_helper( 'IncludePartial' ); ?>
<?php use_helper( 'UtilFunctions' ); ?>

<style type="text/css">
.table td, .table th {
    padding: .2rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}
</style>

<div id="resultContent" style=""></div>

<form action="" method="post" name="form1" id="form1" onsubmit="return false;">
    <div class="form-row mx-0 mb-1">

        <div class="table-responsive">
            <table  class="table table-borderless border" style="margin-bottom: 0;">
                <tr>
                    <td  nowrap="nowrap" align="right" scope="row"><label for="ClienteNombre">Nom Cliente :</label></td>
                    <td nowrap="nowrap">
                        <input type="text" class="form-control" id="ClienteNombre" name="ClienteNombre" placeholder="" value="" style="width: 250px;" autocomplete="off">
                    </td>
                    <td  nowrap="nowrap" align="right" scope="row"><label for="ClienteDocNum">Docu Cliente :</label></td>
                    <td nowrap="nowrap">
                        <input type="text" class="form-control" id="ClienteDocNum" name="ClienteDocNum" placeholder="" value="" style="width: 250px;" autocomplete="off">
                    </td>
                </tr>
                <tr>
                    <td  nowrap="nowrap" align="right" scope="row"><label for="OrdenNum">Cod Cotizaci&oacute;n :</label></td>
                    <td nowrap="nowrap">
                        <input type="text" class="form-control" id="OrdenNum" name="OrdenNum" placeholder="" value="" style="width: 250px;" autocomplete="off">
                    </td>
                    <td  nowrap="nowrap" align="right" scope="row"><label for="OrdenEstado">Estado :</label></td>
                    <td nowrap="nowrap" style="vertical-align: middle;">
                         <select class="form-control form-control-sm" id="OrdenEstado" name="OrdenEstado" style="width: 250px;" onchange="findControl();" >
                            <option value="C"> APROBADO </option>
                        </select>
                    </td>
                 </tr>
            </table>
        </div>
    </div>
</form>

<script type="text/javascript">
$( "#ClienteNombre, #ClienteDocNum, #OrdenNum" ).keyup
(
    function( e ) 
    {
        findControl();
    }
);
</script>

<?php include_partial( "gridProduccion" ); ?>

<script>
//ESCAPE, DETECTA EL F5, CTRL+F5
$( document ).bind
(
    'keyup', 
    function( e ) 
    {
        //console.log( e.which );
        if( e.which === 13 ) //+
        {
            findControl();
        }
        if( e.which === 27 ) //ESCAPE
        {
            $( "#NumeroFactura" ).focus();
        }
    }
);
</script>