@extends('layouts.app') @section('title', ($currentSalary->isEmpty() ? 'Assign' : 'Revise') . ' Salary — ' . $employee->full_name) @section('breadcrumbs') @endsection @section('content')
{{-- Employee Info Header --}}
{{ strtoupper(substr($employee->first_name, 0, 1)) }}

{{ $employee->full_name }}

{{ $employee->employee_code }} · {{ $employee->department->name ?? '' }} · {{ $employee->designation->name ?? '' }}

@csrf {{-- Effective Date --}}
@error('effective_from')

{{ $message }}

@enderror
{{-- Earnings --}}

Earnings

@foreach($earningComponents as $comp) @php $existing = $currentSalary->firstWhere('salary_component_id', $comp->id); @endphp
{{ $comp->name }} {{ $comp->code }}
OMR
@endforeach
{{-- Summary --}}
Total Monthly Salary OMR 0.000
@if(!$currentSalary->isEmpty())
Previous Total OMR {{ number_format($currentSalary->sum('amount'), 3) }}
@endif
{{-- Actions --}}
Cancel
@endsection