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

{{ __('Employee Deductions') }}

@include('partials.flash')
@if($canManageDeductions ?? false)
@csrf
@endif
@if($canViewAllDeductions ?? false) @else @endif
{{ __('Reset') }}
@forelse($deductions as $deduction) @empty @endforelse
{{ __('Employee') }}{{ __('Deduction Name') }}{{ __('Calculation Method') }}{{ __('Amount / Percent') }}{{ __('Frequency') }}{{ __('Effective Period') }}{{ __('Status') }}{{ __('Actions') }}
{{ trim($deduction->employee?->first_name.' '.$deduction->employee?->last_name) }} ({{ $deduction->employee?->employee_code }}) {{ $deduction->deduction_type }} {{ $deduction->calculation_type === 'percent' ? __('Percent of Basic Salary') : __('Fixed Amount') }} {{ $deduction->calculation_type === 'percent' ? number_format((float)$deduction->amount, 2).'%' : number_format((float)$deduction->amount, 2) }} @if($deduction->frequency === 'monthly') {{ __('Every Monthly Payroll') }} @elseif($deduction->frequency === 'weekly') {{ __('Every Weekly Payroll') }} @else {{ __('One Payroll Only') }} @endif {{ $deduction->effective_from }} - {{ $deduction->effective_to ?: 'Open' }} {{ $deduction->is_active ? __('Active') : __('Inactive') }} @if($canManageDeductions ?? false)
@csrf @method('DELETE')
@else - @endif
{{ __('No deductions found.') }}
{{ $deductions->links('pagination::bootstrap-5') }}
@endsection