Hello,
We want to implement a sick leave salary deduction system where the pay is based on the cumulative number of sick leave days taken by an employee, not just the current month’s leaves.
The pay structure is as follows:
for the first 1–10 days of sick leave, the employee receives 100% pay;
for days 11–50, they receive 75% pay;
for days 51–90, it’s 50% pay; and
for days 91–182, only 25% pay is given.
The important requirement is that deductions should only be applied for new sick leave days each month, based on the cumulative total.
For example, if an employee takes 5 sick leave days in the first month, there is no salary deduction as they fall within the 100% pay range. If they take 6 more sick leave days in the second month, the first 5 of those days would still fall under the 100% pay range (completing the first 10 days), and only the 6th day would fall into the 75% pay range, resulting in a salary deduction for that 1 day at 25% of daily pay.
This ensures that salary is not deducted multiple times for the same leave days and that the deduction logic remains fair and consistent across months. I’m looking for the best way to implement this logic in ERPNext, ideally during salary slip calculation. Any guidance or example implementation would be appreciated!