Convert remaining hourly leaves to daily leaves at the beginning of each year

Convert remaining hourly leaves to daily leaves at the beginning of each year

Hello,
is it possible to convert remaining hourly leave to daily leave at the end of each year?

Here's an example:
  1. 1 daily leave = 8 hours
  2. total hours of hourly leave in a year per employee = 56 hours
  3. Booked hourly leaves at the end of ther year by employee #1 = 30
  4. Remaining hourly leaves for employee #1 = 56 - 30 = 26 hours
  5. Number of daily leaves carried forward onto the next year = 26 hours remaining /8 hours per day = 3,25 days = 3 days (rounded down - and that's all, as 0,25 days of daily leaves are lost)
Plus: an useful condition would be to allow the employ to have a cap in the number of hours that can be converted (in our case only 32).

This means if the user has 37 hours of remaining daily leaves he will have 4 days (8x4) of leaves and will losse the remaining 5 hours.

Thank you