@extends('layouts.app') @section('title', 'سجل الرواتب') @section('content')
FINANCE

سجل الرواتب

إدارة الرواتب والمرتبات الشهرية

@if (session('success'))
✅ {{ session('success') }}
@endif @if (session('error'))
⚠️ {{ session('error') }}
@endif

الرواتب المعلقة

@foreach($pendingByCurrency as $c) {{ number_format($c->total, 2) }} {{ $c->currency }}@if(!$loop->last) + @endif @endforeach @if($pendingByCurrency->isEmpty()) 0.00 @endif

المدفوع هذا الشهر

@foreach($paidByCurrency as $c) {{ number_format($c->total, 2) }} {{ $c->currency }}@if(!$loop->last) + @endif @endforeach @if($paidByCurrency->isEmpty()) 0.00 @endif

إجمالي الموظفين

{{ $payrolls instanceof \Illuminate\Pagination\LengthAwarePaginator ? $payrolls->total() : $payrolls->count() }}

👥

📋 سجل الرواتب

@forelse ($payrolls as $p) @empty @endforelse
الموظفالقسمالراتبتاريخ الدفعالحالة
{{ $p->employee_name ?? '—' }} {{ $p->department ?? '—' }} {{ number_format($p->salary_amount, 2) }} {{ $p->currency ?? 'USD' }} {{ $p->pay_date ? \Carbon\Carbon::parse($p->pay_date)->format('Y-m-d') : '—' }} {{ $p->status === 'pending' ? 'معلق' : 'مدفوع' }} @if ($p->status === 'pending')
@csrf
@endif
لا توجد رواتب مسجلة
@if (method_exists($payrolls, 'links'))
{{ $payrolls->links() }}
@endif
@endsection