@extends('layouts.app') @section('title', 'الخصومات والاستقطاعات') @section('content')

الخصومات والاستقطاعات

إدارة الخصومات والجزاءات واستقطاعات القروض للموظفين

@can('hr.deductions.create') إضافة خصم/استقطاع @endcan
@if(session('success'))

{{ session('success') }}

@endif @if(session('error'))

{{ session('error') }}

@endif
@forelse($deductions as $deduction) @empty @endforelse
# الموظف المبلغ التاريخ النوع الحالة الإجراءات
{{ $loop->iteration }}
{{ $deduction->employee->user->name }}
{{ $deduction->employee->employee_number }}
{{ number_format($deduction->amount, 2) }} ر.س {{ $deduction->deduction_date->format('Y-m-d') }} @php $types = [ 'absence' => 'غياب', 'late' => 'تأخير', 'loan' => 'قسط قرض', 'penalty' => 'جزاء إداري', 'other' => 'أخرى', ]; echo $types[$deduction->deduction_type] ?? $deduction->deduction_type; @endphp @php $statusClasses = [ 'pending' => 'bg-yellow-100 text-yellow-700', 'approved' => 'bg-green-100 text-green-700', 'rejected' => 'bg-red-100 text-red-700', 'paid' => 'bg-blue-100 text-blue-700', ]; $class = $statusClasses[$deduction->status] ?? 'bg-gray-100 text-black'; $statusTexts = [ 'pending' => 'قيد الانتظار', 'approved' => 'معتمدة', 'rejected' => 'مرفوضة', 'paid' => 'مخصومة', ]; $statusText = $statusTexts[$deduction->status] ?? $deduction->status; @endphp {{ $statusText }}
@if($deduction->status === 'pending') @can('hr.deductions.edit') تعديل @endcan @can('hr.deductions.delete')
@csrf @method('DELETE')
@endcan @endif

لا توجد خصومات حالياً

ابدأ بإضافة خصم جديد

@if($deductions->hasPages())
{{ $deductions->links() }}
@endif
@endsection