HR / Attendance¶
Scope: attendance only — no payroll in this codebase
The HR footprint in this repository is one feature: clock-in/out attendance with photo capture. There is no payroll (no salary, PPh tax, THR, or overtime calculation), and the employee/position master data is maintained in external FrameWork DLLs, not here. This page documents what actually exists and is deliberately clear about what does not.
What exists vs. what doesn't¶
| Capability | In this repo? |
|---|---|
| Attendance capture (clock-in/out + photo) | ✅ frmInputAbsen.vb |
| Attendance inter-branch sync | ✅ ABN CSV feed |
| Attendance reports | ✅ 4 Crystal reports under Laporan/HRD/Absensi/ |
Employee master maintenance (tbMaster_Karyawan) |
⚠️ consumed only — class lives in a FrameWork DLL; no frmMasterKaryawan here |
| Shift / schedule model | ❌ absent — TRA_SHIFT is a bare column, always '1' |
| Late detection / overtime calc | ❌ none — TRA_LEMBUR always 0 |
| Payroll (salary / PPh / THR / loans) | ❌ not implemented here |
Payroll lives in another app
frmUserAccess.vb reserves access-group names GAJI (payroll), LAPGAJI, LAPPPH,
LAPTHR, LAPPINJ (loan report) and excludes them from normal access editing. Those
names imply payroll modules exist elsewhere in the SmartSoft suite — but no forms,
tables, or logic for them are in this repository.
The employee record¶
There is no HR master UI here; three sources stand in for "employee":
flowchart LR
U["Logged-in user<br/>memUserNIK"] -->|"KRY_NIP = memUserNIK"| K["tv_Master_Karyawan<br/>(KRY_NAMAKARYAWAN, JAB_NAMAJABATAN)"]
KSR["Cashier master<br/>tbMaster_Kasir (KSR_)"] -->|"KSR_NIPKASIR"| ABS["Attendance<br/>tbTr_Absen.TRA_NIP"]
K -.name lookup.- KSR
style ABS fill:#e8f5e9,stroke:#388e3c
style K fill:#fff3e0,stroke:#fb8c00
tbMaster_Karyawan(KRY_) — a FrameWork DLL class, only read here (columns touched:KRY_NIP,KRY_NAMAKARYAWAN). Used to resolve an employee name by NIP when creating users and cashiers.tv_Master_Karyawan— the logged-in user'smemUserNIKmaps toKRY_NIPto fetch job title (JAB_NAMAJABATAN). A position (JAB_) dimension exists in the view but has no maintenance UI here.tbMaster_Kasir(KSR_) — the de-facto employee record for attendance; the attendance table joinsTRA_NIP = KSR_NIPKASIR.
Table relationships¶
erDiagram
tbMaster_Karyawan ||--o| tbMaster_Kasir : "NIP"
tbMaster_Kasir ||--o{ tbTr_Absen : "clocks in/out"
tbMaster_Cabang ||--o{ tbTr_Absen : "branch"
tbTr_Absen {
string TRA_KODECABANG PK
string TRA_NIP PK
date TRA_TGLABSEN PK
string TRA_MASUK "in time"
string TRA_PULANG "out time"
string TRA_STATUS "M=present"
blob TRA_PHOTO "clock-in photo"
blob TRA_PHOTO2 "clock-out photo"
}
tbMaster_Kasir {
string KSR_KODEKASIR PK
string KSR_NIPKASIR
string KSR_NAMAKASIR
}
Attendance capture (frmInputAbsen.vb)¶
A single form records both clock-in and clock-out into tbTr_Absen (TRA_ prefix).
flowchart TD
A["Operator types/scans NIP<br/>(validated vs tbMaster_Kasir)"] --> B["Capture webcam photo<br/>(GUI.frmGetPhoto)"]
B --> C{"Row exists for<br/>branch + today + NIP?"}
C -->|No| D["INSERT: TRA_MASUK = now,<br/>TRA_PULANG = '', TRA_PHOTO = in-photo<br/>TRA_STATUS='M', TRA_SHIFT='1', TRA_LEMBUR=0"]
C -->|Yes| E["UPDATE: TRA_PULANG = now,<br/>TRA_PHOTO2 = out-photo (clock-out)"]
style D fill:#e3f2fd,stroke:#1976d2
style E fill:#e8f5e9,stroke:#388e3c
tbTr_Absen columns: TRA_KODECABANG, TRA_NIP, TRA_TGLABSEN, TRA_MASUK (in time),
TRA_PULANG (out time), TRA_STATUS ('M' = present), TRA_SHIFT (constant '1'),
TRA_LEMBUR (overtime, constant 0), TRA_CLOSING, TRA_IDTRANS, plus image columns
TRA_PHOTO (clock-in) and TRA_PHOTO2 (clock-out).
Photos are stored as SqlDbType.Image via a parameterized update — one of the few
parameterized writes in the system.
Don't confuse HR shift with POS shift
The many *_SHIFT columns elsewhere (JLH_SHIFT, JLR_SHIFT, STL_SHIFT) are
cashier-session shifts for POS reset/settlement — unrelated to HR scheduling. See
POS & Sales.
Inter-branch sync (ABN feed)¶
Attendance rides the generic inter-branch sync, but as pipe-delimited
CSV rather than XML (file prefix ABN):
- Outgoing (
frmTransferDataKeluar): when the transfer file starts withABN, export usesCreateCSV(...)— header +|-delimited rows; the row set comes from a DB-configuredTRF_STRSQL(SELECT … FROM tbTr_Absen);TRA_PHOTO/TRA_PHOTO2bytes are Base64-encoded into the CSV cell. - Incoming (
frmTransferDataMasuk→ProsesDataAbsen): upserts intotbTr_Absenkeyed on branch + NIP + date; photos areBase64-decoded back toSqlDbType.Image.
Reports (Laporan/HRD/Absensi/)¶
The only HRD report family — launcher frmLapAbsensi.vb, four Crystal reports:
| Report | Scope |
|---|---|
LapAbsenPerCounter |
Attendance per branch/counter (Cabang, date range). |
LapAbsenPerCounterAll |
All-counters variant. |
LapAbsenPerKaryawan |
Per-employee (NIP range). |
LapAbsenPerKaryawanPhoto |
Per-employee with clock-in/out photos. |
No salary/PPh/THR report .rpt files exist, consistent with payroll living elsewhere.