@extends('admin.layout.master') @section('content') @section('custom_style') {{-- --}} {{-- --}} @endsection

Month Wise Leave Summary

@include('payroll.includes.report_print_excel_button')
@if (count($leaves) > 0)
{!! $print['head'] !!} @foreach ($leaves->chunk(12) as $chunkLeaves) @include('payroll.report_header',[ 'report_title'=>'Month Wise Laeve Summary', 'department_info'=>$department, ]) @foreach ($months as $month) @endforeach @php $sl = 1; @endphp @foreach ($chunkLeaves as $emp_id => $employeeLeaves) @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 @endforeach @endforeach
SL Code Name Designation{{ date("M",strtotime($month)) }}Total Consumed Available Remarks
{{ $sl++ }} {{ $employeeLeaves->first()->empBasicInfo->emp_code }} {{ $employeeLeaves->first()->empBasicInfo->emp_name }} {{ $employeeLeaves->first()->empBasicInfo->fetch_designation->name }} {{ $monthly_leaves }} {{$leave_types->sum('leave_count')}} {{$employeeLeaves->sum('leave_count')}} {{$leave_types->sum('leave_count') - $employeeLeaves->sum('leave_count')}}
@endforeach
@else @if (request()->get('search') != null)

No Data Found

@endif @endif @endsection @section('script') @endsection