@php $net = $summary['totalReceipts'] + $summary['totalTransfers'] - $summary['totalExpenses']; @endphp {{-- HEADER --}}
التقرير المالي التفصيلي
ملخص حركة الأموال والمعاملات المالية
{{ $period }}
الفترة الزمنية
تاريخ إنشاء التقرير
{{ $generatedAt }}
{{-- KPI CARDS --}}
إجمالي الاستلام
{{ number_format($summary['totalReceipts'], 0) }}
ر.س  |  {{ $receipts->count() }} عملية
إجمالي الحوالات
{{ number_format($summary['totalTransfers'], 0) }}
ر.س  |  {{ $transfers->count() }} عملية
إجمالي المصروفات
{{ number_format($summary['totalExpenses'], 0) }}
ر.س  |  {{ $expenses->count() }} عملية
الصافي
{{ number_format($net, 0) }}
ريال سعودي
{{-- RECEIPTS TABLE --}} @if($receipts->count() > 0) @foreach($receipts as $i => $receipt) @endforeach @else @endif
الاستلام — {{ $receipts->count() }} عملية
# رقم الإيصال التاريخ الوصف الإجمالي (ر.س) المدفوع (ر.س) المتبقي (ر.س)
{{ $i+1 }} {{ $receipt->receipt_number ?? '-' }} {{ $receipt->receipt_date?->format('d/m/Y') }} {{ \Str::limit($receipt->description ?? '-', 45) }} {{ number_format($receipt->total_amount, 0) }} {{ number_format($receipt->paid_amount, 0) }} {{ number_format($receipt->remaining_amount, 0) }}
الإجمالي {{ number_format($receipts->sum('total_amount'), 0) }} {{ number_format($receipts->sum('paid_amount'), 0) }} {{ number_format($receipts->sum('remaining_amount'), 0) }}
لا توجد عمليات استلام في هذه الفترة
{{-- TRANSFERS TABLE --}} @if($transfers->count() > 0) @foreach($transfers as $i => $transfer) @endforeach @else @endif
الحوالات — {{ $transfers->count() }} عملية
# التاريخ الوجهة المستفيد الوصف المبلغ (ر.س)
{{ $i+1 }} {{ $transfer->transfer_date?->format('d/m/Y') }} {{ $transfer->transfer_destination ?? '-' }} {{ $transfer->beneficiary_name ?? '-' }} {{ \Str::limit($transfer->description ?? '-', 40) }} {{ number_format($transfer->amount, 0) }}
الإجمالي {{ number_format($transfers->sum('amount'), 0) }}
لا توجد حوالات في هذه الفترة
{{-- EXPENSES TABLE --}} @if($expenses->count() > 0) @foreach($expenses as $i => $expense) @endforeach @else @endif
المصروفات — {{ $expenses->count() }} عملية
# التاريخ طريقة الدفع الوصف المبلغ (ر.س)
{{ $i+1 }} {{ $expense->expense_date?->format('d/m/Y') }} {{ $expense->payment_method ?? '-' }} {{ \Str::limit($expense->description ?? '-', 50) }} {{ number_format($expense->amount, 0) }}
الإجمالي {{ number_format($expenses->sum('amount'), 0) }}
لا توجد مصروفات في هذه الفترة
{{-- FOOTER --}}
نظام إدارة الإقامات — التقرير المالي التفصيلي {{ $period }}  |  {{ $generatedAt }}
.header { text-align: center; border-bottom: 3px solid #ffab00; padding-bottom: 15px; margin-bottom: 20px; } .header h1 { color: #ffab00; margin: 0; font-size: 22px; } .header .period { color: #666; font-size: 14px; margin-top: 5px; } .header .generated { color: #999; font-size: 9px; margin-top: 8px; } .summary-box { background: linear-gradient(135deg, #233446, #1a2634); color: white; border-radius: 10px; padding: 15px; margin-bottom: 20px; } .summary-grid { display: table; width: 100%; } .summary-item { display: table-cell; width: 25%; text-align: center; padding: 10px; } .summary-item .value { font-size: 20px; font-weight: bold; } .summary-item.receipts .value { color: #71dd37; } .summary-item.transfers .value { color: #03c3ec; } .summary-item.expenses .value { color: #ff3e1d; } .summary-item.net .value { color: #ffab00; } .summary-item .label { font-size: 10px; opacity: 0.8; margin-top: 3px; } .section { margin-bottom: 20px; } .section-title { padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: bold; margin-bottom: 10px; color: white; } .section-title.receipts { background: linear-gradient(135deg, #71dd37, #5bc523); } .section-title.transfers { background: linear-gradient(135deg, #03c3ec, #02a8cc); } .section-title.expenses { background: linear-gradient(135deg, #ff3e1d, #e03516); } table.data-table { width: 100%; border-collapse: collapse; } table.data-table th { background: #f8f9fa; border: 1px solid #ddd; padding: 6px; font-weight: bold; text-align: right; font-size: 9px; } table.data-table td { border: 1px solid #ddd; padding: 5px; text-align: right; font-size: 9px; } table.data-table tr:nth-child(even) { background: #fafafa; } table.data-table tfoot td { background: #233446; color: white; font-weight: bold; } .amount-positive { color: #71dd37; } .amount-negative { color: #ff3e1d; } .amount-neutral { color: #03c3ec; } .footer { text-align: center; margin-top: 30px; padding-top: 15px; border-top: 1px solid #eee; color: #999; font-size: 9px; } .no-data { text-align: center; padding: 15px; color: #999; background: #f8f9fa; border-radius: 6px; }

{{ $title }}

{{ $period }}
تم إنشاء التقرير في: {{ $generatedAt }}
{{ number_format($summary['totalReceipts'], 0) }}
ر.س - الاستلام
{{ number_format($summary['totalTransfers'], 0) }}
ر.س - الحوالات
{{ number_format($summary['totalExpenses'], 0) }}
ر.س - المصروفات
@php $net = $summary['totalReceipts'] - $summary['totalTransfers'] - $summary['totalExpenses']; @endphp
{{ number_format($net, 0) }}
ر.س - الصافي
الاستلام ({{ $receipts->count() }} عملية)
@if($receipts->count() > 0) @foreach($receipts as $index => $receipt) @endforeach
# رقم الإيصال التاريخ الوصف المبلغ الإجمالي المدفوع المتبقي
{{ $index + 1 }} {{ $receipt->receipt_number ?? '-' }} {{ $receipt->receipt_date?->format('d/m/Y') }} {{ \Str::limit($receipt->description ?? '-', 30) }} {{ number_format($receipt->total_amount, 2) }} {{ number_format($receipt->paid_amount, 2) }} {{ number_format($receipt->remaining_amount, 2) }}
الإجمالي {{ number_format($receipts->sum('total_amount'), 2) }} {{ number_format($receipts->sum('paid_amount'), 2) }} {{ number_format($receipts->sum('remaining_amount'), 2) }}
@else
لا توجد عمليات استلام في هذه الفترة
@endif
الحوالات ({{ $transfers->count() }} عملية)
@if($transfers->count() > 0) @foreach($transfers as $index => $transfer) @endforeach
# التاريخ الوجهة المستفيد الوصف المبلغ
{{ $index + 1 }} {{ $transfer->transfer_date?->format('d/m/Y') }} {{ $transfer->transfer_destination ?? '-' }} {{ $transfer->beneficiary_name ?? '-' }} {{ \Str::limit($transfer->description ?? '-', 30) }} {{ number_format($transfer->amount, 2) }}
الإجمالي {{ number_format($transfers->sum('amount'), 2) }}
@else
لا توجد حوالات في هذه الفترة
@endif
المصروفات ({{ $expenses->count() }} عملية)
@if($expenses->count() > 0) @foreach($expenses as $index => $expense) @endforeach
# التاريخ طريقة الدفع الوصف المبلغ
{{ $index + 1 }} {{ $expense->expense_date?->format('d/m/Y') }} {{ $expense->payment_method ?? '-' }} {{ \Str::limit($expense->description ?? '-', 40) }} {{ number_format($expense->amount, 2) }}
الإجمالي {{ number_format($expenses->sum('amount'), 2) }}
@else
لا توجد مصروفات في هذه الفترة
@endif