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

Total de registros {{ sizeof($data) }}

@if($local)

{{ $local->nome }}

@endif @php $somaEstoque = 0; $somaVenda = 0; $somaCompra = 0; @endphp @foreach($data as $key => $item) @php $somaEstoque += (float)$item->estoqueTotal($local_id); $somaVenda += (float)$item->estoqueTotal($local_id) * $item->valor_unitario; $somaCompra += (float)$item->estoqueTotal($local_id) * $item->valor_compra; @endphp @endforeach
Produto Vl. venda Vl. compra Dt. cadastro Estoque total
{{ $item->nome }} {{ __moeda($item->valor_unitario) }} {{ __moeda($item->valor_compra) }} {{ __data_pt($item->created_at) }} {{ $item->estoqueTotal($local_id) }}
Total de itens no estoque: {{ $somaEstoque }} Total valor de venda: R$ {{ __moeda($somaVenda) }} Total valor de compra: R$ {{ __moeda($somaCompra) }} @endsection