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

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

@if($selectedPayroll) @endif
@if($selectedPayroll)
{{ $items->count() }}
عدد الموظفين
{{ number_format($items->sum(function($i){ return $i->basic_salary + $i->housing_allowance + $i->transportation_allowance + $i->other_allowances + $i->overtime_pay + $i->bonus; }), 2) }}
إجمالي المستحقات
{{ number_format($items->sum(function($i){ return $i->social_insurance + $i->tax + $i->loans + $i->deductions; }), 2) }}
إجمالي الخصومات
{{ number_format($items->sum('net_salary'), 2) }}
صافي الرواتب

كشوف رواتب شهر {{ $selectedPayroll->month }}

@forelse($items as $index => $item) @empty @endforelse
# الرمز اسم الموظف الراتب الأساسي البدلات الخصومات الصافي الإجراءات
{{ $index + 1 }} {{ $item->employee->employee_code ?? '-' }} {{ $item->employee->full_name_en ?: trim(($item->employee->first_name ?? '') . ' ' . ($item->employee->last_name ?? '')) }} {{ number_format($item->basic_salary, 2) }} {{ number_format($item->housing_allowance + $item->transportation_allowance + $item->other_allowances + $item->overtime_pay + $item->bonus, 2) }} {{ number_format($item->social_insurance + $item->tax + $item->loans + $item->deductions, 2) }} {{ number_format($item->net_salary, 2) }}

لا توجد كشوف رواتب لهذه الفترة

@else

اختر فترة الراتب من القائمة أعلاه لعرض كشوف الرواتب

@endif @endsection