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

{{ __('Employee Salary Detail') }}

{{ __('Back') }}
@include('partials.flash')
@php $allowances = (float) $assignment->house_rent + (float) $assignment->medical_allowance + (float) $assignment->conveyance_allowance + (float) $assignment->other_allowance; $today = now()->toDateString(); $status = $assignment->effective_from > $today ? 'Future' : (($assignment->effective_to && $assignment->effective_to < $today) ? 'Expired' : 'Active'); $statusClass = $status === 'Active' ? 'bg-success' : ($status === 'Future' ? 'bg-info' : 'bg-secondary'); @endphp
{{ __('Employee:') }} {{ trim($assignment->first_name.' '.$assignment->last_name) }} ({{ $assignment->employee_code }})
{{ __('Department:') }} {{ $assignment->department_name ?: '-' }}
{{ __('Designation:') }} {{ $assignment->designation_name ?: '-' }}
{{ __('Salary Grade:') }} {{ $assignment->grade_name ? $assignment->grade_name.' ('.$assignment->grade_code.')' : '-' }}
{{ __('Grade Range:') }} {{ $assignment->min_salary !== null ? number_format((float) $assignment->min_salary, 2) : '-' }} - {{ $assignment->max_salary !== null ? number_format((float) $assignment->max_salary, 2) : '-' }}
{{ __('Status:') }} {{ __($status) }}
{{ __('Salary Structure') }}{{ $assignment->template_name }} ({{ $assignment->template_code }})
{{ __('Pay Frequency') }}{{ __(ucfirst($assignment->pay_frequency ?: 'template')) }}
{{ __('Basic Salary') }}{{ number_format((float) $assignment->basic_salary, 2) }}
{{ __('House Rent') }}{{ number_format((float) $assignment->house_rent, 2) }}
{{ __('Medical Allowance') }}{{ number_format((float) $assignment->medical_allowance, 2) }}
{{ __('Conveyance Allowance') }}{{ number_format((float) $assignment->conveyance_allowance, 2) }}
{{ __('Other Allowance') }}{{ number_format((float) $assignment->other_allowance, 2) }}
{{ __('Allowance Total') }}{{ number_format($allowances, 2) }}
{{ __('Gross Salary') }}{{ number_format((float) $assignment->gross_salary, 2) }}
{{ __('Provident Fund %') }}{{ number_format((float) $assignment->provident_fund_percent, 2) }}
{{ __('Tax %') }}{{ number_format((float) $assignment->tax_percent, 2) }}
{{ __('CTC Amount') }}{{ $assignment->ctc_amount !== null ? number_format((float) $assignment->ctc_amount, 2) : '-' }}
{{ __('Effective From') }}{{ $assignment->effective_from }}
{{ __('Effective To') }}{{ $assignment->effective_to ?: __('Current') }}
{{ __('Notes') }}{{ $assignment->notes ?: '-' }}
@endsection