@extends('default.layout',['title' => 'XML']) @section('content')

{!!Form::open() ->get() ->route('enviarXml.filtro') !!}
{!!Form::date('start_date', 'Data inicial') !!}
{!!Form::date('end_date', 'Data final') !!}
{!!Form::select('estado_emissao', 'Estado', [1 => 'Aprovado', 0 => 'Cancelado'])->attrs(['class' => 'form-select']) !!}
@if(empresaComFilial()) {!! __view_locais_select_filtro_xml(isset($filial_id) ? $filial_id : '') !!} @endif

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

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

@foreach($xml as $x) @endforeach
Venda ID Cliente Valor Chave Data
{{$x->id}} {{$x->cliente->razao_social}} R$ {{__moeda($x->valor_total)}} {{$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: {{sizeof($xmlEntrada)}}

@foreach($xmlEntrada as $x) @endforeach
Compra ID Cliente Valor Chave Data
{{$x->id}} {{$x->fornecedor->razao_social}} R$ {{__moeda($x->valor)}} {{$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: {{sizeof($xmlDevolucao)}}

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

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

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

Total de arquivos de CTe: {{sizeof($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) && sizeof($xmlMdfe) > 0)

Total de arquivos de MDFe: {{sizeof($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($xmlCompraFiscal) && sizeof($xmlCompraFiscal) > 0)

Total de arquivos de Compra Fiscal: {{sizeof($xmlCompraFiscal)}}

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

Nenhum arquivo encontrado

@endif
@endsection