@extends('default.layout',['title' => 'Empresas']) @section('content')
Arquivos da empresa
{!!Form::open() ->fill(request()->all()) ->get() ->route('empresas.filtroXml') !!}
{!! Form::date('start_date', 'Data inicial')->attrs(['class' => '']) !!}
{!! Form::date('end_date', 'Data final')->attrs(['class' => '']) !!}
{!! Form::select('estado', 'Estado', [1 => 'Aprovado', 0 => 'Cancelado'])->attrs(['class' => 'form-select']) !!}

Limpar
{!!Form::close()!!}
@if(isset($xml)&& sizeof($xml) > 0)

Total de arquivos de NFe: {{count($xml)}}

@foreach($xml as $x) @endforeach
Venda ID Cliente Valor Chave Data
{{$x->id}} {{$x->cliente->razao_social}} {{number_format($x->valor_total, 2)}} {{$x->chave}} {{ \Carbon\Carbon::parse($x->created_at)->format('d/m/Y H:i:s')}}
@endif @if(isset($xmlEntrada) && sizeof($xmlEntrada) > 0)

Total de arquivos de NFe Entrada: {{count($xmlEntrada)}}

@foreach($xmlEntrada as $x) @endforeach
Compra ID Cliente Valor Chave Data
{{$x->id}} {{$x->fornecedor->razao_social}} {{number_format($x->valor, 2)}} {{$x->chave}} {{ \Carbon\Carbon::parse($x->created_at)->format('d/m/Y H:i:s')}}
@endif @if(isset($xmlDevolucao) && sizeof($xmlDevolucao) > 0)

Total de arquivos de NFe Devolução: {{count($xmlDevolucao)}}

@foreach($xmlDevolucao as $x) @endforeach
Venda ID Cliente Valor Chave Data
{{$x->id}} {{$x->fornecedor->razao_social}} {{number_format($x->valor_devolvido, 2)}} {{$x->chave_gerada}} {{ \Carbon\Carbon::parse($x->created_at)->format('d/m/Y H:i:s')}}
@endif @if(isset($xmlNfce) && count($xmlNfce) > 0)

Total de arquivos de NFCe: {{count($xmlNfce)}}

@foreach($xmlNfce as $x) @endforeach
Venda ID Cliente Valor Chave Data
{{$x->id}} @if($x->cliente) {{$x->cliente->razao_social}} @else -- @endif {{number_format($x->valor_total, 2)}} {{$x->chave}} {{ \Carbon\Carbon::parse($x->created_at)->format('d/m/Y H:i:s')}}
@endif @if(isset($xmlCte) && count($xmlCte) > 0)

Total de arquivos de CTe: {{count($xmlCte)}}

@foreach($xmlCte as $x) @endforeach
ID Chave Data
{{$x->id}} {{$x->chave}} {{ \Carbon\Carbon::parse($x->created_at)->format('d/m/Y H:i:s')}}
@endif @if(isset($xmlMdfe) && count($xmlMdfe) > 0)

Total de arquivos de MDFe: {{count($xmlMdfe)}}

@foreach($xmlMdfe as $x) @endforeach
ID Chave Data
{{$x->id}} {{$x->chave}} {{ \Carbon\Carbon::parse($x->created_at)->format('d/m/Y H:i:s')}}
@endif @if(isset($xml) && isset($xmlNfce) && isset($xmlCte) && isset($xmlMdfe) && count($xml) == 0 && count($xmlNfce) == 0 && count($xmlCte) == 0 && count($xmlMdfe) == 0)

Nenhum arquivo encontrado!

@endif
@endsection