@extends('layouts.master') @section('css') @endsection @section('title') {{ __('hr.salarydecoument') }} @stop @section('page-header') @endsection @section('content')
ملاحظة هامة / Notice: يتم قيد الزيادة، والخصم، والسلف تلقائياً من النظام، بينما يتم إدخال (الإضافي، الغياب، والإجازات، والبدلات) يدويًا أو احتسابها قبل نهاية الشهر.
@php $i = 0; @endphp @foreach ($list_salary_data as $data) @php $i++; $emp = $data['employeeData']; // البدلات $housingAllowance = $emp->housing_allowance ?? $data['housing_allowance'] ?? 0; $transportAllowance = $emp->transport_allowance ?? $data['transport_allowance'] ?? 0; $otherAllowance = $emp->other_allowance ?? $data['other_allowance'] ?? 0; $totalAllowances = $housingAllowance + $transportAllowance + $otherAllowance; // إجمالي الراتب المستحق (الأساسي + البدلات + الإضافي + المكافآت) $overtimeAmount = $data['overtime_amount'] ?? 0; $bonusAmount = $data['bounes'] ?? 0; $grossSalary = $emp->salary + $totalAllowances + $overtimeAmount + $bonusAmount; // الحسابات اليومية والخصومات $dailyRate = ($emp->salary > 0) ? ($emp->salary / 30) : 0; $unauthorizedAbsentDays = $data['unauthorized_absent_days'] ?? 0; $unauthorizedAbsentPenalty = $unauthorizedAbsentDays * 2 * $dailyRate; $totalDiscounts = $data['discount'] + $unauthorizedAbsentPenalty; $loansAmount = $data['Loans'] ?? 0; // صافي الراتب النهائي $netSalary = $grossSalary - ($totalDiscounts + $loansAmount); @endphp
{{ Nameen ?? 'Company Name' }}

{{ describtionen ?? '' }}

@php $logo = camplogo ?? 'default-logo.png'; @endphp
{{ Namear ?? 'اسم الشركة' }}

{{ describtionar ?? '' }}

{{ __('hr.salarydecoument') }} - Pay Slip

{{ $month ?? '' }}
{{ __('hr.name') }} / Name: {{ (app()->getLocale() == 'ar') ? $emp->name_ar : $emp->name_en }}
{{ __('hr.Id') }} / ID: {{ $emp->personal_identification }}
{{ __('hr.department') }} / Dept: @if($emp->departments) {{ (app()->getLocale() == 'ar') ? $emp->departments->name_ar : $emp->departments->name_en }} @else - @endif
المستحقات (Allowances & Additions)
{{ __('hr.salary') }}
Basic
بدل سكن
Housing
بدل انتقال
Transport
بدلات أخرى
Other
الإضافي
Overtime ({{ $data['overtime_hours'] ?? 0 }} س)
{{ __('hr.increastotal') }}
Bonus
إجمالي المستحقات
Gross Total
{{ number_format($emp->salary, 2) }} {{ number_format($housingAllowance, 2) }} {{ number_format($transportAllowance, 2) }} {{ number_format($otherAllowance, 2) }} {{ number_format($overtimeAmount, 2) }} {{ number_format($bonusAmount, 2) }} {{ number_format($grossSalary, 2) }}
{{ __('حضور / غياب') }}
Att / Abs
{{ __('إجازة بإذن') }}
Perm. Leave
{{ __('غياب بدون إذن (خصم يومين)') }}
Unauthorized (2x)
ح: {{ $data['present_days'] ?? 0 }} / غ: {{ $data['absent_days'] ?? 0 }} {{ $data['permission_leave_days'] ?? 0 }} يوم {{ $unauthorizedAbsentDays }} يوم @if($unauthorizedAbsentDays > 0)
(-{{ number_format($unauthorizedAbsentPenalty, 2) }}) @endif
الخصومات والالتزامات (Deductions & Loans)
{{ __('hr.decreasetotal') }}
Discounts / Penalties
{{ __('home.amountLoans') }}
Loans
{{ __('صافي الراتب') }}
Net Salary
-{{ number_format($totalDiscounts, 2) }} -{{ number_format($loansAmount, 2) }} {{ number_format($netSalary, 2) }}
توقيع الموظف / Employee Signature:
........................................
اعتماد الإدارة / Management:
........................................
@endforeach
@endsection @section('js') @endsection