@extends('relatorios.default') @section('content') @if($data_inicial)
Data: {{$data_inicial}}
@endif @php $somaLucro = 0; $somaPerc = 0; @endphp @foreach($lucros as $key => $v) @php $somaLucro += $v['lucro']; $somaPerc += (float)__replace($v['lucro_percentual']); @endphp @endforeach
Horário Local Cliente Valor venda/compra Lucro %Lucro
{{$v['horario']}} {{$v['local']}} {{$v['cliente']}} {{number_format($v['valor_venda'], 2)}} / {{number_format($v['valor_compra'], 2)}} {{number_format($v['lucro'], 2)}} {{$v['lucro_percentual']}}
Total lucro R$ {{number_format($somaLucro, 2, ',', '.')}} % médio {{number_format(($somaPerc/sizeof($lucros)), 2, ',', '.')}}%
@endsection