@extends('layouts.app') @section('title', $period->period_name) @section('page_title', 'مسير رواتب: ' . $period->period_name) @section('content') {{-- Period Header Card --}}

{{ $period->period_name }}

@php $statusGradients = ['draft'=>'from-slate-400 to-slate-500','calculated'=>'from-amber-500 to-orange-500','approved'=>'from-blue-500 to-primary-600','paid'=>'from-emerald-500 to-teal-600','cancelled'=>'from-red-500 to-red-600']; @endphp {{ $period->status_label }}

{{ $period->period_start->format('d/m/Y') }} — {{ $period->period_end->format('d/m/Y') }}

@if($period->creator)

أنشأه: {{ $period->creator->name }}

@endif
{{-- Action Buttons based on Status --}}
@if(in_array($period->status, ['draft', 'calculated']))
@csrf
@endif @if($period->status === 'calculated')
@csrf
@endif @if($period->status === 'approved')
{{-- Payment Modal --}}

تسجيل صرف الرواتب

@csrf

إجمالي سيصرف: {{ number_format($period->total_net_salaries, 2) }}

@endif @if($period->journal_entry_id) القيد المحاسبي @endif
{{-- Totals Row --}} @if($period->total_employees > 0)

{{ $period->total_employees }}

موظف

{{ number_format($period->total_basic_salaries, 0) }}

رواتب أساسية

+{{ number_format($period->total_allowances, 0) }}

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

-{{ number_format($period->total_deductions, 0) }}

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

{{ number_format($period->total_net_salaries, 0) }}

صافي الرواتب

@endif
{{-- Payroll Slips Table --}} @if($period->slips->count() > 0)

قسائم الرواتب ({{ $period->slips->count() }} موظف)

@foreach($period->slips as $slip) @endforeach
الموظف الراتب الأساسي البدلات الخصومات حضور صافي الراتب قسيمة
{{ mb_substr($slip->employee->name, 0, 2) }}

{{ $slip->employee->name }}

{{ $slip->employee->department?->name }}

{{ number_format($slip->basic_salary, 2) }} +{{ number_format($slip->housing_allowance + $slip->transport_allowance + $slip->meal_allowance + $slip->other_allowances + $slip->overtime_pay + $slip->bonus, 2) }} -{{ number_format($slip->total_deductions, 2) }}
{{ $slip->present_days }}/{{ $slip->working_days }} يوم @if($slip->overtime_hours > 0)
+{{ $slip->overtime_hours }} س.إضافي @endif
{{ number_format($slip->net_salary, 2) }}
@else

لم يتم حساب الرواتب بعد

اضغط على "احسب الرواتب" لحساب رواتب جميع الموظفين النشطين تلقائياً

@csrf
@endif @endsection