diff --git a/app/Services/PayrollService.php b/app/Services/PayrollService.php index 798d363..2413047 100644 --- a/app/Services/PayrollService.php +++ b/app/Services/PayrollService.php @@ -421,6 +421,7 @@ public function bulkGenerate(int $year, int $month): array ->with('user:id,name') ->where('tenant_id', $tenantId) ->where('employee_status', 'active') + ->whereHas('user') ->get(); DB::transaction(function () use ($employees, $tenantId, $year, $month, $settings, $userId, &$created, &$skipped) {