π What the System Checks Before Calculating Salary
Before salary is generated, the system verifies the following:
β Employee must have at least one valid salary record with an effective date before or within the selected month.
β Employee should not have any pending leave requests for the selected salary month.
β In company settings, it must be clear whether salary is calculated using Working Days or Calendar Month Days.
β The user must be marked as an Employee in the system.
β If Leave Encashment is enabled, the system checks if the employee is eligible.
β Any applicable Allowances or bonuses should already be added.
β The employee must have been active during the selected month (i.e., joined before the month ends and not resigned before it starts).
β All leaves must be finalized (approved/rejected) for accurate calculation.
β If TDS is enabled, the yearly amount should be entered so it can be split month-wise.
π Paid Days Calculation
- Paid days are calculated based on either:
- Total days in the month (calendar-based), or
- Working days (if weekends and holidays are excluded based on company setting)
- If an employee joins or resigns mid-month, the system calculates paid days on a pro-rata basis.
- Unpaid leaves are deducted from total paid days.
π Salary Calculation Formula
Each salary component is calculated proportionally using the number of paid days:
| Component | How Itβs Calculated |
|---|---|
| Basic | (Basic % of Monthly CTC) Γ (Paid Days Γ· Total Days) |
| HRA | (HRA % of Monthly CTC) Γ (Paid Days Γ· Total Days) |
| Conveyance | Fixed Amount Γ (Paid Days Γ· Total Days) |
| Variable Pay | (Variable % of Monthly CTC) Γ (Paid Days Γ· Total Days) |
| Other Components | Based on fixed amount or percentage logic |
| Leave Encashment | Encashable Days Γ (Basic Γ· Total Days) |
π Deductions
| Deduction Type | Logic Applied |
|---|---|
| TDS | Yearly amount divided over remaining months (Ref – How TDS is calculated?) |
| Professional Tax | Based on salary slab defined in system |
| PF (Employee + Employer) | Fetched from Salary Data entered from User or Employee Module |
| ESIC (Employee + Employer) | Fetched from Salary Data entered from User or Employee Module |
| Unpaid Leaves | Deducted as per per-day salary formula |
For PF, ESIC etc referΒ Setting Salary Data for Employees
π§Ύ Final Salary Calculation
Gross Salary = Total of all earnings
Total Deductions = Total of all deductions
Net Salary = Gross Salary - Total Deductions
π Special Scenarios the System Handles
- π If there are multiple salary records, the latest one (based on effective date) is used.
- π If employee joins or resigns mid-month, salary is calculated for days worked.
- π If an employee has taken extra/unapproved leaves, those days are deducted.
- π― If variable pay or bonus is marked for that month, it will be added.
πΎ What Is Saved in the System
- Full salary breakup per employee
- Salary month and year
- Salary basis (working days or calendar days)
- Audit trail / change logs
- TDS challan file (if TDS applied)
β Tips
- Per-day salary calculation is always based on calendar month days, even if salary basis is βworking days.β
- In addition to Basic, HRA, Conveyance, and Variable Pay, system also calculates: Travel, Commission, Ex-Gracia, and Other Allowances.
- PF and ESIC deductions are rule-based:
- PF: only if Basic β€ βΉ15,000.
- ESIC: only if Gross Salary β€ βΉ21,000.
- Overused leave is deducted at full per-day salary.
- After calculation, allowances are automatically marked Paid.
- A TDS Challan entry is also created/updated for that salary.
- System saves a salary changelog comparing old vs. new values when regenerated.

