@php $netProfit = $stats['receipts']['total'] + $stats['transfers']['total'] - $stats['expenses']['total']; @endphp {{-- ═══════════════════════════ HEADER ═══════════════════════════ --}}
التقرير السنوي الشامل
ملخص أداء نظام إدارة الإقامات
{{ $year }}
العام الميلادي
تاريخ إنشاء التقرير
{{ $generatedAt }}
{{-- ═══════════════════════════ KPI CARDS ═══════════════════════════ --}} {{-- Receipts --}} {{-- Transfers --}} {{-- Expenses --}} {{-- Net Profit --}}
إجمالي الاستلام
{{ 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: Statistics ── --}} {{-- ── RIGHT: Monthly Breakdown ── --}}
إحصائيات الملفات والعمليات
الإقامات
إجمالي الإقامات المسجلة {{ number_format($stats['iqamas']['total']) }}
إقامات مضافة هذا العام {{ number_format($stats['iqamas']['new']) }}
عمال الشركات
الإجمالي المسجل {{ number_format($stats['company_workers']['total']) }}
مضافون هذا العام {{ number_format($stats['company_workers']['new']) }}
العمالة المنزلية
الإجمالي المسجل {{ number_format($stats['domestic_workers']['total']) }}
مضافون هذا العام {{ number_format($stats['domestic_workers']['new']) }}
التأشيرات
إجمالي التأشيرات {{ number_format($stats['visas']['total']) }}
عدد الأشخاص الجدد {{ number_format($stats['visas']['quantity']) }}
المهام
مهام مُسجَّلة هذا العام {{ number_format($stats['tasks']['created']) }}
مهام مكتملة {{ number_format($stats['tasks']['completed']) }}
@php $totalR = 0; $totalT = 0; $totalE = 0; @endphp @foreach($monthlyBreakdown as $i => $month) @php $mNet = $month['receipts'] + $month['transfers'] - $month['expenses']; $totalR += $month['receipts']; $totalT += $month['transfers']; $totalE += $month['expenses']; $altBg = ($i % 2 === 1) ? 'background-color:#f8fafc;' : ''; @endphp @endforeach
التفصيل الشهري للمالية — {{ $year }}
الشهر الاستلام (ر.س) الحوالات (ر.س) المصروفات (ر.س) الصافي (ر.س)
{{ $month['month'] }} {{ number_format($month['receipts'], 0) }} {{ number_format($month['transfers'], 0) }} {{ number_format($month['expenses'], 0) }} {{ number_format($mNet, 0) }}
الإجمالي السنوي {{ number_format($totalR, 0) }} {{ number_format($totalT, 0) }} {{ number_format($totalE, 0) }} {{ number_format($totalR + $totalT - $totalE, 0) }}
{{-- ═══════════════════════════ FOOTER ═══════════════════════════ --}}
نظام إدارة الإقامات — التقرير السنوي الشامل {{ $year }}  |  {{ $generatedAt }}
.page-header { background: #1a2634; color: white; padding: 0; } .page-header-inner { display: table; width: 100%; } .header-brand { display: table-cell; vertical-align: middle; padding: 18px 22px; border-left: 5px solid #71dd37; } .header-brand h1 { font-size: 22px; font-weight: bold; color: #fff; margin: 0 0 4px 0; } .header-brand p { font-size: 10px; color: rgba(255,255,255,0.55); margin: 0; } .header-year-box { display: table-cell; vertical-align: middle; text-align: center; width: 140px; padding: 18px 22px; background: #71dd37; color: #1a2634; } .header-year-box .year-num { font-size: 42px; font-weight: bold; line-height: 1; } .header-year-box .year-label { font-size: 9px; margin-top: 3px; opacity: 0.75; } .header-meta { display: table-cell; vertical-align: middle; text-align: center; width: 160px; padding: 18px 16px; background: rgba(255,255,255,0.04); } .header-meta .meta-label { font-size: 8px; color: rgba(255,255,255,0.45); margin-bottom: 4px; } .header-meta .meta-value { font-size: 10px; color: rgba(255,255,255,0.85); } /* ===== KPI ROW ===== */ .kpi-row { display: table; width: 100%; border-collapse: separate; border-spacing: 0; } .kpi-cell { display: table-cell; width: 25%; padding: 12px 10px 12px 0; vertical-align: top; } .kpi-cell:last-child { padding-left: 0; padding-right: 0; } .kpi-box { border-radius: 6px; padding: 14px 16px; text-align: center; border-top: 4px solid #ccc; } .kpi-box.kpi-receipts { border-top-color: #71dd37; background: #f6fff2; } .kpi-box.kpi-transfers { border-top-color: #03c3ec; background: #f0fbff; } .kpi-box.kpi-expenses { border-top-color: #ff3e1d; background: #fff5f4; } .kpi-box.kpi-net { border-top-color: #ffab00; background: #233446; } .kpi-label { font-size: 9px; color: #888; margin-bottom: 6px; } .kpi-box.kpi-net .kpi-label { color: rgba(255,255,255,0.55); } .kpi-value { font-size: 20px; font-weight: bold; } .kpi-box.kpi-receipts .kpi-value { color: #28a745; } .kpi-box.kpi-transfers .kpi-value { color: #0288d1; } .kpi-box.kpi-expenses .kpi-value { color: #e53935; } .kpi-box.kpi-net .kpi-value { color: #ffab00; } .kpi-box.kpi-net.is-negative .kpi-value { color: #ff3e1d; } .kpi-currency { font-size: 8px; color: #aaa; margin-top: 3px; } .kpi-box.kpi-net .kpi-currency { color: rgba(255,255,255,0.35); } /* ===== BODY LAYOUT ===== */ .body-wrap { padding: 0 14px 14px 14px; } .two-col { display: table; width: 100%; border-collapse: separate; border-spacing: 0 0; } .col-stats { display: table-cell; width: 36%; vertical-align: top; padding-left: 10px; } .col-monthly { display: table-cell; width: 64%; vertical-align: top; } /* ===== SECTION HEADER ===== */ .section-head { font-size: 11px; font-weight: bold; color: #fff; background: #233446; padding: 7px 12px; border-radius: 4px 4px 0 0; margin-bottom: 0; } /* ===== STATS LIST ===== */ .stats-table { width: 100%; border-collapse: collapse; border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 4px 4px; overflow: hidden; } .stats-table tr:nth-child(even) td { background: #f8fafc; } .stats-table td { padding: 7px 11px; border-bottom: 1px solid #edf2f7; font-size: 9.5px; } .stats-table td:last-child { text-align: left; font-weight: bold; width: 70px; } .stats-table .group-header td { background: #f1f5f9; color: #475569; font-size: 8.5px; padding: 5px 11px; font-weight: bold; } .badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 9.5px; font-weight: bold; text-align: center; } .bg-green { background: #dcfce7; color: #166534; } .bg-blue { background: #dbeafe; color: #1e40af; } .bg-orange { background: #ffedd5; color: #9a3412; } .bg-purple { background: #ede9fe; color: #5b21b6; } .bg-red { background: #fee2e2; color: #991b1b; } .bg-teal { background: #ccfbf1; color: #134e4a; } .bg-navy { background: #e0e7ff; color: #3730a3; } /* ===== MONTHLY TABLE ===== */ table.monthly-tbl { width: 100%; border-collapse: collapse; border: 1px solid #e2e8f0; border-top: none; } table.monthly-tbl thead th { background: #2d4a5e; color: white; padding: 7px 10px; text-align: center; font-size: 9.5px; border: 1px solid #233446; } table.monthly-tbl tbody td { padding: 6px 10px; text-align: center; font-size: 9px; border: 1px solid #e9ecef; color: #4a5568; } table.monthly-tbl tbody tr:nth-child(even) td { background: #f8fafc; } table.monthly-tbl tbody td.month-name { font-weight: bold; color: #1a2634; text-align: right; padding-right: 14px; } table.monthly-tbl tbody td.col-receipts { color: #16a34a; } table.monthly-tbl tbody td.col-transfers { color: #0284c7; } table.monthly-tbl tbody td.col-expenses { color: #dc2626; } table.monthly-tbl tbody td.positive { color: #16a34a; font-weight: bold; } table.monthly-tbl tbody td.negative { color: #dc2626; font-weight: bold; } table.monthly-tbl tfoot td { background: #71dd37; color: #1a2634; font-weight: bold; padding: 7px 10px; text-align: center; font-size: 9.5px; border: 1px solid #5bc523; } /* ===== FOOTER ===== */ .page-footer { display: table; width: 100%; border-top: 3px solid #71dd37; padding: 8px 14px; margin-top: 12px; } .footer-text { display: table-cell; font-size: 8px; color: #94a3b8; vertical-align: middle; } .footer-text:last-child { text-align: left; } @php $netProfit = $stats['receipts']['total'] - $stats['transfers']['total'] - $stats['expenses']['total']; @endphp
إجمالي الاستلام
{{ 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) }}
ريال سعودي
إحصائيات الملفات والعمليات
الإقامات
إجمالي الإقامات المسجلة {{ number_format($stats['iqamas']['total']) }}
إقامات مضافة هذا العام {{ number_format($stats['iqamas']['new']) }}
العمالة
عمال الشركات (الإجمالي) {{ number_format($stats['company_workers']['total']) }}
عمال شركات جدد هذا العام {{ number_format($stats['company_workers']['new']) }}
العمالة المنزلية (الإجمالي) {{ number_format($stats['domestic_workers']['total']) }}
عمالة منزلية جديدة هذا العام {{ number_format($stats['domestic_workers']['new']) }}
التأشيرات
إجمالي التأشيرات {{ number_format($stats['visas']['total']) }}
تأشيرات جديدة (عدد الأشخاص) {{ number_format($stats['visas']['quantity']) }}
المهام
مهام مُسجَّلة هذا العام {{ number_format($stats['tasks']['created']) }}
مهام مكتملة {{ number_format($stats['tasks']['completed']) }}
التفصيل الشهري للمالية — {{ $year }}
@php $totalR = 0; $totalT = 0; $totalE = 0; @endphp @foreach($monthlyBreakdown as $month) @php $mNet = $month['receipts'] - $month['transfers'] - $month['expenses']; $totalR += $month['receipts']; $totalT += $month['transfers']; $totalE += $month['expenses']; @endphp @endforeach
الشهر الاستلام (ر.س) الحوالات (ر.س) المصروفات (ر.س) الصافي (ر.س)
{{ $month['month'] }} {{ number_format($month['receipts'], 0) }} {{ number_format($month['transfers'], 0) }} {{ number_format($month['expenses'], 0) }} {{ number_format($mNet, 0) }}
الإجمالي السنوي {{ number_format($totalR, 0) }} {{ number_format($totalT, 0) }} {{ number_format($totalE, 0) }} {{ number_format($totalR - $totalT - $totalE, 0) }}