For leave balance, the formula is still correctly. But when system cutoffed TM, the system missed to stamp payment period and then system processed payroll so payroll system did not pay leave balance
For exemple:
Employee exit period is 2014071. When system cutoffed TM, system stamp payment period is 2014081 so system did not pay leave balance on 2014071
And I add information for you, this cause of stamp payment period incorrect since it is exceed normal period which is bug.