@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Salary Structure Rules')) @section('content') @php $rules = old('rules', $row->rules ?? []); if (! is_array($rules) || count($rules) === 0) { $rules = [\App\Services\SalaryStructureService::normalizeRule([ 'id' => 'new_1', 'label' => '', 'type' => \App\Services\SalaryStructureService::TYPE_PERCENT_OF_BASIC, 'apply_at' => \App\Services\SalaryStructureService::APPLY_SETUP, 'percent' => 0, 'target' => 'house_rent', 'enabled' => true, 'sort' => 10, ])]; } $targetLabels = [ 'basic_salary' => __('Basic Salary'), 'house_rent' => __('House Rent'), 'medical' => __('Medical'), 'food' => __('Food / Lunch'), 'conveyance' => __('Conveyance / Travel'), 'utility' => __('Utility / Mobile'), 'Others' => __('Others'), 'provident_fund' => __('Provident Fund'), ]; @endphp
{{ __('Salary Structure Rules') }}
@if((int) get_setting('salary_structure_rules') !== 1) {{ __('Feature is OFF in Website Settings') }} @else {{ __('Feature is ON') }} @endif

{{ __('One configuration for the whole company. Enter basic on salary setup; rules fill allowances. Lunch and optional bill overrides apply when creating payroll.') }}

@csrf
@csrf
@foreach($rules as $i => $rule) @php $rule = is_array($rule) ? $rule : []; @endphp @endforeach
{{ __('On') }} {{ __('Label') }} {{ __('Type') }} {{ __('% / Amount / Rate') }} {{ __('Apply at') }} {{ __('Target column') }} {{ __('Payroll override') }} {{ __('Sort') }}
{{ __('Salary Setup') }}
@endsection @section('script') @endsection