{{-- resources/views/payroll/print-payroll-details.blade.php --}} {{ __('payroll.print.title') }} - {{ $payroll->employee->name }} - {{ \Carbon\Carbon::create()->month($payroll->month)->translatedFormat('F') }} {{ $payroll->year }}

{{ __('payroll.print.company_name') }}

{{ __('payroll.print.header_title') }}

الاسم: {{ $payroll->employee->name }}

الرقم الوظيفي: {{ $payroll->employee->employee_id }}

الوظيفة: {{ $payroll->employee->position?->name ?? 'غير محدد' }}

القسم: {{ $payroll->employee->department?->name ?? 'غير محدد' }}

الشهر: {{ \Carbon\Carbon::create()->month($payroll->month)->translatedFormat('F Y') }}

تاريخ الدفع: {{ $payroll->paid_at ? $payroll->paid_at->format('Y-m-d H:i') : 'لم يتم الدفع بعد' }}

الحالة: @switch($payroll->status) @case('pending') قيد الدفع @break @case('paid') مدفوع @break @case('cancelled') ملغى @break @default {{ $payroll->status }} @endswitch

{{ __('payroll.print.section_total_income') }}
@if($payrollComponents && $payrollComponents->count() > 0) @foreach($payrollComponents as $comp) @if(!empty($comp->meta) && is_array($comp->meta)) @endif @endforeach @else @endif
الوصف {{ __('payroll.labels.amount') }} ({{ get_currency_code() }})
الراتب الأساسي {{ number_format($payroll->basic_salary, 2) }}
الحوافز {{ number_format($payroll->incentives, 2) }}
{{ $comp->name }} {{ number_format($comp->value, 2) }}
@php $m = $comp->meta; @endphp @if(isset($m['type']) && $m['type'] === 'underworked') {{ __('payroll.labels.underworked_hours_label') }}: {{ ($m['hours'] ?? 0) . ' ' . __('payroll.labels.hours') . ' × ' . number_format($m['hourly_rate'] ?? 0, 4) . ' = ' . number_format($m['calculation'] ?? ($comp->value * -1), 2) }} {{ get_currency_code() }} @elseif(isset($m['type']) && $m['type'] === 'overtime') {{ __('payroll.labels.overtime_label') }}: {{ ($m['hours'] ?? 0) . ' ' . __('payroll.labels.hours') . ' × ' . number_format($m['hourly_rate'] ?? 0, 4) . ' = ' . number_format($m['calculation'] ?? $comp->value, 2) }} {{ get_currency_code() }} @else @foreach($m as $k => $v) {{ $k }}: {{ is_array($v) ? json_encode($v) : $v }}@if(!$loop->last) · @endif @endforeach @endif
{{ __('payroll.print.no_components') }}
إجمالي الدخل {{ number_format($totalSalary, 2) }}
{{ __('payroll.print.section_leave') }}
@isset($paidOffDays) @endisset
الوصف {{ __('payroll.labels.value') }}
عدد أيام الإجازة الشهرية المسموح بها {{ $payroll->employee->monthly_leave_days_allowed ?? 0 }} يوم
الأيام المستخدمة هذا الشهر {{ $cumulativeLeaveInfo['current_month_used'] ?? 0 }} يوم
{{ __('deductions.extra_days_deducted') }} {{ $cumulativeLeaveInfo['current_month_excess'] ?? 0 }} يوم
{{ __('payroll.labels.daily_rate') }} {{ number_format($dailyRate ?? 0, 2) }} {{ get_currency_code() }}
خصم الإجازات الزائدة - {{ number_format($payroll->leave_deduction, 2) }} {{ get_currency_code() }}
الرصيد قبل الخصم {{ $payroll->leave_balance_before_deduction }} يوم
الرصيد بعد الخصم {{ $payroll->leave_balance_after_deduction }} يوم
أيام الحضور المدفوعة {{ $paidOffDays }} يوم — {{ number_format($paidOffAmount ?? 0, 2) }} {{ get_currency_code() }}
تفاصيل الاستقطاعات
@if(!empty($actualDeductions) && is_array($actualDeductions)) @foreach($actualDeductions as $deduction) @endforeach @else @endif
النوع الوصف {{ __('payroll.labels.amount') }} ({{ get_currency_code() }}) التاريخ
{{ $deductionTypes[$deduction->type] ?? $deduction->type }} {{ $deduction->description }} {{ number_format($deduction->amount, 2) }} {{ $deduction->deduction_date?->format('Y-m-d') ?? 'غير محدد' }}
{{ __('payroll.print.no_deductions') }}
{{ __('payroll.print.section_loans') }}
@if($loanInstallments && $loanInstallments->count() > 0) @foreach($loanInstallments as $inst) @endforeach @else @endif
القرض المبلغ القسط الشهري تاريخ الاستحقاق الحالة
{{ $loanTypes[$inst->loan->loan_type] ?? $inst->loan->loan_type ?? 'غير محدد' }} {{ number_format($inst->loan->amount, 2) }} {{ number_format($inst->amount, 2) }} {{ $inst->due_date?->format('Y-m-d') ?? 'غير محدد' }} @switch($inst->status) @case('pending') قيد الانتظار @break @case('paid') مدفوع @break @case('overdue') متأخر @break @default {{ $inst->status }} @endswitch
{{ __('payroll.print.no_loans') }}
{{ __('payroll.print.section_summary') }}
الوصف {{ __('payroll.labels.amount') }} ({{ get_currency_code() }})
{{ __('payroll.create.total_salary') }} {{ number_format($totalSalary, 2) }}
{{ __('payroll.print.section_deductions') }} - {{ number_format($payroll->active_deductions, 2) }}
{{ __('payroll.print.section_loans') }} - {{ number_format($payroll->loan_installments, 2) }}
{{ __('payroll.create.leave_deduction') }} - {{ number_format($payroll->leave_deduction, 2) }}
إجمالي الخصومات - {{ number_format($calculatedTotalDeductions, 2) }}
الراتب الصافي (إجمالي الراتب - إجمالي الخصومات) {{ number_format($netSalary, 2) }}
@if($payroll->notes)
ملاحظات

{{ $payroll->notes }}

@endif
عودة إلى الملف