@foreach ($constantearning as $constant)
@php
$trxcode = \App\Models\Trxcode::find($constant->trxConstant->group_code_id);
@endphp
@endforeach
@foreach ($loan_deductions as $loan)
@php
$trxcode = \App\Models\Trxcode::find($loan->trxLoan->group_code_id);
if ($loan->amount_ad == null) {
$value = $loan->Amount;
} else {
$value = $loan->amount_ad;
}
@endphp
@endforeach
@foreach ($others as $other)
@php
if ($other->amount_adj == null) {
$value = $other->amount;
} else {
$value = $other->amount_adj;
}
@endphp
@endforeach
@foreach ($benefits as $benefit)
@php
if ($benefit->er_adjustment == null) {
$value = $benefit->employer_share;
} else {
$value = $benefit->er_adjustment;
}
@endphp
@endforeach