@php
$sl = 1;
@endphp
@if (!empty($leaves))
@foreach ($leaves as $emp_id => $employee_leaves)
| {{ $sl++ }} |
{{ $employee_leaves->first()->empBasicInfo->emp_code }} |
{{ $employee_leaves->first()->empBasicInfo->emp_name }} |
{{ $employee_leaves->first()->empBasicInfo->fetch_designation->name }}
|
@php
$total_leave_balance= 0;
@endphp
@foreach ($leave_types as $type)
@php
$type_wise_taken_leave = $employee_leaves->where('leave_type_id',$type->id)->sum('leave_count');
$type_wise_balance = $type->leave_count - $type_wise_taken_leave;
$total_leave_balance +=$type_wise_balance;
@endphp
{{$type_wise_balance}} |
@endforeach
{{$total_leave_balance}} |
{{--
Details
| --}}
@endforeach
@endif