@extends('layouts.app') @section('title', 'دورة رواتب - '.config('app.name')) @section('breadcrumb') الرئيسية الموارد البشرية الرواتب {{ $payroll->periodLabelAr() }} @endsection @section('content') @php $statusAr = match ($payroll->status) { 'approved' => 'معتمد', 'paid' => 'مدفوع', default => 'مسودة', }; $canPay = $payroll->status === \App\Models\Payroll::STATUS_APPROVED && ! $payroll->payment_journal_entry_id; $hasPayableAmount = (float) $payroll->total_amount > 0.0001; $paymentOptionsForModal = $paymentAccountOptions ?? []; $defaultPaymentValueForModal = old('payment_account_id', $defaultPaymentAccountId); $modalPreviewAmount = (float) $payroll->total_amount; $modalOpenDefault = $errors->has('payment_account_id') || $errors->has('payment_date'); @endphp
@if($payroll->status === \App\Models\Payroll::STATUS_DRAFT && ! ($accountingLinksReady ?? true))

الربط المحاسبي غير مكتمل

لن يُسمح باعتماد الدورة ذات الصافي الأكبر من صفر حتى يُحفظ مصروف الأجور والأجور المستحقة في إعدادات المنشأة — الرواتب.

@endif

@if(filled($payroll->name)) {{ $payroll->name }} @endif دورة #{{ $payroll->id }} — {{ $payroll->periodLabelAr() }} @if($payroll->department) القسم: {{ $payroll->department->name }} @endif

الحالة: {{ $statusAr }} — إجمالي الراتب: {{ number_format((float) $payroll->total_gross, 2) }} — الخصومات: {{ number_format((float) $payroll->total_deductions, 2) }} — الصافي: {{ number_format((float) $payroll->total_amount, 2) }}

@if($payroll->notes)

{{ $payroll->notes }}

@endif
قائمة الدورات @if($payroll->status === \App\Models\Payroll::STATUS_DRAFT)
@csrf
@endif @if($canPay) @endif
@if($payroll->accrual_journal_entry_id || $payroll->payment_journal_entry_id)

المسار المحاسبي

@endif @if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
@if($payroll->status === \App\Models\Payroll::STATUS_APPROVED || $payroll->status === \App\Models\Payroll::STATUS_PAID) @endif @foreach($payroll->paySlips as $slip) @if($payroll->status === \App\Models\Payroll::STATUS_APPROVED || $payroll->status === \App\Models\Payroll::STATUS_PAID) @endif @endforeach
الموظف راتب أساسي البدلات إضافي خصم حضور تأمينات/ضريبة الصافي قسيمة
{{ $slip->employee?->name ?? '—' }} {{ number_format((float) $slip->basic_salary, 2) }} {{ number_format((float) $slip->total_allowances, 2) }} {{ number_format((float) $slip->overtime_amount, 2) }} {{ number_format((float) $slip->attendance_deductions, 2) }} {{ number_format((float) $slip->statutory_deductions, 2) }} {{ number_format((float) $slip->net_salary, 2) }} طباعة قسيمة
@if($canPay)
@endif
@endsection