@php $somaLucro = 0; $somaVendas = 0; @endphp @foreach($data as $item)
| DATA | CLIENTE | NÂș DA VENDA/PEDIDO | TOTAL | TIPO | |
|---|---|---|---|---|---|
| {{ $item['data'] }} | {{ $item['cliente'] }} | {{ $item['numero']}} | R$ {{ number_format($item['total'], $casasDecimais, ',', '.')}} | {{ $item['tipo']}} | |
| Produto | Quantidade | Valor unit. | Custo | Lucro | Lucro % |
| {{$i['produto']}} | {{ number_format($i['quantidade'], $casasDecimaisQtd, ',', '.') }} | {{ number_format($i['valor'], $casasDecimais, ',', '.') }} | {{ number_format($i['custo'], $casasDecimais, ',', '.') }} | {{ number_format($i['lucro'], $casasDecimais, ',', '.') }} | {{ number_format($i['lucro_perc'], 2, ',', '.') }} |
| Total de lucro | R$ {{ number_format($somaLucro, $casasDecimais, ',', '.')}} |