@extends('default.layout') @section('content')

@if($origem =='s') LIVRO DE SAÍDAS @endif @if($origem =='e') LIVRO DE ENTRADAS @endif @if($origem =='') LIVRO DE ENTRADAS E SAÍDA @endif


@if(isset($comprasNfe) && count($comprasNfe) > 0)
Total de NF-e: {{count($comprasNfe)}}
@foreach($comprasNfe as $x) @endforeach @foreach($CFOPCompras as $c) @endforeach
NF-e Fornecedor Valor Data Contábil
{{$x->nf}} {{$x->fornecedor->razao_social}} {{number_format($x->valor, 2, ',', '.')}} {{ \Carbon\Carbon::parse($x->data_contabil)->format('d/m/Y')}}
CFOP{{$c->cfop_entrada}}{{number_format($c->total, 2, ',', '.')}}
TOTAL{{ number_format($total_nfe, 2, ',', '.') }}

@endif @if(isset($vendasNfe) && count($vendasNfe) > 0)
Total de NF-e: {{count($vendasNfe)}}
@foreach($vendasNfe as $x) @endforeach @foreach($CFOPvendas as $v) @endforeach
NF-e Cliente Valor Data Contábil
{{$x->NfNumero}} {{$x->cliente->razao_social}} {{number_format($x->valor_total, 2, ',', '.')}} {{ \Carbon\Carbon::parse($x->data_registro)->format('d/m/Y H:i:s')}}
CFOP{{$v->cfop_saida}}{{number_format($v->total, 2, ',', '.')}}
TOTAL{{ number_format($total_nfe, 2, ',', '.') }}

@endif @if(isset($vendasNfce) && count($vendasNfce) > 0)
Total de NFC-e: {{count($vendasNfce)}}
@foreach($vendasNfce as $x) @if($x->cliente) @else @endif @endforeach @foreach($CFOPvendascaixa as $vi) @endforeach
NFC-e Cliente Valor Data Contábil
{{$x->NFcNumero}}{{$x->cliente->razao_social}}NAO IDENTIFICADO{{number_format($x->valor_total, 2, ',', '.')}} {{ \Carbon\Carbon::parse($x->data_registro)->format('d/m/Y H:i:s')}}
CFOP{{$vi->cfop_saida}}{{number_format($vi->total, 2, ',', '.')}}
TOTAL{{ number_format($total_nfce, 2, ',', '.') }}

@endif @if(isset($vendasNfe) && isset($vendasNfce) && count($vendasNfe) > 0 && count($vendasNfce) > 0)
Total Geral:
@foreach($CFOPvendas as $v) @endforeach @foreach($CFOPvendascaixa as $vi) @endforeach
CFOP
NF-e - {{$v->cfop_saida}}{{number_format($v->total, 2, ',', '.')}}
NFC-e - {{$vi->cfop_saida}}{{number_format($vi->total, 2, ',', '.')}}
TOTAL{{ number_format($total_nfe + $total_nfce, 2, ',', '.') }}

@endif @if(isset($vendasNfe) && isset($vendasNfce) && count($vendasNfe) == 0 && count($vendasNfce) == 0 || isset($comprasNfe) && count($comprasNfe) == 0)

Nenhum movimento encontrado

@endif @if(isset($vendasNfe) && count($vendasNfe) > 0 || isset($vendasNfce) && count($vendasNfce) > 0 || isset($comprasNfe) && count($comprasNfe) > 0)
@if(isset($dataInicial) && isset($dataFinal)) print Imprimir @endif




@endif
@endsection