tbl_monthlyleaves

-1 rows


Description

Module: HRMS Leave Management
Purpose: Maintains monthly Data of leave balances, allocations, utilizations, and adjustments for each employee and leave type.
Data: Stores comprehensive monthly leave accounting including opening balances, allocations, applications, and year-end adjustments.
Process Usage:
- Serves as the primary source for monthly leave balance calculations and reporting.
- Tracks leave movements throughout the month and supports balance rollover to subsequent periods.
- Integrates with allocation engines, leave applications, and year-end processing systems.
Key Points:
- Provides granular monthly tracking of all leave balance components.
- Supports complex calculations involving carry forwards, encashments, and lapses.
Business Impact: Critical for accurate leave balance management, monthly reporting, and year-end processing workflows.

Columns

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

Primary key
Format: BigSerial (auto-increment)
Used as: Unique identifier for each monthly leave record.

employeeid varchar 50 null

FK: public.tbl_employee.employeeid
Meaning: Employee for whom monthly leave balance is tracked.
Usage: Links monthly records to specific employee.

mlyear int4 10 null

Calendar year for the monthly period
Format: Integer (4-digit year)
Usage: Groups monthly records by year for reporting and period-based calculations.

mlmonth int4 10 null

Calendar month for the tracking period
Format: Integer (1-12)
Usage: Identifies the specific month for balance tracking and allocations.

leavemasterid int8 19 null

UNUSED FIELD - No Active Functionality
Historical Purpose: Previously referenced legacy leave master system
Current Status: Not populated or referenced in any application logic
Data Integrity: May contain legacy data but has no operational purpose

leavecode varchar 50 null

Leave type being tracked
Format: String
Examples: “PL” (Privilege Leave), “CL” (Casual Leave), “SL” (Sick Leave)
Usage: Identifies which specific leave balance is being managed.

provisionalleave numeric 0 '0'::numeric

New leave allocation for the current month
Format: Float (default: 0.0)
Unit: Days
Source: Policy-based allocations from allotment engines
Usage: Represents freshly allocated leaves for the current period.

tempprovisionalleave numeric 0 '0'::numeric

Opening balance carried forward from previous period
Format: Float (default: 0.0)
Unit: Days
Calculation: RemainingLeave from previous month becomes TempProvisionalLeave for current month
Usage: Represents the starting balance before new allocations and utilizations.

appliedleave numeric 0 '0'::numeric

Leaves utilized through approved applications in the month
Format: Float (default: 0.0)
Unit: Days
Source: Approved leave applications during the month
Usage: Tracks actual leave consumption by employees.

remainingleave numeric 0 '0'::numeric
mlentitlment numeric 0 '0'::numeric
totalleave numeric 0 '0'::numeric

UNUSED FIELD - Reserved for Future
Potential Purpose: Cumulative total leaves
Current Status: Not actively used in current balance calculations.

monthlyentitlment numeric 0 null

UNUSED FIELD - Reserved for Future
Potential Purpose: Monthly entitlement calculations
Current Status: Not actively used in current balance calculations.

remarks varchar 2147483647 null
manualentitlement numeric 0 null

Manual adjustments made by HR administrators
Format: Float (default: 0.0)
Unit: Days
Source: HR manual corrections, imports, or special allocations
Usage: Captures non-policy based balance adjustments.

encashed numeric 0 null

Leaves converted to monetary payment during year-end
Format: Float (default: 0.0)
Unit: Days
Scenario: Regular carry forward encashment (RemainingLeaveConfig.ENCASH)
Usage: Tracks leaves monetized instead of carrying forward.

lapsed numeric 0 null

Leaves expired during year-end processing
Format: Float (default: 0.0)
Unit: Days
Scenario: Regular carry forward lapse (RemainingLeaveConfig.LAPSE)
Usage: Tracks leaves forfeited due to policy limits.

encashedtenure numeric 0 null

Tenure-based leaves converted to payment
Format: Float (default: 0.0)
Unit: Days
Scenario: Tenure limit encashment (CarryOverYearlyConfig.CARRY_OVER_WITH_TENURE_LIMIT + ENCASH)
Usage: Tracks leaves monetized due to long-term accumulation limits.

lapsedtenure numeric 0 null

Tenure-based leaves expired
Format: Float (default: 0.0)
Unit: Days
Scenario: Tenure limit lapse (CarryOverYearlyConfig.CARRY_OVER_WITH_TENURE_LIMIT + LAPSE)
Usage: Tracks leaves forfeited due to long-term accumulation limits.

lapsedonexpiry numeric 0 null

Leaves expired due to carry forward expiry dates
Format: Float (default: 0.0)
Unit: Days
Scenario: Expiry-based lapse (CarryOverYearlyConfig.CARRY_OVER_WITH_EXPIRY)
Usage: Tracks leaves forfeited due to expiry period elapsing.

createdby varchar 50 null
createddate timestamp 29,6 null
modifiedby varchar 50 null
modifieddate timestamp 29,6 null

Indexes

Constraint Name Type Sort Column(s)
tbl_monthlyleaves_pk_tbl_monthlyleaves Primary key Asc emonthlyleaveid
ix_tbl_monthlyleaves_employeeid_mlyear_mlmonth Performance Asc/Asc/Asc employeeid + mlyear + mlmonth

Relationships