@extends('layouts.app')
@section('page_title','My Payslips')
@section('page_subtitle','View your payroll records and net pay.')
@section('content')
<div class="card"><table class="table"><tr><th>Period</th><th>Basic</th><th>Allowances</th><th>Deductions</th><th>Tax</th><th>Net Pay</th><th>Status</th></tr>@forelse($payrolls as $payroll)<tr><td>{{ $payroll->pay_period_start?->format('d M Y') }} - {{ $payroll->pay_period_end?->format('d M Y') }}</td><td>₦{{ number_format($payroll->basic_salary,2) }}</td><td>₦{{ number_format($payroll->allowances,2) }}</td><td>₦{{ number_format($payroll->deductions,2) }}</td><td>₦{{ number_format($payroll->tax,2) }}</td><td><strong>₦{{ number_format($payroll->net_pay,2) }}</strong></td><td><span class="badge {{ $payroll->status==='paid'?'green':'yellow' }}">{{ ucfirst($payroll->status) }}</span></td></tr>@empty<tr><td colspan="7"><div class="empty">No payslips yet.</div></td></tr>@endforelse</table><div class="pagination">{{ $payrolls->links() }}</div></div>
@endsection
