I'm working with a requirement that demands that when a employee reaches a certain level of seniority at any month of the year, his balance should be prorated according to the new value of entitlement.
So let's say that a employee starts the year with an entitlement of 20 days. In the middle of Marche he/she reaches the next level of entitlement that are 22 days. According to this requirement, the month after reaching the new level (April) the balance of the employee should be:
22 (new entitlement) - 20 (old entitlement) = 2
2/12 (to prorate the new entitlement value per month) = 0.16
0.16 x 9 (number of months with the new entitlement) = 1.44
20 (entitlement on 1st of January) + 1.44 = 21.44 (entitlement on 1st of April)
How can we perform this action on the system? Does anyone had a similar situation before?