@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