How to cancel/amend the No Pay Leave that has been posted?

How to cancel/amend the No Pay Leave that has been posted?

Symptoms:
Admin is trying to amend the end date of an approved No Pay Leave/Unpaid Leave at Leave Entry, but encountered "POSTED_LEAVE" error:


Possible Cause(s):
The No Pay Leave/Unpaid Leave has been posted to Payroll module for deduction, hence system will lock the leave information.

Suggested workaround / solution(s):
1. Go to Payroll > Pay Run > Variable Data > select the staff > go to Variable tab.
2. Delete the No Pay Leave/Unpaid Leave record in the Variable Data.
3. Next, go to Leave > Employee Leave > Leave Data > select the staff > go to Leave Entry tab. Edit the No Pay Leave/Unpaid Leave accordingly and Save.
4. Lastly, go to Payroll > Pay Run > Variable Data > select the staff > go to Variable tab, add the No Pay Leave/Unpaid Leave again with the correct end date as in the Leave Entry.