@extends('layouts.app') @php $locale = app()->getLocale(); $isRtl = $locale === 'ar'; $currency = \App\Models\Setting::currencyLabel($locale); @endphp @section('title', $isRtl ? 'ميزان المراجعة' : 'Trial Balance') @section('content')

{{ $isRtl ? 'ميزان المراجعة' : 'Trial Balance' }}

{{ $isRtl ? 'حتى تاريخ محدد' : 'As of a specific date' }}

@forelse($accounts as $row) @empty @endforelse
{{ $isRtl ? 'الكود' : 'Code' }} {{ $isRtl ? 'الحساب' : 'Account' }} {{ $isRtl ? 'مدين' : 'Debit' }} {{ $isRtl ? 'دائن' : 'Credit' }}
{{ $row['account']->code ?? '—' }}

{{ $isRtl ? ($row['account']->name_ar ?: $row['account']->name) : ($row['account']->name ?? '—') }}

{{ $row['account']->type ?? '' }}

{{ number_format((float)$row['debit'], 2) }} {{ number_format((float)$row['credit'], 2) }}
{{ $isRtl ? 'لا توجد بيانات' : 'No data' }}
{{ $isRtl ? 'الإجمالي' : 'Total' }} {{ number_format((float)($totals['debit'] ?? 0), 2) }} {{ $currency }} {{ number_format((float)($totals['credit'] ?? 0), 2) }} {{ $currency }}
@endsection