CSR AND PLACEMENT DIVISION
REPORT ON EMPLOYMENT

MONTH: {{ $filters['month'] }} Year: {{ $filters['year'] }}
NAME OF ENTERPRISE: {{ auth()->user()->name }}
NAME OF AGENCY / CONTRACTOR: N/A

@php // Indirect categories $indirectCategories = ['Security', 'Janitorial', 'Ground', 'Construction', 'Others']; // Include Direct as the first category $categories = array_merge(['Direct'], $indirectCategories); // Genders $genders = ['Male', 'Female']; // Employment statuses $statuses = ['Regular', 'Probationary', 'Casual']; // Direct sub-categories $directs = ['AVP and up', 'Managerial', 'Supervisory', 'Rank and File']; // Residences (BY RESENDES) $residences = [ 'Angeles', 'Mabalacat', 'Porac', 'Other Pampanga', 'Bamban', 'Capas', 'Other Tarlac', 'Others', ]; // Count each direct sub-category $directCounts = []; foreach ($directs as $direct) { $directCounts[$direct] = $records->where('category', $direct)->count(); } // Count indirect categories for layout in Direct table $directIndirectCounts = []; foreach ($indirectCategories as $cat) { $directIndirectCounts[$cat] = $records->where('category', $cat)->count(); } $directGrandTotal = $records->count(); // --- BY GENDER --- $genderCounts = []; $genderDirectTotal = 0; foreach ($genders as $gender) { foreach ($categories as $cat) { if ($cat === 'Direct') { $genderCounts[$gender][$cat] = $records ->where('gender', $gender) ->whereNotIn('category', $indirectCategories) ->count(); } else { $genderCounts[$gender][$cat] = $records ->where('gender', $gender) ->where('category', $cat) ->count(); } } // Total EXCLUDING Direct $genderCounts[$gender]['Total'] = $records ->where('gender', $gender) ->whereIn('category', $categories) ->count(); $genderDirectTotal += $genderCounts[$gender]['Total']; } // --- BY EMPLOYMENT STATUS --- $statusCounts = []; $statusDirectTotal = 0; foreach ($statuses as $status) { foreach ($categories as $cat) { if ($cat === 'Direct') { $statusCounts[$status][$cat] = $records ->where('status', $status) ->whereNotIn('category', $indirectCategories) ->count(); } else { $statusCounts[$status][$cat] = $records ->where('status', $status) ->where('category', $cat) ->count(); } } $statusCounts[$status]['Total'] = $records ->where('status', $status) ->whereIn('category', $categories) ->count(); $statusDirectTotal += $statusCounts[$status]['Total']; } // --- BY RESIDENCE --- $residenceCounts = []; $residenceDirectTotal = 0; foreach ($residences as $res) { foreach ($categories as $cat) { if ($cat === 'Direct') { $residenceCounts[$res][$cat] = $records ->where('domicile', $res) ->whereNotIn('category', $indirectCategories) ->count(); } else { $residenceCounts[$res][$cat] = $records ->where('domicile', $res) ->where('category', $cat) ->count(); } } $residenceCounts[$res]['Total'] = $records ->where('domicile', $res) ->whereIn('category', $categories) ->count(); $residenceDirectTotal += $residenceCounts[$res]['Total']; } @endphp {{-- ================== BY DIRECT CATEGORY ================== --}} @foreach ($directs as $index => $direct) @if ($index > 0) @endif @foreach ($indirectCategories as $cat) @endforeach @endforeach @foreach ($indirectCategories as $cat) @endforeach {{-- ================== BY RESIDENCE ================== --}} @foreach ($residences as $index => $res) @if ($index > 0) @endif @foreach ($categories as $cat) @endforeach @endforeach @foreach ($categories as $cat) @endforeach {{-- ================== BY GENDER ================== --}} @foreach ($genders as $index => $gender) @if ($index > 0) @endif @foreach ($categories as $cat) @endforeach @endforeach @foreach ($categories as $cat) @endforeach {{-- ================== BY EMPLOYMENT STATUS ================== --}} @foreach ($statuses as $index => $status) @if ($index > 0) @endif @foreach ($categories as $cat) @endforeach @endforeach @foreach ($categories as $cat) @endforeach
BREAKDOWN OF EMPLOYEES BY CATEGORY LOCAL / FILIPINO EMPLOYEES
DIRECT INDIRECT TOTAL
Security Janitorial Ground Construction Others
BY DIRECT CATEGORY
{{ $direct }} {{ $directCounts[$direct] }}
TOTAL {{ collect($directs)->sum(fn($d) => $directCounts[$d]) }}
BY RESIDENCE
{{ $res }}{{ $residenceCounts[$res][$cat] }}{{ $residenceCounts[$res]['Total'] }}
TOTAL @php $total = 0; foreach ($residences as $res) { $total += $residenceCounts[$res][$cat]; } @endphp {{ $total }} {{ $residenceDirectTotal }}
BY GENDER
{{ $gender }}{{ $genderCounts[$gender][$cat] }}{{ $genderCounts[$gender]['Total'] }}
TOTAL {{ $genderCounts['Male'][$cat] + $genderCounts['Female'][$cat] }} {{ $genderDirectTotal }}
BY EMPLOYMENT STATUS
{{ $status }}{{ $statusCounts[$status][$cat] }}{{ $statusCounts[$status]['Total'] }}
TOTAL @php $total = 0; foreach ($statuses as $status) { $total += $statusCounts[$status][$cat]; } @endphp {{ $total }} {{ $statusDirectTotal }}

Prepared by:
{{ auth()->user()->name }} {{ ucwords(str_replace('_', ' ', auth()->user()->user_type)) }} {{ auth()->user()->telephone }} {{ now()->format('M d, Y') }}
Authorized Representative Position / Designation Contact Nos. Date Accomplished
Notes:
  1. To be submitted monthly on or before the 10th day of each month
  2. Include employees employed through Manpower Services i.e., Security Guards, Janitorials, Construction, Ground Maintenance, etc.
  3. For inquiries, please call (045) 499-2265
I HEREBY certify that all the information submitted electronically is true, accurate, and complete to the best of my knowledge and belief. I fully comprehend that any deliberate misrepresentation or dishonesty on my part may result in the rejection of this submission. I am fully aware of the legal provisions governing electronic document submission and acknowledge that any violation thereof may have legal consequences, including the potential refusal of this report.