Leave & Attendance Management

Leave Module - User Guide

1. Introduction πŸ“

The Leave module manages the balance and lifecycle of employee absences. It tracks the three primary types of leave transactions: Credits (accrual of leaves), Usage (taking vacation), and Adjustments (corrections). This module is tightly integrated with the Attendance system, ensuring that once a leave is approved, the employee’s work details are automatically updated to reflect their absence.

ℹ️

In the overall business flow:

  1. Manages Leave Balances per employee.
  2. Validates leave applications against Pay Dates and Holidays.
  3. Automates the update of the Work Details Master (Attendance) upon leave approval.
  4. Prevents payroll issues by ensuring no one takes more leave than their available balance.

Typically, this module is used by HR Managers, Team Leads, and Payroll Accountants.


2. Getting Started with Leaves πŸš€

Accessing the Module

Navigate to the Leave Index. Each leave transaction is assigned a unique 6-digit Leave No.

Leave Types

  • C (Credit): Adding new leave days to an employee’s balance (e.g., monthly accrual).
  • U (Used): Standard paid leave taken by the employee.
  • Z (Without Pay): Leave taken with no pay (LWP), affecting the salary calculation.
  • E (Encashment): Converting balance leave into salary (where applicable).
  • A (Adjustment): System corrections or manual balance offsets.

3. Features & Benefits ✨

🚫 Holiday Conflict Guard

  • Non-Holiday Rule: The system prevents applying for leave on dates already marked as Holidays in the Master. If a public holiday falls during a leave period, the “From” and “To” dates must be adjusted to exclude the holiday, or the system will reject the entry.

πŸ”„ Attendance Automation

  • Work Details Sync: When a leave of type U (Used) or Z (LWP) is saved, the system automatically updates the Work Details Master. This means HR doesn’t have to manually mark the attendanceβ€”the leave approval does it for them.
  • Overlapping Guard: The system checks if the employee already has a leave or work entry on the selected dates, preventing double-entry errors.

πŸ›‘οΈ Balance & Pay-Date Security

  • Debit Limit: For paid leave (U), the system strictly ensures that Leave Days <= Leave Balance.
  • Pay-Cycle Lock: Leave dates must strictly fall within the Current Pay Date window. You cannot apply for June leave while the payroll is open for May.

4. Complete Flow πŸ”„

Select Employee & Type

  • Select the Employee Code.
  • Choose the Leave Type (e.g., U for a vacation).
  • The system displays the current Leave Balance for reference.

Define Dates

  • Input the From Date and To Date.
  • The system calculates the diffdays.
  • Specify the Leave Days (e.g., 1 day or 0.5 for a half-day).

Validation & Approval

  • The system verifies:
    • Dates are not holidays.
    • Dates do not overlap with existing records.
    • Sufficient balance exists for the requested days.
  • Upon saving, the Leave No is generated.

Sync

  • The system triggers an automated update to the Work Details Mst, marking the employee as “On Leave” for those specific dates.

5. Validations and Logic ⚠️

Date Logic

  • Sequential Rule: To Date must be on or after From Date.
  • Cycle Rule: Dates must be between the monthStartDate and monthEndDate of the active PayDateValue.
  • Holiday Rule: Neither the From Date nor the To Date can be a date found in the Holiday Master.

Balance logic

  • The Overdraw Rule: For types U (Used) and E (Encashment), the system rejects the entry if LeaveDays > LeaveBalance.
  • The “Half-Day” Rule: For credits (C), the system only accepts full days or exactly 0.5 increments. Other fractions (like 0.33) are rejected.

Structural Logic

  • Overlap Guard: Specifically checks the WorkDetailsMst. If a row already exists for that employee/date combination, the new leave is blocked.
  • One-Time Credit: The system prevents granting multiple “Credits” (Type C) to the same employee within the same pay month.

6. Related Reports πŸ“Š

  • πŸ“‘ Leave Ledger: A comprehensive statement for an individual showing Credits, Usage, and the running Balance.
  • πŸ“‰ Absence Summary: List of employees currently on leave (Type U or Z) for the current month.
  • πŸ“ Leave Liability Report: Financial view of total outstanding (accrued) leaves across the organization.

7. Best Practices / Tips πŸ’‘

  • Half-Day Applications: To apply for a half-day, set the From and To date to the same day and input 0.5 in the Leave Days field.
  • Attendance First: If you see an “Overlapping” error, check the InOut Register or TimeDay module to see if attendance has already been manually marked for those dates. You may need to delete the attendance record before applying the leave.
  • Adjustment Type: Use the A (Adjustment) type only for year-end balance resets or opening balance corrections.