@extends('layouts.app') @php $labels = ['allowance' => 'Allowances', 'deduction' => 'Deductions', 'relief' => 'Reliefs']; $label = $labels[$type]; $routeBase = 'payroll.' . $type . 's'; $isRelief = $type === 'relief'; $isAllowance = $type === 'allowance'; @endphp @section('title', $label) @section('content')

{{ $label }}

@if($isRelief) Additional tax reliefs applied on top of the personal relief. @elseif($isAllowance) Recurring earnings added to basic salary. Taxable allowances increase the PAYE base. @else Recurring deductions taken from gross pay before or after tax. @endif
@include('payroll._nav')
@if($isRelief) @else @endif

{{ $label }} register

{{ num($rows->count()) }} records
@if($isRelief)@endif @if(!$isRelief)@endif @if($isRelief)@endif @forelse($rows as $row) @if($isRelief)@endif @if(!$isRelief) @endif @if($isRelief) @endif @empty @endforelse
NameTypeAmountLimitApplies to{{ $isAllowance ? 'Taxable' : 'Pre-tax' }}StatusDefaultActions
{{ $row->name }}
@if($row->notes){{ \Illuminate\Support\Str::limit($row->notes, 50) }}@endif
{{ $row->type ?: '—' }} {{ money($row->amount) }}{{ $row->max_limit ? money($row->max_limit) : '—' }}{{ $row->applies_to === 'Specific Staff' ? ($staff->firstWhere('id', $row->staff_id)?->full_name ?? 'Specific staff') : $row->applies_to }}{!! ($isAllowance ? $row->taxable : $row->pre_tax) ? 'Yes' : 'No' !!} {!! $row->is_default ? 'Default' : 'Optional' !!}
@csrf @method('DELETE')
@csrf
@if($isRelief)
@else
@endif
@foreach($rows as $row)
@csrf @method('PUT')
@if($isRelief)
@else
@endif
@endforeach @endsection