@if (isset($resignation->histories) && count($resignation->histories) > 0)
@foreach ($resignation->histories as $history) @if ($history->status == 'Reporting Manager Approved')
Reporting Manager ({{ $history->createdBy->name ?? '-' }})

Status: {{ $history->status }}

Remark: {{ $history->remark }}

Action On: {{ $history->created_at->format('d-m-Y h:i:s A') }}

@elseif ($history->status == 'Reporting Manager Rejected')
Reporting Manager ({{ $history->createdBy->name ?? '-' }})

Status: {{ $history->status }}

Remark: {{ $history->remark }}

Action On: {{ $history->created_at->format('d-m-Y h:i:s A') }}

@elseif ($history->status == 'Head Manager Accepted')
Head Manager ({{ $history->createdBy->name ?? '-' }})

Status: {{ $history->status }}

Remark: {{ $history->remark }}

Action On: {{ $history->created_at->format('d-m-Y h:i:s A') }}

@if (isset($resignation->otherAmounts) && count($resignation->otherAmounts) > 0) Recovery Amount: @php $totalAmount = 0; @endphp @foreach ($resignation->otherAmounts as $otherAmount) @php $totalAmount += $otherAmount->amount ?? 0; @endphp @endforeach
# Title Amount ()
{{ $loop->iteration }} {{ $otherAmount->title ?? '' }} {{ number_format($otherAmount->amount ?? 0, 2) }}
Total Amount {{ number_format($totalAmount, 2) }}
@endif
@if ($history->created_by == auth()->id() && $resignation->status != 'Account Approved') @endif
@elseif ($history->status == 'Head Manager Rejected')
Head Manager ({{ $history->createdBy->name ?? '-' }})

Status: {{ $history->status }}

Remark: {{ $history->remark }}

Action On: {{ $history->created_at->format('d-m-Y h:i:s A') }}

@elseif($history->status == 'HR Approved')
HR Manager ({{ $history->createdBy->name ?? '-' }})

Status: {{ $history->status }}

Remark: {{ $history->remark }}

Action On: {{ $history->created_at->format('d-m-Y h:i:s A') }}

Salary Amount: {{ $resignation->salary_amount ? number_format($resignation->salary_amount, 2) : 'N/A' }}

Tentative Full & Final Date: {{ $resignation->tentative_date ? date('d-m-Y', strtotime($resignation->tentative_date)) : 'N/A' }}

Final Exit Date: {{ $resignation->final_exit_date ? date('d-m-Y', strtotime($resignation->final_exit_date)) : 'N/A' }}

Take Over By: {{ $resignation->takeOverBy->employee_name ?? 'N/A' }}

@if ($history->created_by == auth()->id() && $resignation->status != 'Account Approved') @endif
@elseif ($history->status == 'HR Rejected')
HR Manager ({{ $history->createdBy->name ?? '-' }})

Status: {{ $history->status }}

Remark: {{ $history->remark }}

Action On: {{ $history->created_at->format('d-m-Y h:i:s A') }}

@elseif($history->status == 'Account Approved')
Account Department ({{ $history->createdBy->name ?? '-' }})

Status: {{ $history->status }}

Remark: {{ $history->remark }}

Action On: {{ $history->created_at->format('d-m-Y h:i:s A') }}

Tentative Full & Final Date: {{ $resignation->tentative_date ? date('d-m-Y', strtotime($resignation->tentative_date)) : 'N/A' }}

Final Exit Date: {{ $resignation->final_exit_date ? date('d-m-Y', strtotime($resignation->final_exit_date)) : 'N/A' }}

Final F&F Date: {{ $resignation->final_f_and_f_date ? date('d-m-Y', strtotime($resignation->final_f_and_f_date)) : 'N/A' }}

Payment Mode: {{ $resignation->payment_mode ?? 'N/A' }}

Total Recovery
@if (isset($resignation->otherAmounts)) @foreach ($resignation->otherAmounts as $otherAmount)
{{ $otherAmount->title }} {{ number_format($otherAmount->amount ?? 0, 2) }}
@endforeach @endif @if (isset($resignation->otherAmounts) && count($resignation->otherAmounts) > 0)
Actual Recovery {{ number_format($resignation->actual_recovery ?? 0, 2) }}
Remaining Recovery {{ number_format($resignation->remaining_recovery ?? 0, 2) }}
@else
No any recovery is pending.
@endif
Other Deduction
Deduction {{ number_format($resignation->other_deduction ?? 0, 2) }}
Final Settlement
Salary {{ number_format($resignation->salary_amount ?? 0, 2) }}
Remaining Recovery - {{ number_format($resignation->remaining_recovery ?? 0, 2) }}
Other Deduction - {{ number_format($resignation->other_deduction ?? 0, 2) }}
F&F Amount {{ number_format($resignation->final_amount ?? 0, 2) }}
@endif @endforeach
@else
Timeline data not found!
@endif