tbl_attendancepolicy

1 rows


Description

Module: HRMS Time & Attendance
Purpose: Defines a comprehensive set of rules and parameters governing employee attendance, including punch-in/out, late-coming, early-going, and penalty calculation logic.
Data: Stores the configuration for an attendance policy that can be assigned to one or more groups of employees.
Process Usage:
- Used by the daily attendance processor to validate punches against shift times.
- Determines the rules for regularization and correction requests.
Key Points:
- Critical for payroll accuracy and labor law compliance.
- Supports both fixed and flexible attendance models.
Business Impact: Ensures consistent and fair application of attendance rules across the organization.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigserial 19 nextval('tbl_attendancepolicy_id_seq'::regclass)

Primary key
Format: Integer (auto-increment)
Used as: Unique identifier for the attendance policy record.

policyname varchar 100 null

Meaning: The user-friendly name of the attendance policy (e.g., “Standard Office Hours,” “Flexible WFH Policy”).
Format: Varchar/Text.

description varchar 1000 null

Detailed description of the policy, summarizing its scope and key features.
Format: Text.

members text 2147483647 null

Meaning: Indicates which employees or groups are assigned to this policy.
Format: Array of IDs or JSONB, typically referencing employee/group/designation tables.

allowfromapp bool 1 null

Flag to indicate if attendance (punch-in/out) is allowed via the mobile application.
Format: Boolean.

allowfromweb bool 1 null

Flag to indicate if attendance is allowed via the web portal (desktop browser).
Format: Boolean.

allowfrombiometric bool 1 null

Flag to indicate if attendance is allowed via biometric devices.
Format: Boolean.

calculationmethod varchar 255 null

Defines the basis for attendance calculation (e.g., Total Working Hours, Net Working hours-based, Single punch).
Format: Varchar/Text.

multipunchallowed bool 1 null

Determines if an employee can have multiple punch-in/out pairs in a single day.
Format: Boolean.

correctionlimits bool 1 null

The maximum number of times an employee can raise a correction request within a specified period (e.g., per month).
Format: Integer.

correctionrequestraisedays int4 10 null

The number of days after an attendance event within which a correction request can be raised.
Format: Integer (e.g., 5 means within 5 days).

correctionmaximumallow int4 10 null

The total maximum number of correction requests allowed (Monthly or per policy term).
Format: Integer.

regularizationlimits bool 1 null

The maximum number of regularization requests allowed (e.g., for missing a punch).
Format: Integer.

regularizationrequestraisedays int4 10 null

The number of days after a missed punch within which a regularization request can be submitted.
Format: Integer.

regularizationmaximumallow int4 10 null

The total maximum number of regularization requests allowed.
Format: Integer.

timeperiodforlatecoming int4 10 null

Defines the period within the shift start time that determines a “Late Coming” event.
Format: Time/Interval (e.g., 30 minutes).

timeperiodforearlygoing int4 10 null

Defines the period before the shift end time that determines an “Early Going” event.
Format: Time/Interval.

timeperiodfortimeoff int4 10 null

The time period required to qualify an absence as a “Time Off” event (partial day leave).
Format: Time/Interval.

fixedattendance bool 1 null

Flag indicating if the policy is for a fixed shift/attendance schedule.
Format: Boolean.

fixedlatecominggrace int4 10 null

The grace time allowed for late-coming in a fixed attendance model, after which a penalty or event is triggered.
Format: Time/Interval (e.g., 5 minutes).

fixedearlygoinggrace int4 10 null

The grace time allowed for early-going in a fixed attendance model.
Format: Time/Interval.

allowlatecomingtype varchar 255 null

The method used to calculate or allow late-coming (e.g., Daily, Monthly, Slab-based).
Format: Varchar/Text.

allowearlygoingtype varchar 255 null

The method used to calculate or allow early-going.
Format: Varchar/Text.

allowlatecomingminutes int4 10 null

Total aggregate late-coming minutes allowed before a penalty is applied.
Format: Integer.

