{{ __('Back to history') }}
{{ get_setting('site_name') }}
{{ __('Employee History Report') }}
{{ $staff->user?->name ?? '—' }} · {{ __('User ID') }}: {{ $staff->user_id }} · {{ __('Printed') }}: {{ $printedAt->format('Y-m-d H:i') }}
{{-- Personal & salary summary --}}
{{ __('Personal Information') }}
{{ __('Name') }}
{{ $staff->user?->name ?? '—' }}
{{ __('User ID') }}
{{ $staff->user_id }}
{{ __('Email') }}
{{ $staff->user?->email ?? '—' }}
{{ __('Phone') }}
{{ $staff->user?->phone ?? '—' }}
{{ __('Branch') }}
{{ $staff->warehouse?->name ?? '—' }}
{{ __('Department') }}
{{ $staff->department?->name ?? '—' }}
{{ __('Designation') }}
{{ $staff->designation?->name ?? '—' }}
{{ __('Security Money') }}
{{ $staff->security_money !== null ? number_format((float) $staff->security_money, 2) : '—' }}
{{ __('Joined Current Branch') }}
{{ $branchSummary['current']?->joined_at?->format('Y-m-d') ?? '—' }}
@if(!empty($branchSummary['previous']))
{{ __('Previous Branch') }}
{{ $branchSummary['previous']->branch?->name ?? '—' }}
{{ __('Days in Previous') }}
{{ $branchSummary['previous_days'] }}
@endif
{{ __('Days in Current Branch') }}
@if(!empty($branchSummary['current']) && $branchSummary['current']->hasStarted()) {{ $branchSummary['current_days'] }} ({{ $branchSummary['current']->durationLabel() }}) @elseif(!empty($branchSummary['current'])) {{ $branchSummary['current']->durationLabel() }} @else — @endif
{{ __('Current Salary Setup') }}
@if($salarySetup)
{{ __('Basic') }}
{{ number_format((float) $salarySetup->basic_salary, 2) }}
{{ __('Gross') }}
{{ number_format((float) $salarySetup->gross_salary, 2) }}
{{ __('Net') }}
{{ number_format((float) $salarySetup->net_salary, 2) }}
{{ __('House Rent') }}
{{ number_format((float) $salarySetup->house_rent, 2) }}
{{ __('Medical') }}
{{ number_format((float) $salarySetup->medical, 2) }}
{{ __('Conveyance') }}
{{ number_format((float) $salarySetup->conveyance, 2) }}
@else
{{ __('No salary setup found') }}
@endif
{{ __('Current Loans & Outstanding') }}
@if($loanHistory['pf']['enabled'])
{{ __('PF Outstanding') }}
{{ number_format($loanHistory['pf']['outstanding'], 2) }}
{{ __('Balance') }} {{ number_format($loanHistory['pf']['balance'], 2) }}
@endif @if($loanHistory['gf']['enabled'])
{{ __('GF Outstanding') }}
{{ number_format($loanHistory['gf']['outstanding'], 2) }}
{{ __('Balance') }} {{ number_format($loanHistory['gf']['balance'], 2) }}
@endif @if($loanHistory['swf']['enabled'])
{{ __('SWF Outstanding') }}
{{ number_format($loanHistory['swf']['outstanding'], 2) }}
{{ __('Balance') }} {{ number_format($loanHistory['swf']['balance'], 2) }}
@endif
{{ __('Advance Salary') }}
{{ number_format($loanHistory['advance_salary']['outstanding'], 2) }}
{{ $loanHistory['advance_salary']['current']->count() }} {{ __('active') }}
{{ __('Salary Reviews') }} ({{ __('Latest') }} 50)
@if($salaryReviews->isEmpty())
{{ __('No salary review records') }}
@else @foreach($salaryReviews as $r) @endforeach
{{ __('Recorded') }} {{ __('Effective') }} {{ __('Type') }} {{ __('Increment') }} {{ __('Status') }} {{ __('By') }}
{{ $r->created_at?->format('Y-m-d') }} {{ $r->effective_date?->format('Y-m-d') ?? '—' }} {{ $r->review_type ?? '—' }} {{ $r->increment_mode ? ucfirst($r->increment_mode) : '—' }} {{ $r->increment_value !== null ? number_format((float) $r->increment_value, 2) : '' }} @if($r->status === \App\Models\SalaryReview::STATUS_APPROVED) {{ __('Applied') }} @elseif($r->status === \App\Models\SalaryReview::STATUS_REJECTED) {{ __('Rejected') }} @else {{ __('Pending') }} @endif {{ $r->createdBy?->name ?? '—' }}
@endif
{{ __('Promotion History') }}
@if($promotions->isEmpty())
{{ __('No promotion records') }}
@else @foreach($promotions as $p) @endforeach
{{ __('Date') }} {{ __('Designation') }} {{ __('Department') }}
{{ $p->effective_date?->format('Y-m-d') ?? $p->created_at?->format('Y-m-d') }} {{ $p->fromDesignation?->name ?? '—' }} → {{ $p->toDesignation?->name ?? '—' }} {{ $p->fromDepartment?->name ?? '—' }} → {{ $p->toDepartment?->name ?? '—' }}
@endif
{{ __('Branch Tenure History') }}
@if($branchTenures->isEmpty())
{{ __('No branch tenure records') }}
@else @foreach($branchTenures as $tenure) @endforeach
{{ __('Branch') }} {{ __('Joined') }} {{ __('Left') }} {{ __('Duration') }} {{ __('Status') }}
{{ $tenure->branch?->name ?? '—' }} {{ $tenure->joined_at?->format('Y-m-d') ?? '—' }} {{ $tenure->isCurrent() ? __('Present') : ($tenure->left_at?->format('Y-m-d') ?? '—') }} @if($tenure->hasStarted()) {{ $tenure->durationLabel() }} ({{ $tenure->durationDays() }}d) @else {{ $tenure->durationLabel() }} @endif @if($tenure->isCurrent()) {{ __('Current') }} @else {{ __('Past') }} @endif
@endif
@if($loanHistory['pf']['enabled'])
{{ __('PF Loan History') }} {{ __('Balance') }} {{ number_format($loanHistory['pf']['balance'], 2) }}
@include('admin.staff.partials.employee-history-print-fund-loans', ['loans' => $loanHistory['pf']['history']])
@endif @if($loanHistory['gf']['enabled'])
{{ __('GF Loan History') }} {{ __('Balance') }} {{ number_format($loanHistory['gf']['balance'], 2) }}
@include('admin.staff.partials.employee-history-print-fund-loans', ['loans' => $loanHistory['gf']['history']])
@endif @if($loanHistory['swf']['enabled'])
{{ __('SWF Loan History') }} {{ __('Balance') }} {{ number_format($loanHistory['swf']['balance'], 2) }}
@include('admin.staff.partials.employee-history-print-fund-loans', ['loans' => $loanHistory['swf']['history']])
@endif
{{ __('Advance Salary History') }}
@if($loanHistory['advance_salary']['history']->isEmpty())
{{ __('No advance salary records') }}
@else @foreach($loanHistory['advance_salary']['history'] as $advance) @endforeach
{{ __('Applied') }} {{ __('Amount') }} {{ __('Paid') }} {{ __('Remaining') }} {{ __('Duration') }} {{ __('Status') }}
{{ $advance->apply_date ? \Carbon\Carbon::parse($advance->apply_date)->format('Y-m-d') : ($advance->created_at?->format('Y-m-d') ?? '—') }} {{ number_format((float) $advance->amount, 2) }} {{ number_format((float) $advance->paid_amount, 2) }} {{ number_format((float) $advance->remaining_amount, 2) }} {{ $advance->duration }} {{ __('mo') }} @if((int) $advance->status !== 1) {{ __('Pending') }} @elseif($advance->remaining_amount > 0) {{ __('Active') }} @else {{ __('Closed') }} @endif
@endif
{{ __('Asset History') }} ({{ __('Latest') }} 100)
@if($assetHistory->isEmpty())
{{ __('No asset records') }}
@else @foreach($assetHistory as $a) @endforeach
{{ __('Recorded') }} {{ __('Assign Date') }} {{ __('Asset') }} {{ __('Category') }} {{ __('Qty') }} {{ __('Status') }} {{ __('Return') }}
{{ $a->created_at?->format('Y-m-d') }} {{ $a->assign_date ? \Carbon\Carbon::parse($a->assign_date)->format('Y-m-d') : '—' }} {{ $a->asset_item?->name ?? '—' }} {{ $a->asset_category?->name ?? '—' }} {{ $a->qty }} {{ (int) $a->status === 1 ? __('Active') : __('Inactive') }} {{ (int) $a->return === 1 ? __('Returned') : __('Not Returned') }}
@endif