@extends('adminlte.app') @section('content')

Listagem dos Pedidos

@if ($message = Session::get('success'))

{{ $message }}

@endif @if ($message = Session::get('danger'))

{{ $message }}

@endif
Lista de Postos
{{-- --}}
Filtros
{{-- --}} @if($permissao->notificar_recebimento_agend_pedido ||$permissao->excluir_agendamentos_pedidos) @endif @foreach ($agendamentos as $agendamento) @if(isset($agendamento->combustiveis->posto->nome_posto) ||isset($agendamento->combustiveis->posto->nome_posto)) @if($permissao->excluir_agendamentos_pedidos||$permissao->notificar_recebimento_agend_pedido) @endif {{-- --}} {{-- @csrf @method('DELETE') @if($permissao->notificar_recebimento_agend_pedido) @if($agendamento->data_recebimento == '') @else @endif @endif --}} @endif @endforeach
nr Postos Tanque Produtos Data Ultima Sondagem Ultima Sondagem Quantidade Dia Entrega Previsto Data Recebimento Statusdata Agendamento Data Recebimento Data SondagemAções
{{$agendamento->id_agp}} @if(isset($agendamento->combustiveis->posto->nome_posto)) {{ $agendamento->combustiveis->posto->nome_posto }} @else @endif @if(isset($agendamento->num_tanque)) {{$agendamento->num_tanque}} @else @endif @if(isset($agendamento->combustiveis->produto->descricao)) {{$agendamento->combustiveis->produto->descricao}} @else @endif @php $ultimaDataSondagem = $agendamento->combustiveis->sondagens_combustiveis()->where('data_sondagem', '<=',$agendamento->created_at)->latest('data_sondagem')->first(); @endphp @if(isset($ultimaDataSondagem->data_sondagem)) {{ \Carbon\Carbon::parse( $ultimaDataSondagem->data_sondagem )->format('d/m/Y') }} @else @endif @if(isset($ultimaDataSondagem->sondagem_final)) {{ number_format($ultimaDataSondagem->sondagem_final, 0,","," ") }} @else @endif {{ number_format($agendamento->quantidade, 0,","," ")}} @if($agendamento->data_agendamento!=''){{date('d/m/Y', strtotime($agendamento->data_agendamento))}}@endif @if($agendamento->data_recebimento != ''){{date('d/m/Y', strtotime($agendamento->data_recebimento))}}@endif @if($agendamento->data_recebimento != '') Entregue @elseif(!$agendamento->data_recebimento && $agendamento->data_agendamento < now() ) Atrasado @elseif(!$agendamento->data_recebimento && $agendamento->data_agendamento > now() ) Agendado @endif @if($permissao->excluir_agendamentos_pedidos)
@csrf @method('DELETE')
@endif @if($permissao->notificar_recebimento_agend_pedido) @if($agendamento->data_recebimento == '') @endif @endif
@endsection