@extends('layouts.app') @section('content')

{{ __('app.edit') }} {{ __('app.employee') }}

{{ __('app.edit') }} {{ __('app.employee') }}

@if ($errors->any()) @endif
@csrf @method('PUT')
@error('name')
{{ $message }}
@enderror
@error('employee_id')
{{ $message }}
@enderror
@error('email')
{{ $message }}
@enderror
اختر حساب مستخدم لربطه بهذا الموظف. يمكّن الموظف من تسجيل الدخول والوصول لطلباته. @error('user_id')
{{ $message }}
@enderror
@error('phone')
{{ $message }}
@enderror
@error('department_id')
{{ $message }}
@enderror
@error('position_id')
{{ $message }}
@enderror
@error('hire_date')
{{ $message }}
@enderror
{{ __('app.example') }}: 1500.00 {{ $currency_name }} @error('salary')
{{ $message }}
@enderror
{{ __('app.example') }}: {{ __('app.production_incentives') }}, {{ __('app.performance_incentives') }}, {{ __('app.sales_incentives') }} ({{ __('app.currency') }}: {{ $currency_name }}) @error('incentives')
{{ $message }}
@enderror
قيمة مفترضة ليوم الحضور الذي وقع في عطلة (تستخدم كقيمة افتراضية عند إنشاء الرواتب). @error('default_paid_off_amount')
{{ $message }}
@enderror
{{ __('app.example') }}: 5.00 {{ $currency_name }} @error('overtime_hourly_rate')
{{ $message }}
@enderror
{{ __('app.example') }}: 5.00 {{ $currency_name }} - المبلغ الذي يخصم من الموظف عن كل ساعة نقص @error('deduction_hourly_rate')
{{ $message }}
@enderror
{{ __('app.basic_salary') }} + {{ __('app.incentives') }} + {{ __('app.additional_salary_components') }} ({{ __('app.currency') }}: {{ $currency_name }})
@error('monthly_leave_days_allowed')
{{ $message }}
@enderror {{ __('app.number_of_days') }} {{ __('app.employee_can_take') }} {{ __('app.per_month') }} {{ __('app.without_deduction') }}.
@error('annual_entitlement')
{{ $message }}
@enderror {{ __('app.annual_entitlement_info') }}
accrue_leaves ?? true) ? 'checked' : '' }}>
{{ __('app.accrue_leaves_info') }}
@php $leaveMonthlyDetails = $employee->calculateLeaveDeductionDetailsNew(now()->year, now()->month); @endphp @if(!$employee->hire_date || $employee->monthly_leave_days_allowed === null) @elseif(!$employee->isAccrualEnabled()) @elseif($leaveMonthlyDetails && count($leaveMonthlyDetails) > 0)
{{ __('employees.show.leave_accrual.title') }}
@foreach($leaveMonthlyDetails as $detail) @endforeach
{{ __('employees.show.leave_accrual.labels.monthly') }} {{ __('employees.show.leave_accrual.labels.annual') }}
{{ __('employees.show.leave_accrual.columns.year') }} {{ __('employees.show.leave_accrual.columns.month') }} {{ __('employees.show.leave_accrual.columns.granted') }} (شهري) {{ __('employees.show.leave_accrual.columns.used') }} (شهري) {{ __('employees.show.leave_accrual.columns.balance_before') }} (شهري) {{ __('employees.show.leave_accrual.columns.balance_after') }} (شهري) {{ __('employees.show.leave_accrual.columns.excess') }} (شهري) {{ __('employees.show.leave_accrual.columns.amount', ['currency' => get_currency_code()]) }} (شهري) الإجمالي
{{ get_currency_code() }}
{{ __('employees.show.leave_accrual.columns.used') }} (سنوي) {{ __('employees.show.leave_accrual.columns.balance_before') }} (سنوي) {{ __('employees.show.leave_accrual.columns.balance_after') }} (سنوي) {{ __('employees.show.leave_accrual.columns.excess') }} (سنوي) {{ __('employees.show.leave_accrual.columns.amount', ['currency' => get_currency_code()]) }} (سنوي) {{ __('employees.show.leave_accrual.columns.annual_entitlement') }}
{{ $detail['year'] }} {{ $detail['month_name'] ?? \Carbon\Carbon::create()->month($detail['month'])->translatedFormat('F') }} {{ number_format($detail['granted_monthly'] ?? 0, 2) }} {{ number_format($detail['used_monthly'] ?? 0, 2) }} {{ number_format($detail['balance_before_monthly'] ?? 0, 2) }} {{ number_format($detail['balance_after_monthly'] ?? 0, 2) }} {{ number_format($detail['excess_monthly'] ?? 0, 2) }} {{ format_currency($detail['deduction_amount_monthly'] ?? 0) }} {{ format_currency($detail['leave_deduction_amount'] ?? 0) }} {{ number_format($detail['used_annual'] ?? 0, 2) }} {{ number_format($detail['balance_before_annual'] ?? 0, 2) }} {{ number_format($detail['balance_after_annual'] ?? 0, 2) }} {{ number_format($detail['excess_annual'] ?? 0, 2) }} {{ format_currency($detail['deduction_amount_annual'] ?? 0) }} {{ number_format($employee->annual_entitlement ?? ($employee->monthly_leave_days_allowed * 12), 2) }}
@php $currentYear = now()->year; $currentYearMonthlyDeductions = $leaveMonthlyDetails ->filter(fn($d) => $d['year'] == $currentYear) ->sum('deduction_amount_monthly'); $currentYearAnnualDeductions = $leaveMonthlyDetails ->filter(fn($d) => $d['year'] == $currentYear) ->sum('deduction_amount_annual'); $totalCurrentYearDeductions = $currentYearMonthlyDeductions + $currentYearAnnualDeductions; @endphp @else @endif
deduct_if_underworked ?? false) ? 'checked' : '' }}>
{{ __('app.deduct_if_underworked_info') }}
overtime_paid ?? true) ? 'checked' : '' }}>
{{ __('app.overtime_paid_info') }}
@php $days = __('app.week_days'); @endphp
{{ __('app.weekly_off_days_info') }}
{{ __('app.additional_salary_components') }} ({{ __('app.up_to') }} 7)
@for ($i = 1; $i <= 7; $i++)
@endfor
@error('birth_date')
{{ $message }}
@enderror
@error('age')
{{ $message }}
@enderror
@error('qualification')
{{ $message }}
@enderror
@error('national_id')
{{ $message }}
@enderror
@error('address')
{{ $message }}
@enderror
@error('status')
{{ $message }}
@enderror
@error('photo')
{{ $message }}
@enderror @if($employee->photo)
{{ __('app.current_photo') }}
@endif
@error('cv_files')
{{ $message }}
@enderror @error('cv_files.*')
{{ $message }}
@enderror @if($employee->cv_files && count($employee->cv_files) > 0)

{{ __('app.current_files') }}:

@endif

{{ __('app.scheduled_work_hours') }}
@error('scheduled_check_in')
{{ $message }}
@enderror
@error('scheduled_check_out')
{{ $message }}
@enderror
{{ __('app.cancel') }}
@include('employees.partials.add-department-modal') @include('employees.partials.add-position-modal') @endsection @section('scripts') @push('scripts') @endpush @endsection