@extends('layouts.app') @section('title', 'تفاصيل كشف الراتب') @section('content')

تفاصيل كشف الراتب: {{ $payroll->payroll_number }}

العودة إلى القائمة @if($payroll->status == 'draft') @can('update', $payroll) تعديل @endcan @can('approve', $payroll)
@csrf
@endcan @endif @if($payroll->status == 'approved') @can('markAsPaid', $payroll)
@csrf
@endcan @endif
@if(session('success')) @endif @if($errors->any()) @endif

معلومات كشف الراتب

رقم الكشف

{{ $payroll->payroll_number }}

الشهر/السنة

{{ $payroll->month }}/{{ $payroll->year }}

الحالة

@if($payroll->status == 'draft') مسودة @elseif($payroll->status == 'approved') معتمد @elseif($payroll->status == 'paid') مدفوع @elseif($payroll->status == 'cancelled') ملغي @endif

تاريخ البداية

{{ $payroll->start_date->format('Y-m-d') }}

تاريخ النهاية

{{ $payroll->end_date->format('Y-m-d') }}

تاريخ الدفع

{{ $payroll->payment_date->format('Y-m-d') }}

ملاحظات

{{ $payroll->notes ?: 'لا توجد ملاحظات' }}

إجمالي الرواتب الأساسية

{{ number_format($payroll->total_basic_salary, 2) }} ريال

إجمالي البدلات

{{ number_format($payroll->total_housing_allowance + $payroll->total_transportation_allowance + $payroll->total_other_allowances, 2) }} ريال

إجمالي الخصومات

{{ number_format($payroll->total_deductions + $payroll->total_gosi + $payroll->total_ta, 2) }} ريال

صافي الرواتب

{{ number_format($payroll->total_net_salary, 2) }} ريال

بنود كشف الراتب

@if($payrollItems->count() > 0)
@foreach($payrollItems as $item) @endforeach
الموظف الراتب الأساسي البدلات المكافآت الخصومات التأمينات الضريبة صافي الراتب
{{ $item->employee->name }}
{{ $item->employee->employee_number }}
{{ number_format($item->basic_salary, 2) }} {{ number_format($item->housing_allowance + $item->transportation_allowance + $item->other_allowances, 2) }} {{ number_format($item->bonuses, 2) }} {{ number_format($item->deductions + $item->loan_deduction, 2) }} {{ number_format($item->gosi_deduction, 2) }} {{ number_format($item->ta_deduction, 2) }} {{ number_format($item->net_salary, 2) }}
{{ $payrollItems->links() }}
@else
لا توجد بنود في كشف الراتب.
@endif
@endsection