@if(!empty($assets) && count($assets) > 0)

I declare that I am the sole and absolute owner of the following assets, which I hereby give, devise and bequeath as follows:

@foreach($assets as $index => $asset)

{{ $index + 1 }}. I give and bequeath my {{ ucfirst(str_replace('_', ' ', $asset['main_category'] ?? 'Asset')) }} ({{ $asset['sub_category'] ?? 'N/A' }}) @if(!empty($asset['description'])) - {{ $asset['description'] }} @endif @if(!empty($asset['address'])) located at {{ $asset['address'] }} @endif @if(!empty($asset['value'])) valued at RM {{ number_format($asset['value'], 2) }} @endif with a monthly income of RM {{ number_format($asset['monthly_income'] ?? 0, 2) }}.

@if(!empty($asset['ownership_type']) && strtolower($asset['ownership_type']) === 'joint')

This asset is jointly owned @if(!empty($asset['ownership_percentage'])) (my share: {{ $asset['ownership_percentage'] }}%) @endif @if(!empty($asset['co_owners'])) with {{ $asset['co_owners'] }} @endif.

@endif @if(isset($asset['beneficiaries']) && !empty($asset['beneficiaries']))

This asset shall be distributed to the following beneficiaries:

@foreach($asset['beneficiaries'] as $beneficiary)

{{ strtoupper($beneficiary['full_name'] ?? 'N/A') }} (NRIC: {{ $beneficiary['ic_number'] ?? 'N/A' }}), {{ ucfirst($beneficiary['relationship'] ?? 'N/A') }}, entitled to {{ $beneficiary['percentage'] ?? 0 }}% share thereof. Contact: {{ $beneficiary['email'] ?? 'N/A' }}, {{ $beneficiary['phone'] ?? 'N/A' }}. Address: {{ $beneficiary['address'] ?? 'N/A' }}.

@endforeach @endif
@endforeach

The total aggregate value of all assets bequeathed herein is estimated at RM {{ number_format($totalAssetValue, 2) }}.

@else

[No assets specified]

@endif