@foreach($data['liabilities']['items'] ?? [] as $item)
@php
$itemData = (array)$item;
$childrenArray = $itemData['children'] ?? [];
@endphp
| {{ $itemData['account_name'] ?? '-' }} |
{{ number_format($itemData['balance'] ?? 0, 2) }} |
@if(is_array($childrenArray) && count($childrenArray) > 0)
@foreach($childrenArray as $child)
@php
$childData = (array)$child;
@endphp
| {{ $childData['account_name'] ?? '-' }} |
{{ number_format($childData['balance'] ?? 0, 2) }} |
@endforeach
@endif
@endforeach
| Total Liabilities |
{{ number_format($data['liabilities']['total'] ?? 0, 2) }} |