Assume that on 31.03.2014 he has 70 days then according to the logic 70-60 = 10 will be encashed mean while quota will be reduced 60 i.e Quota balance 70-60 =10 since 70 will be reduced to 60 and Encashed 10 and Quota balance is now 60 which is equal to 70-10 excess quota = 60
now on 01.04.2014 quota remaining balance is 60 so no reduction no encashment
02.04.2014 we have given quota 2 days 60+2 = 62 so it greater than 60 so calculation 62 - 2 =60 2 is reduction and update in 2006 immediately 2006 is 60 in payroll 62-60 = 2 encash
03.04.2014 we have given 2 more days 60+2 62 62-2 = 60 update in 2006 mean while in payroll 62-60 = 2 encashment this cycle continues all the times when we are processing for payroll 2+2 days = 4 days for April and 10 days for March will get encashed check it and explore it.
As far i understand it works properly.
Regards
Venkatesh