@php
// One repeatable Cumans Wages block; $index is its position in the cumans_wage[] input array
$wage = $wage ?? null;
$removable = $removable ?? false;
// Stored amounts are shown without trailing zeros (e.g. 26 instead of 26.00)
$wageValue = function ($field) use ($wage, $index) {
$value = old('cumans_wage.' . $index . '.' . $field, $wage?->{$field});
return is_numeric($value) && !in_array($field, \App\Models\ProjectCumansWage::TEXT_FIELDS) ? $value + 0 : $value;
};
$wageName = fn ($field) => 'cumans_wage[' . $index . '][' . $field . ']';
@endphp
Cumans Wages
@foreach (['bp', 'da', 'hra', 'conveyance', 'medical_allowance', 'incentive', 'ot', 'retaining_allowance', 'other_allowance', 'earned_gross', 'epf_wages'] as $field)
@endforeach
EMP DEDUCTIONS
@foreach (['emp_epf' => 'EPF (12%)', 'emp_esi' => 'ESI (0.75%)', 'net_pay' => 'Net Pay'] as $field => $label)
@endforeach
EMR DEDUCTIONS
@foreach (['emr_epf' => 'EPF (13%)', 'emr_esi' => 'ESI (3.25%)', 'ctc' => 'CTC'] as $field => $label)
@endforeach
@if ($removable)
@endif