<?php $__env->startSection('content'); ?>
    <div class="page-content">
        <div class="container-fluid">
            <div class="page-content-inner">
                <div class="row">
                    <div class="col-md-12">
                        <div class="portlet light">
                            <div class="portlet-body">
                                <div class="row">
                                    <div class="col-md-12">
                                       <span class="font-blue-madison title"><i class="fa fa-fax"></i> Relatório de Estoque</span>
                                            <?php echo Form::open(['route' => $action->route, 'method' => $action->method, 'class'=>'right']); ?>

                                            <button type="submit" name="excel" value='excel' class="btn blue-madison popovers "  data-container="body" data-trigger="hover" data-placement="top" data-content="Exportar em Excel">
                                                <i class="fa fa-file-excel-o"></i> Excel
                                            </button>
                                            <?php echo Form::close(); ?>

                                        
                                    </div>
                                    <div class="col-xs-12">
                                        <hr>
                                    </div>
                                </div>
                                <table class="table table-striped table-hover table-light" id="table-dids">
                                    <thead>
                                        <tr class="uppercase bg-blue-madison">
                                            <th class="col-md-1 font-white">Cód. Produto</th>
                                            <th class="col-md-3 font-white">Descrição</th>
                                            <th class="col-md-1 font-white">Tipo</th>
                                            <th class="col-md-1 font-white">Categoria</th>
                                            <th class="col-md-1 font-white">Qtd.Estoque</th>
                                            <th class="col-md-1 font-white">Status</th>
                                            <th class="col-md-1 font-white">Preço Custo</th>
                                            <th class="col-md-1 font-white">Preço Venda</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php foreach($produtos as $produto): ?>
                                            <tr>
                                                <td><?php echo e($produto->id); ?></td>
                                                <td><?php echo e($produto->descricao); ?></td>
                                                <td><?php echo e($produto->tipo); ?></td>
                                                <td><?php echo e($produto->categoria); ?></td>
                                                <td>
                                                    <?php if($produto->qtd ): ?>
                                                    <?php echo e($produto->qtd); ?>

                                                    <?php else: ?>
                                                    0
                                                    <?php endif; ?>
                                                </td>
                                                <td>
                                                    <?php if($produto->status == 'Ativo'): ?> 
                                                        <i class="fa fa-circle font-green-jungle"> ATIVO
                                                    <?php else: ?> 
                                                        <i class="fa fa-circle font-red"> INATIVO
                                                    <?php endif; ?>
                                                </td>
                                                <td><?php echo e(financialPrice($produto->valor_custo)); ?></td>
                                                <td><?php echo e(financialPrice($produto->valor_venda)); ?></td>
                                            </tr>
                                        <?php endforeach; ?>                                    
                                    </tbody>
                                </table> 
                                <div class="row">
                                    <div class="col-xs-12 text-center">
                                        <?php echo $produtos->render(); ?>

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

<?php $__env->startSection('js-admin-did'); ?>
<?php $__env->startSection('js-admin-report-customers'); ?>
    <script src="<?php echo e(asset('/assets/global/scripts/app.min.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('/assets/global/plugins/datatables/datatables.min.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('/assets/global/plugins/fancybox/source/jquery.fancybox.js?v=2.1.5')); ?>" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="<?php echo e(asset('/assets/global/plugins/fancybox/source/jquery.fancybox.css?v=2.1.5')); ?>" media="screen" />

    <script type="text/javascript">
        $(document).ready(function() {
            $('.fancybox').fancybox();
        });
        
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('template', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>