{{ __('Payslip Details') }} – {{ $payslip->employee->name }}

{{ __('Basic Information') }}

{{ __('Employee') }}: {{ $payslip->employee->name }}
{{ __('Payment Date') }} : {{ \Carbon\Carbon::parse($payslip->payment_date)->format('Y-m') }}
@if($payslip->period_start && $payslip->period_end)
{{ $payslip->variables_period_label }}
{{ __('Period Start') }}: {{ \Carbon\Carbon::parse($payslip->period_start)->format('Y-m-d') }}
{{ __('Period End') }}: {{ \Carbon\Carbon::parse($payslip->period_end)->format('Y-m-d') }}
@endif
{{ __('Bank Name') }}: {{ $payslip->bank_name ?? '-' }}
{{ __('Bank Account') }}: {{ $payslip->bank_account ?? '-' }}
أيام استحقاق الراتب: {{ $payslip->days }}
{{ __('Net Salary') }}: {{ number_format($payslip->net_salary, 2) }}

{{ __('Salary Details') }}

@php($snapshot = $payslip->calculation_snapshot ?? []) @if(isset($snapshot['payable_days'], $snapshot['payable_period']))
الراتب الأساسي الشهري: {{ number_format($snapshot['monthly_basic_salary'] ?? $payslip->employee->basic_salary, 2) }}
البدلات الشهرية: {{ number_format($snapshot['monthly_fixed_allowances'] ?? ((float) $payslip->employee->housing_allowance + (float) $payslip->employee->transport_allowance + (float) $payslip->employee->other_allowance), 2) }}
تاريخ المباشرة: {{ $snapshot['employment_start'] ?? '-' }}
فترة الاستحقاق: {{ $snapshot['payable_period'][0] }} إلى {{ $snapshot['payable_period'][1] }} ({{ $snapshot['payable_days'] }} يومًا)
استحقاق الفترة = الراتب الشهري × {{ min($snapshot['payable_days'], $snapshot['monthly_days'] ?? config('payroll.monthly_days', 30)) }} ÷ {{ $snapshot['monthly_days'] ?? config('payroll.monthly_days', 30) }}
@endif
الراتب الأساسي المستحق للفترة: {{ number_format($payslip->basic_salary, 2) }}
البدلات المستحقة للفترة: {{ number_format($payslip->fixed_allowance, 2) }}
إجمالي الراتب: {{ number_format((float) $payslip->basic_salary + (float) $payslip->fixed_allowance, 2) }}
{{ __('Purchases') }}:{{ number_format($payslip->purchases, 2) }}
{{ __('Overtime') }}: {{ number_format($payslip->overtime_amount, 2) }} ({{ $payslip->overtime_duration }})
مهمات العمل: {{ number_format($payslip->deputation_amount, 2) }}
إضافات أخرى: {{ number_format($payslip->bonus, 2) }}
إجمالي الإضافات: {{ number_format($payslip->additional, 2) }}
إجمالي المستحقات: {{ number_format($payslip->gross_salary, 2) }}

{{ __('Deductions') }}

{{ __('Dept') }}: {{ number_format($payslip->dept, 2) }}
{{ __('Delay Hours') }} ({{ __('HH:MM:SS') }}): {{ $payslip->delay_duration }}
{{ __('Delay Amount') }}: {{ number_format($payslip->delay_amount, 2) }}
{{ __('Absences Days') }}: {{ $payslip->absences }}
خصم الغياب والإجازات غير المدفوعة: {{ number_format($payslip->absence_and_leave_amount, 2) }}
خصم الاستئذان غير المدفوع: {{ number_format($payslip->unpaid_permission_amount, 2) }}
{{ __('Insurance Amount') }}: {{ number_format($payslip->insurance_amount, 2) }}
{{ __('Discount') }}: {{ number_format($payslip->discount, 2) }}
@if((float) $payslip->deduction_waiver_amount > 0)
{{ __('Deduction before waiver') }}: {{ number_format($payslip->deduction_before_waiver, 2) }}
{{ __('Waived amount') }}: {{ number_format($payslip->deduction_waiver_amount, 2) }}
{{ __('Waiver note') }}: {{ $payslip->deduction_waiver_note }}
@endif