Files
HRM-System/scratch/inspect_records.php

37 lines
1.1 KiB
PHP

<?php
require __DIR__ . '/../vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();
use App\Models\BiometricAttendance;
use App\Models\AttendanceRecord;
use App\Models\Employee;
$emp = Employee::where('biometric_emp_id', '2109')->first();
if (!$emp) {
echo "Employee 2109 not found\n";
exit;
}
echo "Employee User ID: " . $emp->user_id . "\n";
$biometricPunches = BiometricAttendance::where('biometric_emp_id', '2109')
->whereDate('punch_time', '2026-05-28')
->get();
echo "Biometric Punches on 2026-05-28:\n";
foreach ($biometricPunches as $p) {
echo "ID: {$p->id}, Time: {$p->punch_time}, Type: {$p->punch_type}, Sync Status: {$p->sync_status}\n";
}
$attendanceRecords = AttendanceRecord::where('employee_id', $emp->user_id)
->where('date', '2026-05-28')
->get();
echo "Attendance Records on 2026-05-28:\n";
foreach ($attendanceRecords as $ar) {
echo "ID: {$ar->id}, Date: {$ar->date}, Clock In: {$ar->clock_in}, Clock Out: {$ar->clock_out}\n";
}