<?php $__env->startSection('content'); ?>

    <div class="sixteen wide tablet sixteen wide computer column ">
        <div class="ui segment">
            
            <h4 class="ui dividing header teal centered">COMPRAR PRODUCTOS PARA ALMACÉN</h4>
            <br>

            <form class="ui form" id="frmNuevo" autocomplete="off"> 
                
                <!-- start tab 1 -->
                <div class="ui tab active" data-tab="one">

                    <div class="three fields">
                        <div class="three wide field">
                            <div class="ui fluid large white label">Almacén de Destino</div>
                        </div>
                        <div class="eleven wide field">
                            <select class="ui fluid small input dropdown" name="id_local">
                                <option value="">Seleccione</option>
                                <?php $__currentLoopData = $locales; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $local): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                   <option value="<?php echo e($local->id_local); ?>"> <?php echo e($local->nombre); ?> (<?php echo e(ucwords(mb_strtolower($local->direccion ))); ?>)</option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
                            </select>  
                        </div>
                    </div>

                    <div class="three fields">
                        <div class="three wide field">
                            <div class="ui fluid large white label">Proveedor</div>
                        </div>
                        <div class="eleven wide field">
                            <select class="ui small search selection dropdown" name="id_proveedor">
                            <option value="">Seleccione</option>
                            <?php $__currentLoopData = $proveedores; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                               <option value="<?php echo e($data->id_proveedor); ?>"> <?php echo e($data->nombre); ?> (<?php echo e(ucwords(mb_strtolower($data->numero_documento ))); ?>)</option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
                        </select> 
                        </div>
                        <div class="two wide field">
                            <div class="ui fluid small green button btn_nuevo_proveedor" title="Clic para agregar nuevo"><i class="plus icon"></i>NUEVO</div>
                        </div>
                    </div>

                    <div class="four fields">
                        <div class="three wide field">
                            <div class="ui fluid large white label">Tipo Comprobante</div>
                        </div>
                        <div class="field">
                            <select class="ui fluid small input dropdown" name="tipo_comprobante">
                                <option value="">Seleccione</option>
                                <option value="Factura">Factura</option>
                                <option value="Boleta">Boleta</option>
                                <option value="Recibo">Recibo</option>
                            </select> 
                        </div>
                        <div class="three wide field">
                            <div class="ui fluid large white label">Fecha de Compra</div>
                        </div>
                        <div class="field">
                            <div class="ui small input">
                                <input type="text" class="fecha" name="fecha_compra" >
                            </div> 
                        </div>
                    </div>

                    <div class="four fields">
                        <div class="three wide field">
                            <div class="ui fluid large white label">N° Comprobante</div>
                        </div>
                        <div class="field">
                            <div class="ui small input">
                                <input type="text" placeholder="F001-001" name="numero_comprobante" >
                            </div> 
                        </div>
                    </div>

                    <div class="form_footer">
                        <div class="ui right floated default button tab_two">SIGUIENTE<i class="arrow right icon"></i></div>
                    </div>
                </div>
                <!-- end tab 1 -->

                <!-- start tab 2 -->
                <div class="ui tab" data-tab="two">
                    
                    <div class="three fields">
                        <div class="four wide field">
                            <div class="ui fluid large white label">Nombre del Producto</div>
                        </div>
                        <div class="ten wide field">
                            <select class="ui small search selection dropdown" name="id_producto">
                                <option value="">Seleccione</option>
                                <?php $__currentLoopData = $productos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                   <option value="<?php echo e($data->id_producto); ?>"> <?php echo e($data->nombre); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
                            </select> 
                        </div>
                        <div class="two wide field">
                            <div class="ui fluid small green button btn_nuevo_producto" title="Clic para agregar nuevo"><i class="plus icon"></i>NUEVO</div>
                        </div>
                    </div>

                    <div class="five fields">
                       
                        <div class="four wide field">
                            <div class="ui fluid large white label">Cantidad Comprada</div>
                        </div>
                        <div class="three wide field">
                            <div class="ui small input">
                                <input type="text" name="cantidad" id="cantidad" maxlength="8" onkeyup="calculaPrecioCompra()">
                            </div> 
                        </div>
                        <div class="four wide field">
                            <div class="ui fluid large white label">Tipo de Impuesto</div>
                        </div>
                        <div class="three wide field">
                            <select class="ui fluid small input dropdown" name="tipo_impuesto">
                                <option value="IGV">IGV</option>
                                <option value="ISC">ISC</option>
                            </select> 
                        </div>
                        <div class="two wide field">
                            <div class="ui right labeled small input">
                                <input type="text" name="valor_impuesto" value="18" maxlength="8">
                                <label class="ui label">%</label>
                            </div> 
                        </div>
                    </div>

                    <div class="four fields">
                        
                      
                        <div class="four wide field">
                            <div class="ui fluid large white label">Precio de Compra Total</div>
                        </div>
                        <div class="three wide field">
                            <div class="ui labeled small input">
                                <label class="ui label">S/</label>
                                <input type="text" name="precio_compra_total" id="precio_compra_total" maxlength="11" onkeyup="calculaPrecioCompra()">
                            </div> 
                        </div>
                         <div class="four wide field">
                            <div class="ui fluid large white label">Precio de Compra Unitario</div>
                        </div>
                        <div class="three wide field">
                            <div class="ui disabled labeled small input">
                                <label class="ui label">S/</label>
                                <input type="text" id="precio_compra_unitario" maxlength="11">
                            </div> 
                        </div>
                    </div>

                    
                    

                    <div class="four fields">
                        <div class="four wide field">
                            <div class="ui fluid large white label">Precio de Venta Unitario</div>
                        </div>
                        <div class="three wide field">
                            <div class="ui labeled small input">
                                <label class="ui label">S/</label>
                                <input type="text" name="precio_venta_unitario" id="precio_venta_unitario" maxlength="11" onkeyup="calculaUtilidad()">
                            </div> 
                        </div>
                        <div class="four wide field">
                            <div class="ui fluid large white label">Ganancia por Unidad</div>
                        </div>
                        <div class="three wide field">
                            <div class="ui disabled labeled small input">
                                <label class="ui label">S/</label>
                                <input type="text" id="utilidad" maxlength="11">
                            </div> 
                        </div>
                    </div>

                    <div class="ui hidden divider"></div>
                    <div class="form_footer">
                        <div class="ui left floated default button tab_one"><i class="arrow left icon"></i>REGRESAR</div>
                        <div class="ui right floated teal button btn_agregar_producto"><i class="arrow down icon"></i>AÑADIR A LISTA</div>
                    </div>

                    <div class="ui divider"></div>



                    <table class="ui celled table">
                        <thead>
                            <tr>
                                <th class=" blue center aligned ">Name</th>
                                <th class="center aligned">Status</th>
                                <th class="center aligned">Notes</th>
                                <th class="center aligned">Notes</th>
                                <th class="center aligned">Subtotal</th>
                            </tr>
                        </thead>
                        <tbody id="bodyProductosAgregados">
                            

                        </tbody>
                    </table>

                    <div class="form_footer">
                        
                        <div class="ui right floated primary button btn_registrar"><i class="check icon"></i>REGISTRAR PRODUCTOS</div>
                    </div>
                </div>
                <!-- end tab 2 -->
            </form>

        </div>
    </div>


     
    
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <script src="<?php echo e(asset('js/almacen/nuevo.js')); ?>"></script>
<?php $__env->stopSection(); ?>



<?php echo $__env->make('layout.main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>