@php // One repeatable Corporate Wages block; $index is its position in the corporate_wage[] input array $corporateWage = $wage ?? null; $removable = $removable ?? false; // Stored amounts are shown without trailing zeros (e.g. 26 instead of 26.00) $corpValue = function ($field) use ($corporateWage, $index) { $value = old('corporate_wage.' . $index . '.' . $field, $corporateWage?->{$field}); return is_numeric($value) && !in_array($field, \App\Models\ClientCorporateWage::TEXT_FIELDS) ? $value + 0 : $value; }; $corpName = fn ($field) => 'corporate_wage[' . $index . '][' . $field . ']'; $gstSlabs = ['0.5+0.5' => '0.5% + 0.5%', '0.7+0.75' => '0.7% + 0.75%', '2.5+2.5' => '2.5% + 2.5%', '3+3' => '3% + 3%', '6+6' => '6% + 6%', '9+9' => '9% + 9%', '14+14' => '14% + 14%', '0+0' => 'Exempt (0%)']; $igstSlabs = ['5' => '5%', '12' => '12%', '18' => '18%', '28' => '28%', '0' => '0% (Exempt)']; @endphp
Corporate Wages
@foreach (\App\Models\ClientCorporateWage::EARNINGS + ['total_earnings' => 'Total Earnings'] as $field => $label)
@if ($field === 'other_allowance') @else @endif
@endforeach
EMP DEDUCTIONS
@foreach (\App\Models\ClientCorporateWage::EMP_DEDUCTIONS as $field => $label)
@endforeach
EMR DEDUCTIONS
@foreach (\App\Models\ClientCorporateWage::EMR_DEDUCTIONS as $field => $label)
@endforeach
{{-- Percentage of the service charge (0 - 100): only shown once a Service Cost From is selected --}}
@foreach (['service_charge' => 'Service Charge', 'sub_total' => 'Sub Total', 'gst_gross' => 'GST Taxable value'] as $field => $label)
@endforeach
@if ($removable)
@endif