@extends('layouts.app') @php $locale = app()->getLocale(); $isRtl = $locale === 'ar'; $currency = \App\Models\Setting::currencyLabel($locale); @endphp @section('title', $isRtl ? 'قائمة الدخل' : 'Income Statement') @section('content')

{{ $isRtl ? 'قائمة الدخل' : 'Income Statement' }}

{{ $isRtl ? 'الإيرادات والمصروفات وصافي الدخل' : 'Revenue, expenses and net income' }}

{{ $isRtl ? 'الإيرادات' : 'Revenues' }}

@forelse($revenues as $row) @empty @endforelse
{{ $isRtl ? 'الحساب' : 'Account' }} {{ $isRtl ? 'الإجمالي' : 'Total' }}

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

{{ number_format((float)$row['total'], 2) }}
{{ $isRtl ? 'لا توجد بيانات' : 'No data' }}
{{ $isRtl ? 'إجمالي الإيرادات' : 'Total Revenue' }} {{ number_format((float)$totalRevenue, 2) }} {{ $currency }}

{{ $isRtl ? 'المصروفات' : 'Expenses' }}

@forelse($expenses as $row) @empty @endforelse
{{ $isRtl ? 'الحساب' : 'Account' }} {{ $isRtl ? 'الإجمالي' : 'Total' }}

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

{{ number_format((float)$row['total'], 2) }}
{{ $isRtl ? 'لا توجد بيانات' : 'No data' }}
{{ $isRtl ? 'إجمالي المصروفات' : 'Total Expenses' }} {{ number_format((float)$totalExpenses, 2) }} {{ $currency }}

{{ $isRtl ? 'صافي الدخل' : 'Net Income' }}

{{ number_format((float)$netIncome, 2) }} {{ $currency }}

@endsection