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

Valor total de Emissão: {{ number_format($somaTotalVendas, 2, ',', '.')}}


@isset($itens)
@foreach($itens as $t)

CFOP: {{$t['cfop']}}

@php $somaValor = 0; $somaQuantidade = 0; @endphp @foreach($t['itens'] as $i) @php $somaValor += $i->total; $somaQuantidade += $i->quantidade; @endphp @endforeach
Produto Unidade Quantidade R$ Total
{{$i->produto->nome}} {{$i->produto->unidade_venda}} {{number_format($i->qtd, 2, ',', '.')}} {{ number_format($i->total, 2, ',', '.') }}

Valor total de emissão: {{ number_format($somaValor, 2, ',', '.') }}

@php $percentual = $somaTotalVendas > 0 ? (100 - ((($somaValor-$somaTotalVendas)/$somaTotalVendas*100)*-1)) : 0; @endphp

Percentual: {{ number_format($percentual, 2, ',', '.') }}%

@csrf

@endforeach
@csrf
@endisset
@endsection