@extends('employee.layouts.app') @section('title', get_setting('site_name').' | '.__('My PF')) @section('content') @include('employee.fund.partials.emp_fund_styles', ['wrap' => 'emp-pf'])

{{ __('My Provident Fund (PF)') }}

{{ __('View balance, statement, loans, and submit requests.') }}

{{ __('PDF') }} {{ __('Excel') }}
@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif @if(!empty($closedFinanceYears) && $closedFinanceYears->isNotEmpty())
{{ __('Closed finance year statements') }}
@foreach($closedFinanceYears as $snap) FY {{ $snap->financeYear?->fiscal_year_end }} @endforeach
@endif
{{ number_format((float) $balance, 2) }}
{{ __('Current balance') }}
{{ number_format((float) $totalEmp, 2) }}
{{ __('Employee contrib') }}
{{ number_format((float) $totalEmployer, 2) }}
{{ __('Employer contrib') }}
{{ number_format((float) $outstandingLoan, 2) }}
{{ __('Outstanding loan') }}
{{ __('Statement') }} @if($hasFilters ?? false) {{ __('Clear filters') }} @endif
@forelse($rows as $row) @empty @endforelse
{{ __('Date') }} {{ __('Type') }} {{ __('Amount') }} {{ __('Ref') }} {{ __('Notes') }}
{{ $row->entry_date?->format('Y-m-d') }} {{ $row->type }} {{ number_format((float) $row->amount, 2) }} @include('fund.partials.ledger_ref_cell', ['row' => $row]) {{ $row->notes ?: '—' }}
@if($hasFilters ?? false) {{ __('No records match your filters.') }} @else {{ __('No records yet.') }} @endif
@if($rows->hasPages()) @endif
{{ __('Loan history') }} {{ __('View details per loan') }}
@forelse($loans as $loan) @php $paidCount = $loan->installments->where('status', 'paid')->count(); $totalInst = $loan->installments->count(); $statusBadge = match ($loan->status) { 'active' => 'active', 'pending' => 'pending', 'closed' => 'closed', 'rejected' => 'rejected', default => 'default', }; @endphp @empty @endforelse
{{ __('Loan') }} {{ __('Status') }} {{ __('Principal') }} {{ __('Outstanding') }} {{ __('Period') }} {{ __('Progress') }} {{ __('Requested') }} {{ __('Action') }}
#{{ $loan->id }} {{ ucfirst($loan->status) }} {{ number_format((float) $loan->principal, 2) }} {{ number_format((float) $loan->outstanding, 2) }} {{ $loan->loan_period_months ? $loan->loan_period_months.' '.__('mo') : '—' }} @if($totalInst > 0) {{ $paidCount }}/{{ $totalInst }} {{ __('paid') }} @else — @endif {{ $loan->requested_at?->format('Y-m-d') ?? '—' }}
{{ __('No loan records yet.') }}
@foreach($loans as $loan)
@include('employee.pf.partials.loan_detail_content', [ 'loan' => $loan, 'repayments' => $repayments, 'fundSettings' => $pfSettings ?? null, ])
@endforeach
@if($loansEnabled ?? true)
{{ __('Request PF loan') }}
@csrf
{{ __('Loan amount') }}
@if($maxLoanAllowed !== null) {{ __('You can borrow up to :amount based on your PF balance.', ['amount' => number_format($maxLoanAllowed, 2)]) }} @endif
{{ __('Repayment mode') }}
{{ __('Repayment schedule') }}
@if(\App\Support\LoanCalculationMethod::isAmortization($loanCalculationMethod ?? null)) {{ __('Estimated scheduled monthly payment (principal + interest) after approval.') }} @else {{ __('Estimated equal monthly principal after approval.') }} @endif {{ __('Loan service charge :pct% yearly per installment if paid on/after the 16th of the due month; no charge if paid by the 15th.', ['pct' => number_format($loanServiceChargeYearlyPercent, 2)]) }}
@if(!empty($guarantorStaff) && count($guarantorStaff))
{{ __('Guarantors') }}
@endif
@else
{{ __('PF loan requests are currently disabled by your organization.') }}
@endif @if($withdrawalsEnabled ?? true)
{{ __('Request withdrawal') }}
@csrf
{{ __('Withdrawal details') }}
@else
{{ __('PF withdrawal requests are currently disabled by your organization.') }}
@endif
@endsection @section('script') @include('admin.fund.partials.loan_installment_preview_js', [ 'loanCalculationMethod' => $loanCalculationMethod ?? null, 'loanAnnualInterestRate' => $loanAnnualInterestRate ?? 0, 'amountInputId' => 'pf_loan_amount', 'periodInputId' => 'pf_loan_period', 'previewInputId' => 'pf_loan_installment_preview', ]) @endsection