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

    <div class="sixteen wide tablet sixteen wide computer column ">
        <div class="ui segment">
            
            <h4 class="ui dividing header teal centered">PRODUCTOS POR TIENDA / ALMACEN</h4>
                
            <div class="ui equal width grid">
                <div class="row">
                     <div class="column">
                        <form id="frmBuscar" autocomplete="off" method="GET" action="<?php echo e(url('producto/buscar')); ?>" >
                            <div class="ui action small input" >
                                  <input type="text" placeholder="Buscar..." name="search">
                                  <button type="submit" class="ui icon button " title="Clic para buscar"><i class="search icon"></i></button>
                            </div>
                        </form>
                    </div>
                    
                   
                </div>
            </div>    

            <table class="ui celled striped table">
                <thead>
                    <tr>
                        <th class="head_table">N°</th>
                        <th class="head_table">Producto</th>
                        <th class="head_table">Precio S/</th>
                        <th class="head_table">Stock</th>
                        <th class="head_table">Ubicacion</th>
                        <th class="head_table">Acciones</th>
                    </tr>
                </thead>
                <tbody>
                   <?php /**/ $i = $data->firstItem() /**/ ?>
                    <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $local): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr data-table="<?php echo e($local->id_producto); ?>">
                        <td><?php echo e($i); ?></td>
                        <td><?php echo e($local->producto->nombre); ?> <?php echo e($local->producto->descripcion); ?></td>
                        <td><?php echo e($local->producto->precio); ?></td>
                        <td><?php echo e(round($local->stock)); ?></td>
                        <td><?php echo e($local->local->nombre); ?> (<?php echo e($local->local->direccion); ?>)</td>
                        <td>                            
                            <div class="ui mini vertical animated positive button button_info_modal" title="Ver informacion detallada" data-id="<?php echo e($local->id_producto); ?>">
                                <div class="hidden content">Info</div>
                                <div class="visible content"><i class="search icon"></i></div>
                            </div>
                      
                        </td>
                    </tr>
                    <?php /**/ $i++ /**/ ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
                <tfoot>
                    <tr>
                        <th colspan="6">
                            <?php echo $__env->make('layout.includes.pagination', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </th>
                    </tr>
                </tfoot>
            </table>

        </div>
    </div>

    <!--start details modal -->
    <div class="ui standard small modal" id="detalles_modal">
        <div class="header">Información del Producto</div>
        <div class="content">
            <div class="description">
                <div class="ui equal width grid">
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Codigo de Barras : </b></div>
                        <div class="ten wide column"><span id="_1"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Nombre : </b></div>
                        <div class="ten wide column"><span id="_2"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Descripción o Marca : </b></div>
                        <div class="ten wide column"><span id="_3"></span></div>
                    </div>
                   <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Tipo de Producto : </b></div>
                        <div class="ten wide column"><span id="_4"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Fecha de Vencimiento : </b></div>
                        <div class="ten wide column"><span id="_5"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Tipo de Presentacion : </b></div>
                        <div class="ten wide column"><span id="_6"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Unidad de Medida : </b></div>
                        <div class="ten wide column"><span id="_7"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Situacion de Impuesto : </b></div>
                        <div class="ten wide column"><span id="_8"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Tipo de Impuesto: </b></div>
                        <div class="ten wide column"><span id="_9"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Valor de Impuesto : </b></div>
                        <div class="ten wide column"><span id="_10"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Precio de Venta Unitario: </b></div>
                        <div class="ten wide column"><span id="_11"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Ubicacion del producto: </b></div>
                        <div class="ten wide column"><span id="_12"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Stock: </b></div>
                        <div class="ten wide column"><span id="_13"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Cantidad para alerta: </b></div>
                        <div class="ten wide column"><span id="_14"></span></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="actions">
            <div class="ui primary right labeled icon deny button">Cerrar<i class="times icon"></i></div>
        </div>
    </div>
    <!--end details modal -->


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


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



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