@foreach (($this->branches ?? []) as $branch) @endforeach @forelse (($this->tableData ?? []) as $section) {{-- Section header (main AccountTree) --}} {{-- Rows (subAccounts) --}} @foreach (($section['subAccounts'] ?? []) as $row) @foreach (($this->branches ?? []) as $branch) @php $value = $row['branch_calcs'][$branch['id']] ?? 0; $isNonZero = is_numeric($value) && abs((float) $value) > 0; @endphp @endforeach @endforeach {{-- Section totals (per branch column + row totals) --}} @foreach (($this->branches ?? []) as $branch) @php $value = $section['totals']['branch_totals'][$branch['id']] ?? 0; $isNonZero = is_numeric($value) && abs((float) $value) > 0; @endphp @endforeach @empty @endforelse @if(!empty($this->tableData ?? [])) {{-- Grand totals --}} @foreach (($this->branches ?? []) as $branch) @php $value = $this->grandTotals['branch_totals'][$branch['id']] ?? 0; $isNonZero = is_numeric($value) && abs((float) $value) > 0; @endphp @endforeach @endif
اسم الحساب {{ $branch['name'] }} الإجمالي (كل الفروع) إجمالي مدين إجمالي دائن
{{ $section['account_name'] ?? '-' }}
{{ $row['account_name'] ?? '-' }} @if ($isNonZero) {{ number_format((float) $value, 2) }} @else {{ is_numeric($value) ? number_format((float) $value, 2) : $value }} @endif @php $rowTotal = (float) ($row['row_total'] ?? 0); @endphp @if (abs($rowTotal) > 0) {{ number_format($rowTotal, 2) }} @else {{ number_format($rowTotal, 2) }} @endif @php $rowDebit = (float) ($row['debit_total'] ?? 0); @endphp @if (abs($rowDebit) > 0) {{ number_format($rowDebit, 2) }} @else {{ number_format($rowDebit, 2) }} @endif @php $rowCredit = (float) ($row['credit_total'] ?? 0); @endphp @if (abs($rowCredit) > 0) {{ number_format($rowCredit, 2) }} @else {{ number_format($rowCredit, 2) }} @endif
إجمالي القسم @if ($isNonZero) {{ number_format((float) $value, 2) }} @else {{ number_format((float) $value, 2) }} @endif @php $sectionRowTotal = (float) ($section['totals']['row_total'] ?? 0); @endphp @if (abs($sectionRowTotal) > 0) {{ number_format($sectionRowTotal, 2) }} @else {{ number_format($sectionRowTotal, 2) }} @endif @php $sectionDebitTotal = (float) ($section['totals']['debit_total'] ?? 0); @endphp @if (abs($sectionDebitTotal) > 0) {{ number_format($sectionDebitTotal, 2) }} @else {{ number_format($sectionDebitTotal, 2) }} @endif @php $sectionCreditTotal = (float) ($section['totals']['credit_total'] ?? 0); @endphp @if (abs($sectionCreditTotal) > 0) {{ number_format($sectionCreditTotal, 2) }} @else {{ number_format($sectionCreditTotal, 2) }} @endif
لا توجد بيانات لعرضها.
الإجمالي العام @if ($isNonZero) {{ number_format((float) $value, 2) }} @else {{ number_format((float) $value, 2) }} @endif @php $grandRowTotal = (float) ($this->grandTotals['row_total'] ?? 0); @endphp @if (abs($grandRowTotal) > 0) {{ number_format($grandRowTotal, 2) }} @else {{ number_format($grandRowTotal, 2) }} @endif @php $grandDebitTotal = (float) ($this->grandTotals['debit_total'] ?? 0); @endphp @if (abs($grandDebitTotal) > 0) {{ number_format($grandDebitTotal, 2) }} @else {{ number_format($grandDebitTotal, 2) }} @endif @php $grandCreditTotal = (float) ($this->grandTotals['credit_total'] ?? 0); @endphp @if (abs($grandCreditTotal) > 0) {{ number_format($grandCreditTotal, 2) }} @else {{ number_format($grandCreditTotal, 2) }} @endif