@extends('admin.layout.master') @section('content') @section('custom_style') {{-- --}} {{-- --}} @endsection
| SL | Code | Name | Designation | @foreach ($months as $month){{ date("M",strtotime($month)) }} | @endforeachTotal | Consumed | Available | Remarks |
|---|---|---|---|---|---|---|---|---|
| {{ $sl++ }} | {{ $employeeLeaves->first()->empBasicInfo->emp_code }} | {{ $employeeLeaves->first()->empBasicInfo->emp_name }} | {{ $employeeLeaves->first()->empBasicInfo->fetch_designation->name }} | @foreach ($months as $month) @php $monthStart = carbon()->parse($month)->firstOfMonth()->format('Y-m-d'); $monthEnd = carbon()->parse($month)->endOfMonth()->format('Y-m-d'); $monthly_leaves = $employeeLeaves->where('start_date',">=", $monthStart)->where('end_date',"<=", $monthEnd)->sum('leave_count'); @endphp{{ $monthly_leaves }} | @endforeach{{$leave_types->sum('leave_count')}} | {{$employeeLeaves->sum('leave_count')}} | {{$leave_types->sum('leave_count') - $employeeLeaves->sum('leave_count')}} |