-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Currently, ERPNext does not support cases where an employee receives an increment mid-month, requiring payroll to be split and prorated within the same payroll cycle.
In standard payroll practice, when an increment becomes effective from a specific date (e.g. 22-Jun-2025), salary components must be computed as:
1–21 June: Based on Old CTC / Salary Structure Assignment (A)
22–30 June: Based on New CTC / Salary Structure Assignment (B)
Payslip Output: Single payslip showing component-wise total (Old + New)
Expected Behavior
ERPNext should be able to:
-
Detect multiple Salary Structure Assignment records that overlap within a single payroll month.
-
Automatically prorate salary components based on assignment effective dates.
-
Aggregate prorated amounts into one Salary Slip, displaying the component-wise total.
-
Optionally provide a way to display period-wise breakdowns (Old vs New) in the payslip.
Example (expected output):
Component Till 21-Jun-2025 From 22-Jun-2025 Total Gross
Basic (40% of CTC) 56,000 29,500 85,500
HRA (50% of Basic) 28,000 14,750 42,750
... ... ... ...
Total Gross (A) 136,407 71,981 208,387
Actual Behavior
The system only allows one active Salary Structure Assignment per employee for a given period.
Payroll uses the latest assignment as of the period start date, ignoring mid-month changes.
This prevents prorated calculations for increments or revisions within the same month.
Use Case
Employee gets an increment effective 22-Jun-2025
Old assignment active till 21-Jun-2025
New assignment effective 22-Jun-2025
Payroll month: June 2025 (01-Jun-2025 → 30-Jun-2025)
Desired outcome:
A single payslip for June 2025 with total component-wise amounts (Old + New), without needing two separate payroll runs or manual arrear adjustments.
Environment
ERPNext Version: v15.5
Frappe Framework: v15.x
Module: Payroll (Frappe HR)
Doctypes: Salary Structure Assignment, Salary Slip, Payroll Entry
Proposed Enhancement
Option 1:
Enhance payroll processing logic to:
Identify multiple active assignments within the payroll date range.
Split computation by date ranges automatically.
Prorate and merge component values in the final Salary Slip.
Option 2:
Add an “Allow Proration within Same Month” toggle in Salary Structure Assignment that triggers date-based salary computation when overlapping assignments exist.
Option 3:
Introduce a “Mid-Month Increment Utility” that:
Detects mid-month effective assignments.
Generates differential Additional Salary entries automatically.
Business Impact
This enhancement aligns ERPNext with standard payroll policies followed across industries, ensuring:
Accurate calculation of mid-month increments.
Elimination of manual arrear adjustments.
Transparent, component-wise reporting in the payslip.
Relevant Code References
erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py
erpnext/hr/doctype/salary_slip/salary_slip.py
erpnext/hr/doctype/payroll_entry/payroll_entry.py
Summary
Enable ERPNext’s Payroll module to prorate and aggregate salary components for mid-month increments within a single payroll period, ensuring correct CTC transition handling and accurate component-wise totals in payslips.