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

Monthly Deductions

@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($deductions as $deduction) @endforeach
Emp
Name
Emp ID Month Department Deduction
Reason
Deduction
Amount
Total Deduction
Amount
Remarks Action

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

{{employeeIdMaker($deduction->employee_id)}} {{$deduction->month_year}} {{$deduction->employee->employeeDepartment->name}} @foreach(json_decode($deduction->deduction_reason) as $reasons){{$reasons}}
@endforeach
@foreach(json_decode($deduction->deduction_amount) as $amount){{$amount}}
@endforeach
{{$deduction->total_deduction_amount }} {{$deduction->remarks}}
@endsection