{{ __('Salary Slip') }}

@if(org_logo()) {{ org_name() }} @endif

{{ org_name() }}

{{ __('Human Resource Management System') }}

{{ __('SALARY SLIP') }}

{{ $payroll->period_start ? $payroll->period_start->format('M Y') : now()->format('M Y') }}

{{ __('Employee Information') }}

{{ __('Name') }}: {{ $item->employee->first_name }} {{ $item->employee->last_name }}
{{ __('Employee ID') }}: {{ $item->employee->employee_id ?? 'N/A' }}
{{ __('Department') }}: {{ $item->employee->department->name ?? 'N/A' }}
{{ __('Designation') }}: {{ $item->employee->designation->name ?? 'N/A' }}

{{ __('Pay Period') }}

{{ __('Payroll Summary') }}: {{ $payroll->name }}
{{ __('Period') }}: {{ $payroll->period_start ? $payroll->period_start->format('d M Y') : 'N/A' }} - {{ $payroll->period_end ? $payroll->period_end->format('d M Y') : 'N/A' }}
{{ __('Payment Date') }}: {{ $payroll->payment_date ? $payroll->payment_date->format('d M Y') : 'N/A' }}
{{ __('Generated') }}: {{ now()->format('d M Y H:i') }}
@php $breakdown = $item->breakdown ?? []; $basicPayUSD = $breakdown['basic_pay_usd'] ?? 0; $exchangeRate = $breakdown['exchange_rate'] ?? 2500; $grossTZS = $breakdown['gross_salary_tzs'] ?? $item->gross; $allowances = $breakdown['allowances'] ?? []; $socialFunds = $breakdown['social_funds'] ?? []; $loans = $breakdown['loans'] ?? []; $paye = $breakdown['paye'] ?? 0; $totalLoanDed = $breakdown['total_loan_deductions'] ?? 0; @endphp

{{ __('Basic Pay (USD)') }}

{{ __('Exchange Rate: 1 USD = :rate TZS', ['rate' => number_format($exchangeRate, 2)]) }}

${{ number_format($basicPayUSD, 2) }}

{{ __('Earnings') }}

{{ __('Gross Salary (TZS)') }} {{ number_format($grossTZS, 2) }}
@if(count($allowances) > 0)

{{ __('Allowances') }}

@foreach($allowances as $allowance)
{{ $allowance['name'] }} ({{ ucfirst($allowance['type']) }}) @if($allowance['is_taxable']) * @endif {{ number_format($allowance['amount'], 2) }}
@endforeach
{{ __('Subtotal Allowances') }} {{ number_format($item->total_allowances, 2) }}
@endif
{{ __('Total Earnings') }} {{ number_format($item->gross + $item->total_allowances, 2) }}

{{ __('Deductions') }}

@if(count($socialFunds) > 0)

{{ __('Social Funds') }}

@foreach($socialFunds as $sf)
{{ $sf['name'] }} ({{ $sf['employee_percentage'] }}%) {{ number_format($sf['employee_amount'], 2) }}
@endforeach
@endif @if($paye > 0)
PAYE Tax @if(!empty($breakdown['paye_detail'])) (Progressive) @endif {{ number_format($paye, 2) }}
@endif @php $otherDeds = $breakdown['other_deductions'] ?? []; $totalOtherDeds = $breakdown['total_other_deductions'] ?? 0; @endphp @if($totalOtherDeds > 0)

Other Deductions

@foreach($otherDeds as $ded)
{{ $ded['name'] }} ({{ $ded['type'] == 'fixed' ? 'Fixed' : $ded['type'].'%' }}) {{ number_format($ded['amount'], 2) }}
@endforeach
Subtotal Other Deductions {{ number_format($totalOtherDeds, 2) }}
@endif @if($totalLoanDed > 0)

Loan Repayments

@foreach($loans as $loan)
Loan #{{ $loan['loan_id'] }} (Balance: {{ number_format($loan['balance'], 2) }}) {{ number_format($loan['monthly_repayment'], 2) }}
@endforeach
Subtotal Loans {{ number_format($totalLoanDed, 2) }}
@endif
{{ __('Total Deductions') }} {{ number_format($item->total_deductions, 2) }}
@if(count($allowances) > 0 && collect($allowances)->contains('is_taxable', true))

{{ __('* Taxable allowance - included in PAYE calculation') }}

@endif

{{ __('Net Pay Amount') }}

{{ __('Amount to be paid') }}

{{ number_format($item->net, 2) }}

{{ $payroll->currency ?? 'TZS' }}

@if(!empty($item->breakdown['statutory_total_employer']) && $item->breakdown['statutory_total_employer'] > 0)

{{ __('Employer Contributions') }}

@if(!empty($item->breakdown['social_funds'])) @foreach($item->breakdown['social_funds'] as $sf) @if($sf['employer_amount'] > 0)
{{ $sf['name'] }} ({{ $sf['employer_percentage'] }}%) {{ number_format($sf['employer_amount'], 2) }}
@endif @endforeach @endif
{{ __('Total Employer Contributions') }} {{ number_format($item->breakdown['statutory_total_employer'], 2) }}
@endif