@extends('layouts.employee') @section('content')

Payroll & Payslips

View your salary history and download payslips

Dashboard

{{ $stats['total_payslips'] }}

Total Payslips

All time

RM {{ number_format($stats['total_net_this_year'], 2) }}

Net Pay This Year

{{ date('Y') }}

RM {{ number_format($stats['average_monthly_net'], 2) }}

Average Monthly

{{ date('Y') }}

@if($stats['latest_payroll']) RM {{ number_format($stats['latest_payroll']->net_pay, 2) }} @else -- @endif

Latest Payslip

@if($stats['latest_payroll']) {{ $stats['latest_payroll']->period_start->format('M Y') }} @else No records @endif
Clear
Payroll History
@if($payrollRecords->count() > 0)
@foreach($payrollRecords as $payroll)
{{ $payroll->period_start->format('F Y') }}
@if($payroll->status === 'paid') Paid @elseif($payroll->status === 'processed') Processed @else Draft @endif
Pay Period
{{ $payroll->period_start->format('M j') }} - {{ $payroll->period_end->format('M j, Y') }}
Gross Pay
RM {{ number_format($payroll->gross_pay, 2) }}
Deductions
-RM {{ number_format($payroll->deductions + $payroll->tax_deductions, 2) }}
Net Pay
RM {{ number_format($payroll->net_pay, 2) }}
@if($payroll->overtime_hours > 0)
{{ $payroll->overtime_hours }}h overtime
@endif @if($payroll->pay_date)
Paid: {{ $payroll->pay_date->format('M j, Y') }}
@endif
@endforeach
{{ $payrollRecords->withQueryString()->links() }}
@else
No payroll records found

Your payroll records will appear here once processed by HR.

@endif
@if($stats['latest_payroll'])
Latest Payslip Summary
Base Salary
RM {{ number_format($stats['latest_payroll']->base_salary, 2) }}
Allowances
RM {{ number_format($stats['latest_payroll']->allowances, 2) }}
Deductions
RM {{ number_format($stats['latest_payroll']->deductions + $stats['latest_payroll']->tax_deductions, 2) }}
Net Pay
RM {{ number_format($stats['latest_payroll']->net_pay, 2) }}
@endif
@endsection