Hi
I am creating a UX to define Payroll Periods in a MYSQL table.
I have defined the following fields:
Payroll_Year (N) (A 4 digit number that is the year the pay is deposited to the employee's bank account.)
Payroll_Period (N) (values such as 1 to 52 defining each payroll period of the year)
Payroll_ Year_PAY_Period (N) (a calculated field which is Payroll_Year *100 + Payroll_Period. This is used as a control to ensure that each pay period is unique. An example might be 201501 for the first pay period in 2015.)
Payroll_Start_Date (D) (First Date of Payroll Period)
Payroll_Pay_Date (Date the employees get their money deposited to their bank accounts. This is a calculated date based on the length of the payroll period (7 or 14 days) plus the days after the pay period ends until money flows into the employees bank account.)
Each record represents a pay period in the pay year
I have 2 questions
1. Is this a good approach to this type of problem? Is there a better way to track this?
2. If so, how do I calculate the value of Pay_Period? It would need to increment up by 1 for each pay period in the current year. When the Payroll_Pay_Date trips into the next year, PayRoll_Year would increase by one and Pay_Period would revert back to a value of 1. The process would then repeat for the new year.
Any help would be appreciated.
I am creating a UX to define Payroll Periods in a MYSQL table.
I have defined the following fields:
Payroll_Year (N) (A 4 digit number that is the year the pay is deposited to the employee's bank account.)
Payroll_Period (N) (values such as 1 to 52 defining each payroll period of the year)
Payroll_ Year_PAY_Period (N) (a calculated field which is Payroll_Year *100 + Payroll_Period. This is used as a control to ensure that each pay period is unique. An example might be 201501 for the first pay period in 2015.)
Payroll_Start_Date (D) (First Date of Payroll Period)
Payroll_Pay_Date (Date the employees get their money deposited to their bank accounts. This is a calculated date based on the length of the payroll period (7 or 14 days) plus the days after the pay period ends until money flows into the employees bank account.)
Each record represents a pay period in the pay year
I have 2 questions
1. Is this a good approach to this type of problem? Is there a better way to track this?
2. If so, how do I calculate the value of Pay_Period? It would need to increment up by 1 for each pay period in the current year. When the Payroll_Pay_Date trips into the next year, PayRoll_Year would increase by one and Pay_Period would revert back to a value of 1. The process would then repeat for the new year.
Any help would be appreciated.
Comment