@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Salary Setup')) @section('content') @php $decodePresets = function ($key) { $raw = get_setting($key); if (! is_string($raw)) { return []; } $a = json_decode($raw, true); return is_array($a) ? $a : []; }; $presetAllowances = $decodePresets('salary_allowance_presets'); $presetDeductions = $decodePresets('salary_deduction_presets'); $allowRows = old('custom_allowances'); if (! is_array($allowRows) || count($allowRows) === 0) { $allowRows = [['label' => '', 'amount' => '']]; } $dedRows = old('custom_deductions'); if (! is_array($dedRows) || count($dedRows) === 0) { $dedRows = [['label' => '', 'amount' => '']]; } $structureEnabled = \App\Services\SalaryStructureService::enabled(); @endphp
@csrf
{{ __('Salary Setup') }}
@if($structureEnabled)
{{ __('Salary structure rules are on. Enter basic salary; other fields auto-fill from company rules (you can still edit).') }} {{ __('Configure rules') }}
@endif {{-- Employee --}}
{{ __('Employee') }}
{{-- Core compensation --}}
{{ __('Core Compensation') }}
{{-- Custom allowances --}}
{{ __('Additional Allowances') }}
@foreach($allowRows as $i => $row) @endforeach
{{ __('Type / Label') }} {{ __('Amount') }}
{{-- Custom deductions --}}
{{ __('Additional Deductions') }}
@foreach($dedRows as $i => $row) @endforeach
{{ __('Type / Label') }} {{ __('Amount') }}
@if((int) get_setting('pf') === 1)
{{ __('Provident Fund (PF)') }}
{{ __('Enable PF for this employee.') }}
@endif @if((int) get_setting('gf') === 1)
{{ __('Gratuity Fund (GF)') }}
{{ __('Enable GF for this employee.') }}
@endif @if((int) get_setting('swf') === 1)
{{ __('Staff Welfare Fund (SWF)') }}
{{ __('Enable SWF for this employee.') }}
@endif @if(\App\Services\PayrollIncomeTaxService::enabled())
{{ \App\Services\PayrollIncomeTaxService::label() }}
{{ __('No TDS on payroll.') }}
@endif
{{ __('Bulk Payroll Defaults') }}
{{ __('Added to gross in bulk payslip generation.') }}
{{ __('Added to gross in bulk payslip generation.') }}
{{ __('Totals') }}
@include('admin.salary._presets_sidebar', compact('presetAllowances', 'presetDeductions'))
@endsection @section('script') @endsection