| Server IP : 54.94.228.101 / 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 : |
<?php $__env->startSection('content'); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Pedido Entrega
<small>Listagem</small>
</h1>
<ol class="breadcrumb">
<li><a href="<?php echo e(url('admin')); ?>"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">Pedido Entrega</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<?php if($current_role->hasAccess($current_module->nome_tabela.'.create')){ ?>
<a href="<?php echo e(url('admin/pedido-entrega/add')); ?>" class="table-add"><i class="fa fa-plus"></i> Adicionar</a>
<?php } ?>
<hr>
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="topmenu">
<a href="<?php echo e(url('admin/pedido-entrega?id_status_pedido_entrega=1')); ?>" class="item <?php echo (1 == $id_status_pedido_entrega_atual) ? 'active' : (($id_status_pedido_entrega_atual) ? 'inactive' : '' ); ?>" style="width:12.5%">
<i class="fa fa-angle-double-right fa-fw"></i>
Pendente
<?php if(1== $id_status_pedido_entrega_atual){ ?>
<span data-href="<?php echo e(url('admin/pedido-entrega')); ?>" class="close"> <i class="fa fa-times"></i></span>
<?php } ?>
</a>
<a href="<?php echo e(url('admin/pedido-entrega?id_status_pedido_entrega=2')); ?>" class="item <?php echo (2 == $id_status_pedido_entrega_atual) ? 'active' : (($id_status_pedido_entrega_atual) ? 'inactive' : '' ); ?>" style="width:12.5%">
<i class="fa fa-angle-double-right fa-fw"></i>
Aprovado
<?php if(2 == $id_status_pedido_entrega_atual){ ?>
<span data-href="<?php echo e(url('admin/pedido-entrega')); ?>" class="close"> <i class="fa fa-times"></i></span>
<?php } ?>
</a>
<a href="<?php echo e(url('admin/pedido-entrega?id_status_pedido_entrega=3')); ?>" class="item <?php echo (3 == $id_status_pedido_entrega_atual) ? 'active' : (($id_status_pedido_entrega_atual) ? 'inactive' : '' ); ?>" style="width:12.5%">
<i class="fa fa-angle-double-right fa-fw"></i>
Preparando Envio
<?php if(3 == $id_status_pedido_entrega_atual){ ?>
<span data-href="<?php echo e(url('admin/pedido-entrega')); ?>" class="close"> <i class="fa fa-times"></i></span>
<?php } ?>
</a>
<a href="<?php echo e(url('admin/pedido-entrega?id_status_pedido_entrega=4')); ?>" class="item <?php echo (4 == $id_status_pedido_entrega_atual) ? 'active' : (($id_status_pedido_entrega_atual) ? 'inactive' : '' ); ?>" style="width:12.5%">
<i class="fa fa-angle-double-right fa-fw"></i>
Faturado
<?php if(4 == $id_status_pedido_entrega_atual){ ?>
<span data-href="<?php echo e(url('admin/pedido-entrega')); ?>" class="close"> <i class="fa fa-times"></i></span>
<?php } ?>
</a>
<a href="<?php echo e(url('admin/pedido-entrega?id_status_pedido_entrega=8')); ?>" class="item <?php echo (8 == $id_status_pedido_entrega_atual) ? 'active' : (($id_status_pedido_entrega_atual) ? 'inactive' : '' ); ?>" style="width:12.5%">
<i class="fa fa-angle-double-right fa-fw"></i>
Pronto para Envio
<?php if(8 == $id_status_pedido_entrega_atual){ ?>
<span data-href="<?php echo e(url('admin/pedido-entrega')); ?>" class="close"> <i class="fa fa-times"></i></span>
<?php } ?>
</a>
<a href="<?php echo e(url('admin/pedido-entrega?id_status_pedido_entrega=5')); ?>" class="item <?php echo (5 == $id_status_pedido_entrega_atual) ? 'active' : (($id_status_pedido_entrega_atual) ? 'inactive' : '' ); ?>" style="width:12.5%">
<i class="fa fa-angle-double-right fa-fw"></i>
Enviado
<?php if(5 == $id_status_pedido_entrega_atual){ ?>
<span data-href="<?php echo e(url('admin/pedido-entrega')); ?>" class="close"> <i class="fa fa-times"></i></span>
<?php } ?>
</a>
<a href="<?php echo e(url('admin/pedido-entrega?id_status_pedido_entrega=6')); ?>" class="item <?php echo (6 == $id_status_pedido_entrega_atual) ? 'active' : (($id_status_pedido_entrega_atual) ? 'inactive' : '' ); ?>" style="width:12.5%">
<i class="fa fa-angle-double-right fa-fw"></i>
Entregue
<?php if(6 == $id_status_pedido_entrega_atual){ ?>
<span data-href="<?php echo e(url('admin/pedido-entrega')); ?>" class="close"> <i class="fa fa-times"></i></span>
<?php } ?>
</a>
<a href="<?php echo e(url('admin/pedido-entrega?id_status_pedido_entrega=7')); ?>" class="item <?php echo (7 == $id_status_pedido_entrega_atual) ? 'active' : (($id_status_pedido_entrega_atual) ? 'inactive' : '' ); ?>" style="width:12.5%">
<i class="fa fa-angle-double-right fa-fw"></i>
Cancelado
<?php if(7 == $id_status_pedido_entrega_atual){ ?>
<span data-href="<?php echo e(url('admin/pedido-entrega')); ?>" class="close"> <i class="fa fa-times"></i></span>
<?php } ?>
</a>
</div>
<div class="row">
<div class="col-md-3">
<?php echo $pedidos_entrega->total() . " registro(s) encontrado(s)"; ?>
</div>
<div class="col-md-9">
<div class="row">
<form class="pull-right relatorio-pedidos-filtros" action="<?php echo url('admin/pedido-entrega'); ?>" method="GET">
<div class="col-md-4">
Empresa :
<select name="term_empresa_id" id="term_empresa_id">
<option value="0">Todas</option>
<?php foreach($empresas as $empresa):
echo '<option value="' . $empresa->id . '" '.(isset($termos['term_empresa_id']) && $termos['term_empresa_id'] == $empresa->id ? 'selected="selected"' : '').'>' . $empresa->nome . '</option>';
endforeach;
?>
</select>
</div>
<div class="col-md-4">
Data:
<input value="<?php echo (isset($_GET['term_data_inicio'])) ? $_GET['term_data_inicio'] : '' ?>" type="date" name="term_data_inicio">
a
<input value="<?php echo (isset($_GET['term_data_fim'])) ? $_GET['term_data_fim'] : '' ?>" type="date" name="term_data_fim">
</div>
<div class="col-md-4">
<input type="hidden" name="id_status_pedido_entrega" value="<?php echo $id_status_pedido_entrega_atual ? $id_status_pedido_entrega_atual : '' ?>">
<input value="<?php echo (isset($_GET['term'])) ? $_GET['term'] : '' ?>" type="text" name="term">
<button class="btn btn-primary">Buscar</button>
</div>
</form>
</div>
</div>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<?php foreach ($fields_listagem as $field): ?>
<th><?php echo $field->label; ?></th>
<?php endforeach ?>
<th>Cliente</th>
<th>Confraria</th>
<th>Empresa</th>
<th>Unidade</th>
<th>Status</th>
<th class="th-action">Ação</th>
</tr>
</thead>
<tbody>
<?php foreach ($pedidos_entrega as $item): ?>
<tr>
<td><?php echo $item->id; ?></td>
<?php foreach ($fields_listagem as $field): ?>
<?php if(get_class($field) == 'App\CampoModulo'){ ?>
<?php $campo = $field->nome; ?>
<td>
<?php switch ($field->tipo_campo) {
case 'S':
$valor = ($item->$campo) ? 'Sim' : 'Não';
break;
case 'N':
$valor = number_format($item->$campo,2,',','.');
break;
case 'D':
$valor = date('d/m/Y',strtotime($item->$campo));
break;
case 'DT':
$valor = date('d/m/Y H:i:s',strtotime($item->$campo));
break;
case 'SI':
$valor = '<i class="fa '.$item->$campo.'"></i>';
break;
case 'E':
$valor = '';
foreach ($field->options as $campoOption) {
if($item->$campo == $campoOption->chave){
$valor = $campoOption->valor;
break;
}
}
break;
default:
$valor = $item->$campo;
break;
} ?>
<?php echo $valor; ?>
</td>
<?php }else{ ?>
<td>
<?php $nomeVariavel = 'fk'.$field->id; ?>
<?php echo $item->$nomeVariavel; ?>
</td>
<?php } ?>
<?php endforeach ?>
<td>
<?php echo ($item->adega && $item->adega->cliente ? $item->adega->cliente->nome.' '.$item->adega->cliente->sobrenome : '') ?>
</td>
<td>
<?php echo (isset($item->confraria) ? $item->confraria->nome : '')?>
</td>
<td>
<?php echo (isset($item->empresa) ? $item->empresa->nome : ''); ?>
</td>
<td>
<?php echo (isset($item->unidadeNegocio) ? $item->unidadeNegocio->nome : ''); ?>
</td>
<td>
<?php echo (isset($item->status) ? $item->status->nome : ''); ?>
</td>
<td>
<?php if($current_role->hasAccess($current_module->nome_tabela.'.update')){ ?>
<a href="/admin/pedido-entrega/edit/<?php echo $item->id; ?>" class="btn btn-primary"><i class="fa fa-pencil-alt"></i></a>
<?php } ?>
<?php /*if($current_role->hasAccess($current_module->nome_tabela.'.delete')){ ?>
<a href="/admin/pedido-entrega/delete/<?php echo $item->slug; ?>" class="btn btn-danger deletar"><i class="fa fa-trash"></i></a>
<?php }*/ ?>
<?php
$links = (isset($_GET) ? $_GET : []);
$query_link = '';
if($id_status_pedido_entrega_atual){
$links = array_merge($links, ['id_status_pedido_entrega' => $id_status_pedido_entrega_atual]);
}
if(count($links) > 0){
$query_link = "?" . http_build_query($links);
}
?>
<a href="/admin/pedido-entrega/gerar-tiny/<?php echo $item->id; ?><?php echo $query_link; ?>" class="btn btn-primary tiny"><i class="fa fa-sync"></i></a>
<?php if(empty($item->nota_fiscal_erp)): ?>
<span style="color: red; font-weight: bold; padding-left: 5px; font-size: 12px;">Sem NF / Analisar</span>
<?php endif;?>
</td>
</tr>
<?php endforeach ?>
</tbody>
<tfoot>
<tr>
<th>ID</th>
<?php foreach ($fields_listagem as $field): ?>
<th><?php echo $field->label; ?></th>
<?php endforeach ?>
<th>Cliente</th>
<th>Empresa</th>
<th>Unidade</th>
<th>Status</th>
<th>Ação</th>
</tr>
</tfoot>
</table>
<div class="text-center">
<?php
echo $pedidos_entrega->appends([
'term' => (isset($_GET['term'])) ? $_GET['term'] : '',
'id_status_pedido_entrega' => ($id_status_pedido_entrega_atual) ? $id_status_pedido_entrega_atual : '',
'term_data_inicio' => (isset($_GET['term_data_inicio'])) ? $_GET['term_data_inicio'] : '',
'term_data_fim' => (isset($_GET['term_data_fim'])) ? $_GET['term_data_fim'] : '',
'term_empresa_id' => (isset($_GET['term_empresa_id'])) ? $_GET['term_empresa_id'] : '',
])->links();
?>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
<?php if($current_role->hasAccess($current_module->nome_tabela.'.create')){ ?>
<a href="<?php echo e(url('admin/pedido-entrega/add')); ?>" class="table-add"><i class="fa fa-plus"></i> Adicionar</a>
<?php } ?>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script>
$(document).on('click', '.tiny', function(e){
if(!confirm('Você deseja mesmo criar esse pedido de entrega no Tiny?')){
e.preventDefault();
}
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make($current_template, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>