@extends('layouts.sidebar') @section('title', 'Edit Billing') @section('content')

Edit Billing

Employee Name: {{ $payroll->employee->first_name }} {{ strtoupper(substr($payroll->employee->middle_name, 0, 1)) }}. {{ $payroll->employee->last_name }}

@if (session('success'))

{{ session('success') }}

@endif
@csrf @method('PUT') @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @php if ($payroll->days_adjustment == null) { $value = $payroll->days_worked_withdeduction; } else { $value = $payroll->days_adjustment; } if ($payroll->rate_adjustment == null) { $valuerate = $payroll->rate; } else { $valuerate = $payroll->rate_adjustment; } @endphp
@error('days_worked_withdeduction') {{ $message }} @enderror
@error('rate') {{ $message }} @enderror
@foreach ($constantearning as $constant) @php $trxcode = \App\Models\Trxcode::find($constant->trxConstant->group_code_id); @endphp
@error('constant_deductions.amount.' . $loop->index) {{ $message }} @enderror
@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
@error('loan_deductions.amount.' . $loop->index) {{ $message }} @enderror
@endforeach
@foreach ($others as $other) @php if ($other->amount_adj == null) { $value = $other->amount; } else { $value = $other->amount_adj; } @endphp
@error('others.name.' . $loop->index) {{ $message }} @enderror
@error('others.amount.' . $loop->index) {{ $message }} @enderror
@endforeach
@foreach ($benefits as $benefit) @php if ($benefit->er_adjustment == null) { $value = $benefit->employer_share; } else { $value = $benefit->er_adjustment; } @endphp
@error('benefits.type.' . $loop->index) {{ $message }} @enderror
@error('benefits.employee_share.' . $loop->index) {{ $message }} @enderror
@endforeach
@php $code = \App\Models\Batchcode::find($payroll->code_id); @endphp Back
@endsection