@php $totalCost = 0; @endphp @foreach($activa as $item) @php $itemCost = 0; @endphp @foreach($item->childs as $itemChild) @php $itemCost += floatval($itemChild->cost); @endphp @endforeach @php $totalCost += floatval($itemCost); @endphp @endforeach
AKTIVA
{{ $item->name }}
{{$itemChild->name}} {{number_format($itemChild->cost ?? 0,2,',',".")}}
Total {{number_format($item->cost ?? 0,2,',',".")}}
TOTAL AKTIVA {{number_format($totalCost ?? 0,2,',',".")}}
@php $totalProfit = 0; @endphp @foreach($passiva as $item) @php $itemProfit = 0; @endphp @foreach($item->childs as $itemChild) @php $itemProfit += floatval($itemChild->profit); @endphp @endforeach @php $totalProfit += floatval($itemProfit); @endphp @endforeach
PASSIVA
{{ $item->name }}
{{$itemChild->name}} {{number_format($itemChild->profit ?? 0,2,',',".")}}
Total {{number_format($item->profit ?? 0,2,',',".")}}
TOTAL PASSIVA {{number_format($totalProfit ?? 0,2,',',".")}}