@extends('relatorios.default') @section('content')
@php $somaPedido = 0; $somaPedidoLiquido = 0; $somaPdv = 0; $somaDesconto = 0; @endphp @foreach($vendas as $key => $v) @if(isset($v->cpf)) @else @endif @if($v->tbl == 'pdv') @else @endif @php if(!isset($v->cpf)){ $somaPedido += $v->valor_total; $somaPedidoLiquido += $v->valorLiquido(); }else{ $somaPdv += $v->valor_total; } $somaDesconto += $v->desconto @endphp @endforeach
Data Id Vendedor Cliente Forma de pagamento Despesas operacionais Desconto Valor venda liq. Valor total
{{\Carbon\Carbon::parse($v->created_at)->format('d/m/Y H:i')}} {{$v->id}} {{$v->vendedor()}} {{$v->cliente ? $v->cliente->razao_social : 'Consumidor final'}}{{$v->getTipoPagamento2()}}{{$v->getTipoPagamento()}}R$ 0,00 R$ {{number_format($v->desconto, 2, ',', '.')}} R$ {{number_format($v->valor_total, 2, ',', '.')}} R$ {{number_format($v->valor_total+$v->desconto, 2, ',', '.')}}R$ {{ $v->valorDespesaOperacionais() }} R$ {{number_format($v->desconto, 2, ',', '.')}} R$ {{ number_format($v->valorLiquido(), 2, ',', '.') }} R$ {{number_format($v->valor_total, 2, ',', '.')}}
Soma Pedido: {{number_format($somaPedido, 2, ',', '.')}} Soma Pedido Liquido: {{number_format($somaPedidoLiquido, 2, ',', '.')}}
Soma PDV: {{number_format($somaPdv, 2, ',', '.')}} Total: {{number_format($somaPedidoLiquido + $somaPdv, 2, ',', '.')}}
Soma Desconto: {{number_format($somaDesconto, 2, ',', '.')}}
@endsection