@extends('employee.layouts.app') @section('title', get_setting('site_name').' | My SWF') @section('content')
{{ __('My Staff Welfare Fund (SWF)') }}
{{ __('PDF') }} {{ __('Excel') }}
{{ __('Current Balance') }}
{{ number_format((float)$balance, 2) }}
{{ __('Total Employee Contrib') }}
{{ number_format((float)$totalEmp, 2) }}
{{ __('Total Employer Contrib') }}
{{ number_format((float)$totalEmployer, 2) }}
{{ __('Outstanding Loan') }}
{{ number_format((float)$outstandingLoan, 2) }}
{{ __('Statement') }}
{{ __('Clear') }}
@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) }} {{ $row->ref_type }} @if($row->ref_id) (#{{ $row->ref_id }}) @endif {{ $row->notes }}
{{ __('No records') }}
{{ $rows->links() }}
{{ __('Loan History') }}
{{ __('View details per loan') }}
@forelse($loans as $loan) @php $paidCount = $loan->installments->where('status', 'paid')->count(); $totalInst = $loan->installments->count(); $statusClass = match ($loan->status) { 'active' => 'badge-primary', 'pending' => 'badge-warning', 'closed' => 'badge-success', 'rejected' => 'badge-danger', default => 'badge-secondary', }; @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.swf.partials.loan_detail_content', [ 'loan' => $loan, 'repayments' => $repayments, 'loanServiceChargeYearlyPercent' => $loanServiceChargeYearlyPercent, ])
@endforeach
{{ __('Request SWF Loan') }}
@csrf
@if($maxLoanAllowed !== null) {{ __('You can borrow up to :amount based on your SWF balance.', ['amount' => number_format($maxLoanAllowed, 2)]) }} @endif
{{ __('Estimated equal monthly principal after approval.') }} {{ __('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)]) }}
{{ __('Request Withdrawal') }}
@csrf
@endsection @section('script') @endsection