{{-- ===== School Header ===== --}}
@php use Illuminate\Support\Facades\Storage; $logoPath = $schoolInfo->school_logo ? public_path('core/storage/app/public/' . $schoolInfo->school_logo) : public_path('images/default-avatar.png'); @endphp School Logo

{{ $schoolInfo->school_name ?? '--' }}

{{ $schoolInfo->address ?? '--' }}

{{ $schoolInfo->email ?? '' }} | {{ $schoolInfo->phone ?? '' }}

{{-- ===== Report Title ===== --}}
Salary & Provident Fund Report
{{-- ===== Teacher Info ===== --}}
Teacher Name: {{ $teacher->name ?? '--' }}   |   Reg. No: {{ $teacher->teacher_code ?? '--' }}
Phone: {{ $teacher->phone ?? '--' }}   |   Date of Joining: {{ $teacher->date_of_joining ? \Carbon\Carbon::parse($teacher->date_of_joining)->format('d M Y') : '--' }}
{{-- ===== PF Summary ===== --}}

Provident Fund Summary

@if($fundAccount)
Current Balance Locked Balance Withdrawable Last Updated
{{ number_format($fundAccount->current_balance) }} {{ number_format($fundAccount->locked_balance) }} {{ number_format($fundAccount->current_balance - $fundAccount->locked_balance) }} {{ $fundAccount->updated_at?->format('d M Y, h:i A') }}
@else

No provident fund record found.

@endif {{-- ===== Salary History ===== --}}

Salary Payment History

@forelse($salaryHistory as $s) @php $pf = ($s->salary_amount ?? 0) - ($s->payment_amount ?? 0); @endphp @empty @endforelse
Month Base Salary PF Net Paid Method Remarks
{{ \Carbon\Carbon::parse($s->month)->format('F Y') }} {{ number_format($s->salary_amount) }} {{ number_format($pf) }} {{ number_format($s->payment_amount) }} {{ $s->paymentMethod->name ?? '-' }} {{ $s->remarks ?? '-' }}
No salary record found.
{{-- ===== PF Transactions ===== --}}

Provident Fund Transactions

@forelse($pfTransactions as $p) @empty @endforelse
Date Type Amount Reference Note
{{ \Carbon\Carbon::parse($p->performed_at)->format('d M Y') }} {{ ucfirst($p->type) }} {{ number_format($p->amount) }} {{ $p->ref_table ?? '-' }}{{ $p->ref_id ? ' (#'.$p->ref_id.')' : '' }} {{ $p->note ?? '-' }}
No PF transaction found.
{{-- ===== Footer ===== --}}