@extends('admin.layout.master') @section('title','Leave Details') @section('custom_style') @endsection @section ('content')

Print View

@include('payroll.includes.report_print_excel_button')
@if(count($leaves)>0)
{!! $print['head'] !!}
@include('payroll.report_header',['store_address'=>true ,'text_align'=>"text-start"])
@php $total_leave = $leave_types->sum('leave_count'); $total_leave_taken = 0; $total_leave_balance= 0; @endphp @foreach ($leave_types as $type) @php $all_appvoved_leaves = current_year_approved_employee_leaves($employee); $type_wise_taken_leave = $all_appvoved_leaves->where('leave_type_id',$type->id)->sum('leave_count'); $type_wise_balance = $type->leave_count - $type_wise_taken_leave; $total_leave_taken +=$type_wise_taken_leave; $total_leave_balance +=$type_wise_balance; @endphp @endforeach
Leave Type Days Enjoyed Balance
{{ $type->name }} {{$type->leave_count }} {{$type_wise_taken_leave}} {{$type_wise_balance}}
@foreach($leaves as $leave) @endforeach
Name : {{$employee->emp_name}} Code: {{$employee->emp_code}}
Department : {{$employee->fetch_designation ? $employee->fetch_department->name : null}} Designation : {{$employee->fetch_designation ? $employee->fetch_designation->name : null}}
Leave Type Start Date End Date Days
{{$leave->leaveTypeWithoutScope->name ?? null}} {{$leave->start_date}} {{$leave->end_date}} {{$leave->leave_count}}
Total Leave: {{number_format($leaves->sum('leave_count'))}}
Leave Reason: {{$leaves->first() ? $leaves->first()->leave_reason : null}}
Address While On Leave:
Phone:

Substitute For The Leave Time (If Applicable)

@php $sustitute = $leaves->first()->substitute; @endphp
Name : {{$sustitute ? $sustitute->emp_name : null}} Code: {{$sustitute ? $sustitute->emp_code : null}} Phone:
Department : {{$sustitute ? $sustitute->fetch_designation ? $sustitute->fetch_department->name : null : null}} Designation : {{$sustitute ? $sustitute->fetch_designation ? $sustitute->fetch_designation->name : null : null}}

Signature Of Employee

@include('payroll.signature')
@else @if (request()->has('search') != null)

No Data Found

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