Error in End of Payroll in Middle of Month

Good Day Everyone,

I ran a test Scenario of an Employee, whose last day is in 10th of the month. The end date in the Salary Structure of the same Employee is set at the 10th day, and turned the Employee Status to “Left” and have set the Relieving Date on the 10th day.
Then, I created a Payroll Entry to create a Salary Slip of the Employee, and the Salary Slip calculated the Net Pay to be full, just like a normal month (Payroll Period). The Working Days calculated the entire working days of the month, but the Payment Days is calculated to 8, and yet the Net Pay is still Unchanged. However, I tried to change the Earnings and/or the Deductions, specifically the “Basic” Salary Component in the Salary Slip, but whenever I click “Save”, Both Earnings and Deductions goes back to their original state (Based on the Salary Structure).

I tried another way of creating a Salary Slip, by creating it manually. In order to do that, the Employee Status must be “Active”, otherwise the Employee will not appear in the Employee Link of the Salary Slip Form.
The same data from a Salary Slip created by Payroll Entry appears, same calculation of Days and both Earnings and Deductions in full. I did the same where I changed the Earnings and the Deductions, then I proceed to click on “Save”, Both Earnings and Deductions goes back to their original state (Based on the Salary Structure).

If anyone could help me solve this issue, I would be extremely thankful.
P.S: Please let me Know if I have missed something that would help me solve the Issue.
Thank You :slight_smile:

Here is The GitHub Link:

In Salary Structure.
have you tried to check Depends on Leave Without Pay in salary component (earnings)?

@magic-overflow
Thank you for the solution.