@extends('admin.layouts.app') @section('content')
Add/Edit Employee pay setup Details
@csrf
Employee Salary Details
Addition Head
@php // Collect valid addition heads $addition_heads = []; for($i=1; $i<=10; $i++) { $col = 'head'.$i; if(!empty($company->$col)) { $addition_heads[$i] = $company->$col; } } @endphp @foreach($addition_heads as $index => $head_name) @php $addition_val = $salarySetup ? $salarySetup->{'addition_'.$index} : '0.00'; $is_esi_checked = $salarySetup ? $salarySetup->{'is_esi_'.$index} : ($index == 1); $is_pf_checked = $salarySetup ? $salarySetup->{'is_pf_'.$index} : ($index == 1); $is_ot_checked = $salarySetup ? $salarySetup->{'is_ot_'.$index} : ($index == 1); @endphp
@if($index < 9)
@endif
@endforeach
Fixed Deduction Head
Fixed Deduction Head
@php // Collect valid fixed deduction heads $fixed_deduction_heads = []; for($i=1; $i<=5; $i++) { $col = 'deduction_head'.$i; if(!empty($company->$col)) { $fixed_deduction_heads[$i] = $company->$col; } } @endphp @foreach($fixed_deduction_heads as $index => $head_name) @php $fixed_deduction_val = $salarySetup ? $salarySetup->{'fixed_deduction_'.$index} : '0.00'; @endphp
@endforeach
@php // Collect valid define deduction heads $define_deduction_heads = []; for($i=1; $i<=5; $i++) { $col = 'ded_head'.$i; if(!empty($company->$col)) { $define_deduction_heads[$i] = $company->$col; } } @endphp @if(count($define_deduction_heads) > 0)
Define Deduction Heads
@foreach($define_deduction_heads as $index => $head_name) @php $define_deduction_val = $salarySetup ? $salarySetup->{'define_deduction_'.$index} : '0.00'; @endphp
@endforeach
@endif
Cancel
@endsection