@php $netProfit = $stats['receipts']['total'] + $stats['transfers']['total'] - $stats['expenses']['total']; @endphp {{-- ═══════════════════ HEADER ═══════════════════ --}}
التقرير الشهري الشامل
ملخص أداء نظام إدارة الإقامات
{{ $period }}
الفترة الزمنية
تاريخ إنشاء التقرير
{{ $generatedAt }}
{{-- ═══════════════════ FINANCIAL KPIs ═══════════════════ --}}
إجمالي الاستلام
{{ number_format($stats['receipts']['total'], 0) }}
ر.س  |  {{ $stats['receipts']['count'] }} عملية
إجمالي الحوالات
{{ number_format($stats['transfers']['total'], 0) }}
ر.س  |  {{ $stats['transfers']['count'] }} عملية
إجمالي المصروفات
{{ number_format($stats['expenses']['total'], 0) }}
ر.س  |  {{ $stats['expenses']['count'] }} عملية
صافي الأرباح
{{ number_format($netProfit, 0) }}
ريال سعودي
{{-- ═══════════════════ BODY: TWO COLUMNS ═══════════════════ --}} {{-- ── LEFT COLUMN ── --}} {{-- ── RIGHT COLUMN: Financial Details ── --}}
{{-- الإقامات والعمالة --}}
الإقامات والعمالة
{{ number_format($stats['iqamas']['total']) }}
إجمالي الإقامات
{{ number_format($stats['iqamas']['new']) }}
إقامات جديدة
{{ number_format($stats['company_workers']['total']) }}
عمال الشركات
{{ number_format($stats['domestic_workers']['total']) }}
العمالة المنزلية
عمال شركات جدد
{{ number_format($stats['company_workers']['new']) }}
عمالة منزلية جديدة
{{ number_format($stats['domestic_workers']['new']) }}
{{-- التأشيرات --}}
التأشيرات
{{ number_format($stats['visas']['total']) }}
إجمالي التأشيرات
{{ number_format($stats['visas']['new']) }}
تأشيرات جديدة
{{ number_format($stats['visas']['quantity']) }}
عدد الأشخاص
{{-- المهام --}} @if($stats['tasks']['created'] > 0) @php $completionRate = round(($stats['tasks']['completed'] / $stats['tasks']['created']) * 100); @endphp @endif
المهام
{{ number_format($stats['tasks']['created']) }}
مهام مسجلة
{{ number_format($stats['tasks']['completed']) }}
مهام مكتملة
نسبة الإنجاز
{{ $completionRate }}%
{{-- Receipts row --}} {{-- Transfers row --}} {{-- Expenses row --}} {{-- Net --}}
التفاصيل المالية للفترة
الاستلام
الإجمالي المستلم {{ $stats['receipts']['count'] }} عملية {{ number_format($stats['receipts']['total'], 0) }} ر.س
المبلغ المدفوع {{ number_format($stats['receipts']['paid'], 0) }} ر.س
الحوالات
إجمالي الحوالات {{ $stats['transfers']['count'] }} عملية {{ number_format($stats['transfers']['total'], 0) }} ر.س
المصروفات
إجمالي المصروفات {{ $stats['expenses']['count'] }} عملية {{ number_format($stats['expenses']['total'], 0) }} ر.س
صافي الأرباح للفترة {{ number_format($netProfit, 0) }} ر.س
{{-- ═══════════════════ FOOTER ═══════════════════ --}}
نظام إدارة الإقامات — التقرير الشهري الشامل {{ $period }}  |  {{ $generatedAt }}
.header { text-align: center; border-bottom: 3px solid #696cff; padding-bottom: 20px; margin-bottom: 30px; } .header h1 { color: #696cff; margin: 0; font-size: 24px; } .header .period { color: #666; font-size: 16px; margin-top: 5px; } .header .generated { color: #999; font-size: 10px; margin-top: 10px; } .section { margin-bottom: 25px; } .section-title { background: linear-gradient(135deg, #696cff, #5a5dc4); color: white; padding: 10px 15px; border-radius: 8px; font-size: 14px; font-weight: bold; margin-bottom: 15px; } .stats-grid { display: table; width: 100%; border-collapse: collapse; } .stats-row { display: table-row; } .stat-box { display: table-cell; width: 25%; padding: 15px; text-align: center; border: 1px solid #eee; background: #fafafa; } .stat-box .value { font-size: 24px; font-weight: bold; color: #696cff; } .stat-box .label { color: #666; font-size: 11px; margin-top: 5px; } .stat-box.success .value { color: #71dd37; } .stat-box.warning .value { color: #ffab00; } .stat-box.danger .value { color: #ff3e1d; } .stat-box.info .value { color: #03c3ec; } table.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; } table.data-table th { background: #f8f9fa; border: 1px solid #ddd; padding: 8px; font-weight: bold; text-align: right; } table.data-table td { border: 1px solid #ddd; padding: 8px; text-align: right; } .footer { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; color: #999; font-size: 10px; } .highlight-box { background: linear-gradient(135deg, #f8f9fa, #fff); border: 1px solid #eee; border-radius: 8px; padding: 15px; margin-bottom: 15px; } .finance-summary { display: table; width: 100%; } .finance-item { display: table-cell; width: 33.33%; text-align: center; padding: 15px; } .finance-item .amount { font-size: 20px; font-weight: bold; } .finance-item.receipts .amount { color: #71dd37; } .finance-item.transfers .amount { color: #03c3ec; } .finance-item.expenses .amount { color: #ff3e1d; }

{{ $title }}

{{ $period }}
تم إنشاء التقرير في: {{ $generatedAt }}
إحصائيات الإقامات والعمالة
{{ number_format($stats['iqamas']['total']) }}
إجمالي الإقامات
{{ number_format($stats['iqamas']['new']) }}
إقامات جديدة
{{ number_format($stats['company_workers']['total']) }}
عمال الشركات
{{ number_format($stats['domestic_workers']['total']) }}
العمالة المنزلية
التأشيرات
{{ number_format($stats['visas']['total']) }}
إجمالي التأشيرات
{{ number_format($stats['visas']['new']) }}
تأشيرات جديدة
{{ number_format($stats['visas']['quantity']) }}
الكمية
الملخص المالي
{{ number_format($stats['receipts']['total'], 2) }} ر.س
الاستلام ({{ $stats['receipts']['count'] }} عملية)
{{ number_format($stats['transfers']['total'], 2) }} ر.س
الحوالات ({{ $stats['transfers']['count'] }} عملية)
{{ number_format($stats['expenses']['total'], 2) }} ر.س
المصروفات ({{ $stats['expenses']['count'] }} عملية)
المهام
{{ number_format($stats['tasks']['created']) }}
مهام جديدة
{{ number_format($stats['tasks']['completed']) }}
مهام مكتملة