@extends('home.partial.layout') @php $remarks = $data->remarks ?? ''; $id = $data->id ?? ''; use Carbon\Carbon; $startDate = Carbon::now(); $endDate = $startDate->copy()->addYears(1); $months = []; $currentDate = $startDate->copy(); while ($currentDate->lte($endDate)) { $months[$currentDate->format('F-Y')] = $currentDate->format('F Y'); $currentDate->addMonth(); } @endphp @section('content')

Earnings

@if (session()->has('success'))
{{ session('success') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf
@foreach($earnings as $earning) @endforeach
Emp
Name
Emp ID Month Department Additional
Reason
Additional
Amount
Total Additional
Amount
Remarks Action

{{$earning->employee->name}} {{$earning->employee->lname}}@if($earning->employee->designations){{$earning->employee->designations->name}}@else @endif

{{employeeIdMaker($earning->employee_id)}} {{$earning->month_year}} {{$earning->employee->employeeDepartment->name}} @foreach(json_decode($earning->additional_reason) as $reasons){{$reasons}}
@endforeach
@foreach(json_decode($earning->additional_amount) as $amount){{$amount}}
@endforeach
{{$earning->total_addtional_amount }} {{$earning->remarks}}
@endsection