HR - making salary slip seems to be broken

Scenario 1:
I try to make salary slip from the salary structure for an employee, by clicking on ‘Make Salary Slip’ button in Salary Structure. It works. As a HR Manager, I can create salary slips for any employee.

Scenario 2:
I try to create new salary slip by going into Documents → Salary Slip → New. The initial screen opens with my employee id and current month, and correctly pulls data from my salary structure. But when I try to change the employee, it doesn’t refresh the earnings & deductions table. It still shows earnings from my salary structure.

Observation: After the initial salary slip is loaded, changing the employee is not refreshing the salary structure data (to bring in the correct earnings & deductions). This is happening only in the last 1 week or so. Before that, it was fine. I can change the employee in salary slip doctype and it will refresh the earnings & deductions table.

Any ideas?

Pushed a fix, it will be released later today.

Thanks @nabinhait. Appreciate the swift response.

@nabinhait I’m facing this issue again - There could be a possibility that I might have overwritten this fix unknowingly. Can you please tell me which file you changed to fix this, so that I can see if I can retrieve it?
Thanks, and apologize for the inconvenience.

Thanks @nabinhait. Appreciate the help.