@extends('layouts.dashboard') @section('title', 'Edit Payroll') @section('content')

Edit Payroll

Edit payroll record for {{ $payroll->employee->name }}

Back to Payrolls
@if($payroll->status !== 'draft')

This payroll cannot be edited

Only payrolls with "draft" status can be edited. Current status: {{ ucfirst($payroll->status) }}

@endif
@csrf @method('PUT')
@if($payroll->status === 'draft') @else

{{ $payroll->employee->name }}

{{ $payroll->employee->employee_id ?? 'N/A' }}

@endif
@if($payroll->status === 'draft') Payroll can be edited and saved as draft @else Payroll is {{ $payroll->status }} and cannot be edited @endif
Cancel @if($payroll->status === 'draft') @else View Payroll @endif
@endsection