@php $employee = $vacationRequest->employee; $vacationType = $vacationRequest->vacationType; $vacationYear = $vacationRequest->vacationYear; $lastGeneratedDate = $vacationRequest->days->max('date') ?? $vacationRequest->end_date; $returnDate = $lastGeneratedDate->copy()->addDay(); $weekdayNames = [ 'Sunday' => 'الأحد', 'Monday' => 'الاثنين', 'Tuesday' => 'الثلاثاء', 'Wednesday' => 'الأربعاء', 'Thursday' => 'الخميس', 'Friday' => 'الجمعة', 'Saturday' => 'السبت', ]; $startWeekday = $weekdayNames[$vacationRequest->start_date->englishDayOfWeek] ?? ''; $returnWeekday = $weekdayNames[$returnDate->englishDayOfWeek] ?? ''; $deductibleDays = (float) $vacationRequest->deductible_days; $openingBalance = (float) ($vacationBalance?->opening_balance ?? 0); $availableBalance = max( 0, (float) ($vacationBalance?->remaining_days ?? 0) - (float) ($vacationBalance?->reserved_days ?? 0), ); $isPendingReservation = in_array($vacationRequest->status, [ \Modules\Hr\Entities\VacationRequest::STATUS_DRAFT, \Modules\Hr\Entities\VacationRequest::STATUS_SUBMITTED, \Modules\Hr\Entities\VacationRequest::STATUS_UNDER_REVIEW, \Modules\Hr\Entities\VacationRequest::STATUS_RETURNED, ], true); $remainingBalance = max(0, $availableBalance - ($isPendingReservation ? $deductibleDays : 0)); $formatDays = static fn (float $value): string => rtrim(rtrim(number_format($value, 2, '.', ''), '0'), '.') ?: '0'; $headerPath = public_path('assets/images/print-header-logo.jpeg'); $headerImage = is_file($headerPath) ? 'data:image/jpeg;base64,'.base64_encode(file_get_contents($headerPath)) : null; @endphp
@if($headerImage)
{{ __('modules.hr.resources_views_prints_vacation_request.text_240c07745e') }}
@endif
طلب {{ $vacationType->name }} لسنة {{ $vacationYear->{{ __('modules.hr.resources_views_prints_vacation_request.text_8306cbb0a4') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_3b89de9440') }} {{ $employee->name }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_fc6600f2e0') }} {{ $employee->job_title_text }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_e87257d265') }} {{ $vacationRequest->start_date->format('Y/m/d') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_0b8a53d867') }} {{ $vacationType->name }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_c44bb48824') }} -
{{ __('modules.hr.resources_views_prints_vacation_request.text_b851e40b02') }} {{ $formatDays($deductibleDays) }} يوم
{{ __('modules.hr.resources_views_prints_vacation_request.text_275c5eb0e0') }} {{ $vacationRequest->location_type === 'external' ? ($vacationRequest->{{ __('modules.hr.resources_views_prints_vacation_request.text_a80ee8d4fe') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_68057176bc') }} {{ $vacationRequest->submitted_at?->format('Y/m/d') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_927f36d7c5') }} {{ $vacationRequest->status_label }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_b0271f1b1f') }} ....................

{{ __('modules.hr.resources_views_prints_vacation_request.text_ffa9915e1b') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_bb5ac3156a') }} {{ __('modules.hr.resources_views_prints_vacation_request.text_2fb161ca5a') }} {{ __('modules.hr.resources_views_prints_vacation_request.text_91cfd15dcf') }}
{{ $formatDays($openingBalance) }} يوماً {{ $formatDays($deductibleDays) }} يوم {{ $formatDays($remainingBalance) }} يوماً
{{ __('modules.hr.resources_views_prints_vacation_request.text_2a6a23899e') }} {{ $vacationRequest->submitted_at?->format('Y/m/d') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_f06f1f3bc5') }} ....................

{{ __('modules.hr.resources_views_prints_vacation_request.text_9e7c831c0c') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_d91b7758b7') }}
اعتباراً من {{ $vacationRequest->start_date->format('Y/m/d') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_2a6a23899e') }} ....................
على منح الإجازة المطلوبة لمدة: {{ $formatDays($deductibleDays) }} يوم
على أن يحل محله: {{ $vacationRequest->replacementEmployee?->name ?? '-' }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_ac637c9c13') }} ....................

{{ __('modules.hr.resources_views_prints_vacation_request.text_7af48fc246') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_d91b7758b7') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_2a6a23899e') }} ....................
{{ __('modules.hr.resources_views_prints_vacation_request.text_ac637c9c13') }} ....................
{{ __('modules.hr.resources_views_prints_vacation_request.text_745236804e') }}
الإجازة التي تقضي في الخارج أو الدراسية أو بدون ماهية ترسل لوزارة الحكم المحلي للحصول على التصديق اللازم، ولا يحق للموظف القيام بهذه الإجازة قبل تصديق الوزارة عليها.
{{ __('modules.hr.resources_views_prints_vacation_request.text_d765e126de') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_2a6d0ce5fb') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_3b89de9440') }} {{ $employee->name }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_fc6600f2e0') }} {{ $employee->job_title_text }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_ddd0e5a542') }} {{ $vacationType->name }} ({{ $vacationRequest->{{ __('modules.hr.resources_views_prints_vacation_request.text_41ffc2f5b3') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_3209056a41') }} {{ $startWeekday }} / {{ $vacationRequest->start_date->format('Y/m/d') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_ca698374fd') }} {{ $returnWeekday }} / {{ $returnDate->format('Y/m/d') }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_c44bb48824') }} -
{{ __('modules.hr.resources_views_prints_vacation_request.text_7417063880') }} {{ $employee->department?->name ?? '-' }}
{{ __('modules.hr.resources_views_prints_vacation_request.text_3f2e8fe6ec') }}
....................
{{ __('modules.hr.resources_views_prints_vacation_request.text_03384ffbb3') }}
....................
{{ __('modules.hr.resources_views_prints_vacation_request.text_b55c5d9386') }}