@php $vals = getAccountTotals($account->id, $allAccounts, $directBalances); $net = round(($vals['o_d'] + $vals['c_d']) - ($vals['o_c'] + $vals['c_c']), 2); $children = $allAccounts->where('parent_account_number', $account->id); $hasChildren = $children->isNotEmpty(); // تحديد التصميم واللون بحسب مستوى الحساب (Level) $rowStyle = ''; $icon = ''; $indent = ''; if ($level == 0) { // الحساب الرئيسي (المستوى الأول) - لون خلفية مميز وخط عريض $rowStyle = 'background-color: #e8f4f8; font-weight: bold; color: #2c3e50; font-size: 14px;'; $icon = ''; } elseif ($level == 1) { // الحساب الأب (المستوى الثاني) $rowStyle = 'background-color: #f9fbfd; font-weight: bold; color: #34495e;'; $icon = ''; $indent = ' '; } else { // الحساب الابن (المستوى الثالث وما فروعها) $rowStyle = 'background-color: #ffffff; color: #555555;'; $icon = ''; $indent = str_repeat(' ', $level); } @endphp