@extends('layouts.app') @section('title', 'My Payroll') @section('content')

My Payroll History

Employee Information

Employee Number

{{ $employee->employee_number }}

Employment Type

{{ ucfirst($employee->employment_type) }}

Department

{{ $employee->department ?? 'N/A' }}

Payroll History

@forelse($entries as $entry) @empty @endforelse
Period Regular Hours Overtime Hours Gross Pay EPF (8%) Net Pay Status
{{ $entry->payrollPeriod->period_start->format('M d, Y') }}
to {{ $entry->payrollPeriod->period_end->format('M d, Y') }}
{{ number_format($entry->regular_hours, 2) }} hrs {{ number_format($entry->getTotalOvertimeHours(), 2) }} hrs @if($entry->overtime_hours > 0 || $entry->overtime_hours_2x > 0)
(1.5x: {{ number_format($entry->overtime_hours, 2) }}, 2x: {{ number_format($entry->overtime_hours_2x, 2) }}) @endif
LKR {{ number_format($entry->gross_pay, 2) }} @if($entry->base_amount > 0)
Base: {{ number_format($entry->base_amount, 2) }} @if($entry->overtime_amount > 0 || $entry->overtime_amount_2x > 0) + OT: {{ number_format($entry->overtime_amount + $entry->overtime_amount_2x, 2) }} @endif @endif
LKR {{ number_format($entry->epf_employee, 2) }} LKR {{ number_format($entry->net_pay, 2) }} {{ ucfirst($entry->status) }}
No payroll history found
@if($entries->count() > 0)

Total Hours (Last 12 Periods)

{{ number_format($entries->sum('regular_hours') + $entries->sum('overtime_hours') + $entries->sum('overtime_hours_2x'), 2) }} hrs

Total Gross Pay

LKR {{ number_format($entries->sum('gross_pay'), 2) }}

Total Net Pay

LKR {{ number_format($entries->sum('net_pay'), 2) }}

@endif
@endsection