{{-- ============ Contractual container ============ --}}
{{-- --}}
Employees Overview
Total Employees

{{ $dataContractual['totalEmployees'] ?? 0 }}

Male Employees

{{ $dataContractual['maleEmployees'] ?? 0 }}

Female Employees

{{ $dataContractual['femaleEmployees'] ?? 0 }}

Divyang Employees

{{ $dataContractual['divyangEmployees'] ?? 0 }}

10/12 Years Completed

{{ $benifit_count['year_10_12'] ?? 0 }}

20/24 Years Completed

{{ $benifit_count['year_20_24'] ?? 0 }}

30/36 Years Completed

{{ $benifit_count['year_30_36'] ?? 0 }}

Retiring Employees in Next 6 Months

{{ $retire_employess ?? 0 }}

{{-- =========== Attendance overview ======== --}}
Attendance Overview (Contractual)
{{-- Todays present --}}
Today's Present
@php // $todaysPresentCount = $todayPunchData->where('check_in', '!=', '0000-00-00 00:00:00')->count(); $contractualtodaysPresentCount = $dataContractual['todayPunchData']->where('check_in', '!=', '0000-00-00 00:00:00')->count(); $contractualtodaysPresentPercent = $dataContractual['totalEmployees'] ? round(($contractualtodaysPresentCount / $dataContractual['totalEmployees']) * 100) : '0'; $contractualtodaysAbsentCount = $dataContractual['totalEmployees'] - $dataContractual['todayPunchData']->count(); @endphp
{{ $contractualtodaysPresentCount }} ({{ $contractualtodaysPresentPercent }}%)
Present Count
{{-- Todays absent --}}
Today's Absent
{{ max($contractualtodaysAbsentCount, 0) }} ({{ $dataContractual['totalEmployees'] ? round(($contractualtodaysAbsentCount / $dataContractual['totalEmployees']) * 100) : '0' }}%)
Absent Count
@php $permittedLeaveCount = $dataContractual['todayPunchData']->where('check_in', '0000-00-00 00:00:00')->where('punch_by', '2')->count(); @endphp
{{-- ======== Contractors attendance details ========== --}}
SWM employee attendance
@php $contractorsData = $dataContractual['vendor_attendance'] ?? []; @endphp @forelse ($contractorsData as $value) {{-- --}} {{-- --}} @empty @endforelse
Department Name Contractor Name Designation As Per Work Order Emp Count Present Absent
{{ $value['department']['name'] }} {{ $value['contractor']['name'] }} {{ $value['designation']['name'] }} {{ $value['emp_count'] }} {{ $value['present_count'] }} {{ $value['emp_count'] - $value['present_count'] }}{{ $value->department?->users?->where('department_id', $value->department_id)->where('contractor_id', $value->contractor_id)->where('designation_id', $value->designation_id)->count() }}{{ $value->emp_count - $value->department?->users?->where('department_id', $value->department_id)->where('contractor_id', $value->contractor_id)->where('designation_id', $value->designation_id)->count() }}
{{-- ================ Permanent Container ================== --}}
{{-- --}}
Employees Overview
Total Employees

{{ $dataPermanent['totalEmployees'] ?? 0 }}

Male Employees

{{ $dataPermanent['maleEmployees'] ?? 0 }}

Female Employees

{{ $dataPermanent['femaleEmployees'] ?? 0 }}

Divyang Employees

{{ $dataPermanent['divyangEmployees'] ?? 0 }}

10/12 Years Completed
{{--

{{ $benifit_count['year_10_12'] ?? 0 }}

--}}
20/24 Years Completed
{{--

{{ $benifit_count['year_20_24'] ?? 0 }}

--}}
30/36 Years Completed
{{--

{{ $benifit_count['year_30_36'] ?? 0 }}

--}}
Retiring Employees in Next 6 Months
{{--

{{ $retire_employess ?? 0 }}

--}}
{{-- =========== Attendance overview permanent ======== --}}
Attendance Overview (Permanent)
{{-- Todays present --}}
Today's Present
@php // $todaysPresentCount = $todayPunchData->where('check_in', '!=', '0000-00-00 00:00:00')->count(); $todaysPresentCount = $dataPermanent['todayPunchData']->where('check_in', '!=', '0000-00-00 00:00:00')->count(); $todaysPresentPercent = $dataPermanent['totalEmployees'] ? round(($todaysPresentCount / $dataPermanent['totalEmployees']) * 100) : '0'; $todaysAbsentCount = $dataPermanent['totalEmployees'] - $dataPermanent['todayPunchData']->count(); @endphp
{{ $todaysPresentCount }} ({{ $todaysPresentPercent }}%)
Present Count
{{-- Todays absent --}}
Today's Absent
{{ max($todaysAbsentCount, 0) }} ({{ $dataPermanent['totalEmployees'] ? round(($todaysAbsentCount / $dataPermanent['totalEmployees']) * 100) : '0' }}%)
Absent Count
@php $permittedLeaveCount = $dataPermanent['todayPunchData']->where('check_in', '0000-00-00 00:00:00')->where('punch_by', '2')->count(); @endphp