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

    <div class="sixteen wide tablet fourteen wide computer column ">
        <div class="ui segment">
            
            <h4 class="ui dividing header teal centered">RETIRAR PRODUCTOS</h4>
            <br>

            <form class="ui form" id="frmNuevo" autocomplete="off">

                    <div class="three fields">
                        <div class="four wide field">
                            <div class="ui fluid large white label">Ubicacion del Producto</div>
                        </div>
                        <div class="nine wide field">
                            <select class="ui fluid small input dropdown" name="id_local">
                                <option value="">Seleccione</option>
                                <?php if(Auth::guard("usuario")->user()->id_rol == 1): ?>
                                    <?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(); ?>
                                <?php else: ?>
                                     <option value="<?php echo e(Auth::guard("usuario")->user()->id_local); ?>"> <?php echo e(Auth::guard('usuario')->user()->local->nombre); ?> (<?php echo e(ucwords(mb_strtolower(Auth::guard('usuario')->user()->local->direccion ))); ?>)</option>
                                <?php endif; ?>     
                            </select>  
                        </div>
                    </div>
                    
                    <div class="three fields">
                        <div class="four wide field">
                            <div class="ui fluid large white label">Nombre del Producto</div>
                        </div>
                        <div class="nine wide field">
                            <select class="ui small search selection dropdown" name="id_prod">
                                <option value="">Buscar...</option>
                                <?php $__currentLoopData = $productos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $prod): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                   <option value="<?php echo e($prod->id_producto); ?>"><?php echo e($prod->nombre); ?> <?php echo e($prod->descripcion); ?> (<?php echo e($prod->tipo_presentacion->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_cliente" title="Clic para buscar"><i class="search icon"></i>BUSCAR</div>
                        </div>
                    </div>

                    <div class="three fields">
                        <div class="four wide field">
                            <div class="ui fluid large white label">Motivo de Retiro</div>
                        </div>
                        <div class="nine wide field">
                            <div class="ui small input ">
                              <input type="text" name="descripcion"  maxlength="200" oninput="$.upperCase(this)">
                            </div>
                        </div>
                    </div>
                    
                    <div class="four fields">
                        <div class="four wide field">
                            <div class="ui fluid large white label">Stock actual</div>
                        </div>
                        <div class="three wide field">
                            <div class="ui small input ">
                                <input type="text" name="codigo_barras" readonly maxlength="100" oninput="$.upperCase(this)">
                            </div>
                        </div>
                        <div class="three wide field">
                            <div class="ui fluid large white label">Precio de Venta</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_tot" readonly id="precio_compra_tot" maxlength="11">
                            </div> 
                        </div>
                    </div>

                    <div class="four fields">
                        <div class="four wide field">
                            <div class="ui fluid large white label">Cantidad a retirar</div>
                        </div>
                        <div class="three wide field">
                            <div class="ui small input ">
                                <input type="text" name="codigo_barras"  maxlength="100" oninput="$.upperCase(this)">
                            </div>
                        </div>
                        <div class="three wide field">
                            <div class="ui fluid large white label">Monto perdido</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_tot" id="precio_compra_tot" maxlength="11">
                            </div> 
                        </div>
                    </div>

                    <div class="form_footer">
                        <div class="ui right floated primary button btn_registrar"><i class="check icon"></i>REGISTRAR</div>
                    </div>

            </form>

        </div>
    </div>

    <!--start register modal -->
    <div class="ui small basic modal" id="register_modal">
        <div class="ui icon header"><i class="check circle icon"></i>Registrar Información</div>
        <div class="content" style="text-align: center; font-size: 16px">
          <p>¿Desea registrar esta información en el sistema?</p>
        </div>
        <div class="actions">
            <div class="ui red basic cancel inverted button" title="Haga clic para salir"><i class="remove icon"></i>Cancelar</div>
            <div class="ui green ok inverted button" title="Haga clic para registrar"> <i class="checkmark icon"></i>Registrar</div>
        </div>
    </div>
    <!--end register modal -->
    
<?php $__env->stopSection(); ?>

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



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