@extends('layouts.master') @section('title') {{ __('home.tree') }} @stop @php $lp = Mcamara\LaravelLocalization\Facades\LaravelLocalization::getCurrentLocale(); $ar = app()->getLocale() == 'ar'; // لون لكل نوع حساب: أصول / خصوم / إيرادات / مصروفات / حقوق ملكية $typeColors = [1 => '#16A34A', 2 => '#0D9488', 3 => '#2563EB', 4 => '#EA580C', 5 => '#7C3AED', 6 => '#DB2777']; @endphp @section('css') @endsection @section('content')

{{ __('home.tree') }}

{{ $ar ? 'كل الحسابات مرتبة في شجرة مع إجمالي الأرصدة لكل مستوى' : 'All accounts in a tree with rolled-up balances' }}

{{ $stats['all'] }}{{ $ar ? 'إجمالي الحسابات' : 'Accounts' }}
{{ $stats['parents'] }}{{ $ar ? 'حسابات رئيسية (لها فروع)' : 'Parent accounts' }}
{{ number_format($grand[0], 2) }}{{ $ar ? 'إجمالي المدين' : 'Total debit' }}
{{ number_format($grand[1], 2) }}{{ $ar ? 'إجمالي الدائن' : 'Total credit' }}
{{ $ar ? 'الكل' : 'All' }} @foreach ($types as $tp) {{ $ar ? $tp->name_ar : ($tp->name_en ?: $tp->name_ar) }} @endforeach
{{ $ar ? 'رقم الحساب / اسم الحساب' : 'Account' }}
{{ __('home.debit') }}
{{ __('home.credit') }}
{{ __('home.current balance') }}
{{ $ar ? 'إجراءات' : 'Actions' }}
@include('acountes._tree_node', ['pid' => 'root', 'lvl' => 0, 'rootType' => null]) @if ($stats['all'] == 0)
{{ $ar ? 'مفيش أي حسابات متسجلة في قاعدة البيانات دي' : 'No accounts in this database' }}
{{ $ar ? 'جدول الحسابات (financial_accounts) وجدول أنواع الحسابات فاضيين على السيرفر.' : 'financial_accounts and account types tables are empty.' }}
{{ $ar ? 'إضافة أول حساب' : 'Add first account' }}
@endif
{{ $ar ? 'مفيش حسابات مطابقة للبحث' : 'No matching accounts' }}
@php $gn = round($grand[0] - $grand[1], 2); @endphp
{{ $ar ? 'الإجمالي' : 'Total' }}
{{ number_format($grand[0], 2) }}
{{ number_format($grand[1], 2) }}
{{ number_format(abs($gn), 2) }}
@endsection @section('js') @endsection