Credit Tracking System
Source:
CreditTrackingBO.cs+AttendanceProcessingBO.cs→FindNoOfCredits()
The credit system assigns positive credits (rewards) and negative credits (penalties) based on attendance behavior. 1 credit = 10 minutes of duration.
Credit Calculation Formula
Credits = DurationInMinutes ÷ 10
If DurationInMinutes % 10 >= 7 then Credits += 1 round up
Example: Employee came 23 minutes early
Credits = 23 ÷ 10 = 2
Remainder = 23 % 10 = 3 < 7, don't round
Final = 2 credits, MF = +1
Example: Employee was 48 minutes late
Credits = 48 ÷ 10 = 4
Remainder = 48 % 10 = 8 >= 7, round up
Final = 5 credits, MF = -1Credit Scenarios
Credit Recording Flow
Database Table: t_HR_CreditTracking
| Column | Type | Purpose |
|---|---|---|
CreditTrackingId | long | PK |
EmployeeId | long | FK to employee |
DateAndTime | datetime | Attendance date |
NoOfCredits | int | Number of credits |
MF | int | +1 (earned) or -1 (debited) |
CreditType | string | MorningOnTime, EarlyComing, LateComing, etc. |
DurationInMinutes | int | Raw minutes used for calculation |
EmpDailyAttendanceId | long | FK to daily attendance record |