@foreach($_data->fiscalYearMonthList as $month)
@php
$monnthStartDate = date('Y-m-01', strtotime($month));
$monnthLastDate = date('Y-m-t', strtotime($month));
$thisMonthConsumedRegLeave = $_data->leaveService->getEmployeeConsumedLeaveByLeaveTypeAndMonthRangeV2($_data->user->employee, $leaveType, $monnthStartDate, $monnthLastDate, null, $optionalParam);
$thisMonthConsumedLateLeave = $_data->leaveService->getEmployeeConsumedLateLeaveByLeaveTypeAndMonth($_data->user->employee, $leaveType, $month, $optionalParam);
$regRow[] = $thisMonthConsumedRegLeave;
$lateRow[] = $thisMonthConsumedLateLeave;
@endphp
@endforeach
| {{ $leaveType->short_name }} |
Regular |
{{ $ob != 0 ? $ob : '-' }}
|
{{ $yearlyAllocation != 0 ? $yearlyAllocation : '-' }}
|
@php
$getEmployeeEligibleLeave = $_data->leaveService->getEmployeeEligibleLeave(
$_data->user->employee,
$yearlyAllocation,
$_data->selectedFiscalYear,
$leaveType,
$optionalParam
);
@endphp
{{ $getEmployeeEligibleLeave != 0 ? $getEmployeeEligibleLeave : '-' }}
|
@foreach($regRow as $item)
{{ $item != 0 ? $item : '-' }} |
@endforeach
{{ $totalConsumedLeave != 0 ? $totalConsumedLeave : '-' }}
|
{{ $remainingLeave != 0 ? $remainingLeave : '-' }}
|
| {{ $leaveType->short_name }} |
|
{{ $ob != 0 ? $ob : '-' }} |
{{ $yearlyAllocation != 0 ? $yearlyAllocation : '-' }} |
@php
$eligibleLeave = $_data->leaveService
->getEmployeeEligibleLeave($_data->user->employee, $yearlyAllocation, $_data->selectedFiscalYear, $leaveType, $optionalParam)
@endphp
@if($eligibleLeave > 0)
{{--
* If it is earn leave and eligible leave is greater than 0, it means employee has been completed 5 years
* and he will elegible total earn leave, and yearly allocated earn leave will be added next year
--}}
@if($leaveType->tag->slug == 'earn')
{{ $ob }}{{-- Eligible total earn leave --}}
@else
{{ $eligibleLeave }}
@endif
@else
-
@endif
|
@foreach($_data->fiscalYearMonthList as $month)
@php
$monnthStartDate = date('Y-m-01', strtotime($month));
$monnthLastDate = date('Y-m-t', strtotime($month));
// $thisMonthConsumedLeave = $_data->leaveService->getEmployeeConsumedLeaveByLeaveTypeAndMonthRange(
$thisMonthConsumedLeave = $_data->leaveService->getEmployeeConsumedLeaveByLeaveTypeAndMonthRangeV2(
$_data->user->employee, $leaveType, $monnthStartDate, $monnthLastDate, null, $optionalParam);
@endphp
{{ $thisMonthConsumedLeave != 0 ? $thisMonthConsumedLeave : '-' }}
|
@endforeach
{{ $totalConsumedLeave != 0 ? $totalConsumedLeave : '-' }} |
{{ $remainingLeave != 0 ? $remainingLeave : '-' }} |
@endif
@endforeach