@foreach($accountsTree as $mainAcc)
@php $bal0 = $balancesMap[$mainAcc->id] ?? 0.0; @endphp
| {{ $mainAcc->account_code }} |
{{ $mainAcc->name }}
|
{{ $mainAcc->account_group ?? 'عام' }} |
{{ $mainAcc->classification }} |
{{ $mainAcc->account_nature === 'debit' ? 'مدين' : 'دائن' }}
|
شيكل |
رئيس عام |
{{ number_format((float)$bal0, 2) }} ₪
|
— |
@foreach($mainAcc->children as $sub1)
@php $bal1 = $balancesMap[$sub1->id] ?? 0.0; @endphp
| ↳ {{ $sub1->account_code }} |
{{ $sub1->name }} |
{{ $sub1->account_group ?? 'عام' }} |
{{ $sub1->classification }} |
{{ $sub1->account_nature === 'debit' ? 'مدين' : 'دائن' }} |
{{ $sub1->currency ?? 'شيكل' }} |
{{ $sub1->is_postable ? 'فرعي' : 'تجميعي' }} |
{{ number_format((float)$bal1, 2) }} ₪
|
@if($sub1->is_postable)
كشف
@else
—
@endif
|
@foreach($sub1->children as $sub2)
@php $bal2 = $balancesMap[$sub2->id] ?? 0.0; @endphp
| ↳↳ {{ $sub2->account_code }} |
{{ $sub2->name }}
@if($sub2->national_id)
هوية: {{ $sub2->national_id }}
@endif
|
{{ $sub2->account_group ?? 'عام' }} |
{{ $sub2->classification }} |
{{ $sub2->account_nature === 'debit' ? 'مدين' : 'دائن' }}
|
{{ $sub2->currency ?? 'شيكل' }} |
@if($sub2->is_postable)
✓ فرعي
@else
تجميعي
@endif
|
{{ number_format((float)$bal2, 2) }} ₪
|
@if($sub2->is_postable)
كشف
@else
—
@endif
|
@foreach($sub2->children as $sub3)
@php $bal3 = $balancesMap[$sub3->id] ?? 0.0; @endphp
| ↳↳↳ {{ $sub3->account_code }} |
{{ $sub3->name }}
@if($sub3->national_id)
هوية: {{ $sub3->national_id }}
@endif
|
{{ $sub3->account_group ?? 'عام' }} |
{{ $sub3->classification }} |
{{ $sub3->account_nature === 'debit' ? 'مدين' : 'دائن' }}
|
{{ $sub3->currency ?? 'شيكل' }} |
✓ فرعي
|
{{ number_format((float)$bal3, 2) }} ₪
|
كشف
|
@endforeach
@endforeach
@endforeach
@endforeach