allowearlygoingminutes int4 10 null

Total aggregate early-going minutes allowed before a penalty is applied.
Format: Integer.

allowlatecomingtime int4 10 null

Specific time boundary for late-coming, if not using grace minutes (e.g., latest allowed punch-in time).
Format: Time.

allowearlygoingtime int4 10 null

Specific time boundary for early-going.
Format: Time.

firstpunchlateby int4 10 null

A flag or value indicating if a penalty should be applied based on the first punch-in being late by a certain margin.
Format: Time/Interval/Boolean.

applypenalty bool 1 null

Master flag to enable or disable the application of attendance penalties.
Format: Boolean.

latecomingandearlygoingpenalty bool 1 null

The type of penalty applied for Group late-coming and early-going events (e.g., Half-Day deduction, Time-Deduction).
Format: Varchar/Text.

eventtype varchar 255 null

Defines what constitutes a penalizable event (e.g., For Every event or after a set number of events).
Format: Varchar/Text.

noofevents int4 10 null

The number of late-coming/early-going events allowed before a penalty is triggered.
Format: Integer.

fixeddeductfrom varchar 255 null

Specifies what the penalty is deducted from (e.g., Leave or attendance deduction).
Format: Varchar/Text.

fixeddeductleavetypes varchar 255 null

Comma-separated list of leave types to deduct from (Eg NBL PL), if fixeddeductfrom is set to “Leave”.
Format: Varchar/Text.

fixeddeductionslab varchar 255 null

JSON or Text describing the Short Fall Hour slab (e.g., 3 events = 0.25 day deduction, 5 events = 0.5 day deduction).
Format: JSONB/Text.

deductdays float8 17,17 null

The number of days (or fractional days) to deduct as a penalty.
Format: Numeric/Float.

fixedwaivepenalty bool 1 null

Flag or criteria to automatically waive a penalty under certain conditions (e.g., high performance or working hours completion).
Format: Boolean/Text.

shortfallnotification bool 1 null

Flag to enable/disable notifications for attendance shortfalls (e.g., less than minimum required working hours).
Format: Boolean.

latecomingearlygoingnotification bool 1 null

Flag to enable/disable immediate notifications to the employee upon late-coming or early-going.
Format: Boolean.

flexibleattendance bool 1 null

Flag indicating if the policy is for a flexible shift/attendance schedule.
Format: Boolean.

flexiblegracehours float8 17,17 null

Total flexible hours/minutes allowed as a grace before a working hour shortfall is penalized.
Format: Time/Interval.

flexibledeductfrom varchar 255 null

Specifies what the shortfall penalty is deducted from in a flexible attendance model (Eg Leave and attendance).
Format: Varchar/Text.

flexibledeductleavetypes varchar 255 null

Leave types (PL NBL) to deduct from for flexible attendance shortfalls.
Format: Varchar/Text.

flexibleshortfallslabhours varchar 255 null

Penalty slab definition based on hours of shortfall in flexible attendance (e.g., 1 hour shortfall = 0.5 day loss).
Format: JSONB/Text.

flexibleshortfallnotification bool 1 null

Notification flag for flexible attendance shortfalls.
Format: Boolean.

penaltywarningnotification bool 1 null

Flag to enable/disable a warning notification before a penalty is applied (e.g., at the N-1 event).
Format: Boolean.

inpunchoutpunchnotification bool 1 null

Flag to enable/disable confirmation notifications for every punch-in and punch-out event.
Format: Boolean.

stage varchar 255 null

The current Policy stage of the policy (e.g., Draft, Active, Retired).
Format: Varchar/Text.

combineecrlgrlimit bool 1 null

Flag to indicate if late-coming (Early Coming/Late Going) limits should be combined or treated separately.
Format: Boolean.

createdby varchar 50 null

FK: public.tbl_userlogin.id or public.tbl_employee.employeeid
Meaning: The user who created this record.

createddate timestamp 29,6 null

