<div id='lp-alert' class="aui-core-notification-embeded-container"></div>

<div class="col-md-12">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="/">Dasboard</a></li>
            <li class="breadcrumb-item actionbutton-link" data-href="facturacion" title="Volver a facturacion" >Facturacion</li>
            <li class="breadcrumb-item active" aria-current="page">Mtto Facturas</li>
        </ol>
</div>


<div class="col-md-12">
        
           
                <!-- ANTECEDENTES DEL CLIENTE --->

                     <!--- ot ----->

                
                <strong>DATOS DEL DOCUMENTO EN PROCESO</strong>
                <hr>
                
                <form action="" id="oFrmAdd">
                        
                    <div class="row">
                        <div class="col-md-6">
                             <div class="form-group form-default group-material">
                                 <label class="float-label">Cliente</label>
                                 <br><br>
                                 <select id ="clientes_id-sel" name="clientes_id-sel" class="form-control">
                                     <?php
                                            foreach($dataClient as $row)
                                            {
                                                print '<option value="'.$row->id.'">'.$row->idcliente." - ".$row->nombreleg.'</option>';
                                            }
                                     ?>
                                </select>
                            </div>


                            <div class="form-group form-default group-material">
                                 <label class="float-label">Tipo de documento</label>
                                 <br><br>
                                 <select id ="tipo_dte" name="tipo_dte" class="form-control">
                                     <option value ="01">01-Factura consumidor</option>
                                     <option value ="03">03-Credito Fiscal</option>
                                     <option value ="90">90-Pre-factura</option>
                                </select>
                            </div>

                            
                   
                                <input type="hidden" id ="id" name ="id" value ="-1">
                                <input type="hidden" readonly name="clientes_id" id="clientes_id" value="">
                                
                         
                        

                        </div>

                         <div style="text-align: begin" class="col-md-12 mt-4 mb-1">
                            <button class="btn btn-success actionbutton-newdoc" data-href="facturacion-new" style="color:aliceblue;" type="button">Proceder a nuevo documento</button>
                        </div>
                    </div>
                </form>


    
</div>
<script>
     $(document).ready(function() {
                $('#clientes_id-sel').select2();
            });


     $("#clientes_id-sel").select2().on('change', function (e)
     {
             var oSel2 = $('#clientes_id-sel').select2('data');
             var oText = oSel2[0].text;

             $("#clientes_id").val(oText.substr(0,16) );
    });
       


</script>


<script src="views/js/main.js"></script>