0 Replies Latest reply on Mar 4, 2014 2:22 PM by nvandenburgh

    Reoccurring date calculation based on a schedule


      I have a solution that I would like to add a bonus pay field to and have a server side script pick up the bonus in a staff table if the bonus pay date is in range with a given pay week.


      I did this by checking that the bonus date was within the range of the given pay cycle. Like this:


      Copy bonus if( bonus date ≥ to given start date and ≤ given end date. This works, but I want to automate this and throw in a few optional schedule parameters. See below.


      I have the following fields:


      Pay Week begin date

      Pay week end date


      Bonus Amount


      Start data of pay period for bonus

      End date of pay period for bonus


      Bonus pay date (will need to change based on bonus schedule below)


      Bonus schedule (drop down with Weekly, Bi-Weekly, Monthly, Yearly)


      I have a script that runs a payroll report that I would like to automate. I need the bonus pay date to change automatiaclly based on the bonus schedule. Example is if I pay the bonus on the first payweek and bi-weekly setting is in place I need t add 14 days to the last bonus pay date and so on.


      Any ideas where I should start? Thanks