Timestamp of when the policy record was created.
Stored as: UTC
Format: Timestamp with timezone.

modifiedby varchar 50 null

FK: public.tbl_userlogin.id or public.tbl_employee.employeeid
Meaning: The last user who modified this record.

modifieddate timestamp 29,6 null

Timestamp of the last modification to the policy record.
Stored as: UTC
Format: Timestamp with timezone.

startingday int4 10 0

Defines the day of the week or month that the attendance/payroll cycle starts (e.g., Sunday, 1st of the month).
Format: Integer/Text.

mobilepunchinimage int4 10 null

Flag requiring an image/photo capture during mobile punch-in.
Format: Boolean.

mobilepunchoutimage int4 10 null

Flag requiring an image/photo capture during mobile punch-out.
Format: Boolean.

weblocation varchar 50 null

Flag or setting for geographical location (IP/network) validation during web punch-in/out.
Format: Boolean/JSONB.

mobilelocation varchar 50 null

Flag or setting for GPS/geo-fencing location validation during mobile punch-in/out.
Format: Boolean/JSONB.

allowedmaxtimeinotherhalf int4 10 50

Maximum time allowed to punch in the second half of the day without penalty (e.g., for short shifts or exceptions).
Format: Time/Interval.

shiftstartnotificationtitle varchar 100 null

Custom title for the notification sent at the shift start time.
Format: Varchar/Text.

shiftstartnotificationdescription varchar 500 null

Custom body/description for the shift start notification.
Format: Text.

shiftendnotificationtitle varchar 100 null

Custom title for the notification sent at the shift end time.
Format: Varchar/Text.

shiftendnotificationdescription varchar 500 null

Custom body/description for the shift end notification.
Format: Text.

fixedshiftgracetime int4 10 null

Total non-cumulative grace time for a fixed shift (applies to either late-in or early-out, not both).
Format: Time/Interval.

sandwichoffday bool 1 null

Flag to determine if an off-day (e.g., weekend) between two leaves/absences should be counted as a leave/absence.
Format: Boolean.

looseninginout bool 1 null

A mechanism to relax the punch-in/out time constraints, often used for staggered shifts or exceptions.
Format: Boolean/JSONB.

timesheetonpunchin varchar 50 '''OFF'''::character varying

Flag to prompt a timesheet or task entry upon punch-in.
Format: Boolean.

timesheetonpunchout varchar 50 '''OFF'''::character varying

Flag to prompt a timesheet or task entry upon punch-out.
Format: Boolean.

salarydeductiontype varchar 50 null

Specifies the base for salary deduction (e.g., Basic, Gross, or other component).
Format: Varchar/Text.

salarydeduct float8 17,17 null

Flag to show if an amount (salary) should be cut as a penalty.
Format: Boolean.

salaryfulldayhour int4 10 null

The number of hours considered a “Full Day” for salary calculation or payroll processing purposes.
Format: Numeric.

fixedshiftgracetimehalfday int4 10 null

Non-cumulative grace time for a fixed shift when calculating a half-day loss (Waive off penalty if working hours are completed).
Format: Time/Interval.

restrictgraceafter int4 10 null

Time of day or condition after which grace time is no longer applied (e.g., after 10:30 AM).
Format: Time.

addgracewhen varchar 50 null

Condition or rule for when to apply additional grace time (e.g., only on weekly off days).
Format: Varchar/Text.

fixedwaivepenaltyhalfday bool 1 null

Flag or criteria to waive a half-day penalty.
Format: Boolean/Text.

removeotherpenaltywhenhalfday bool 1 null

Flag to indicate if other minor penalties should be cleared when a major half-day penalty is applied.
Format: Boolean.

timesheet_punch_validation bool 1 null
timesheet_time_range_mandatory bool 1 null

Indexes

Constraint Name Type Sort Column(s)
tbl_attendancepolicy_pk_tbl_attendancepolicy Primary key Asc id
tbl_attendancepolicy_qk_tbl_attendancepolicy Must be unique Asc policyname

Relationships