Table: dbo.Employee_Payroll_Item_Distribution
Table that supports multiple rates/amount/percents as well as GL accounts for work location/payroll department combinations (for Employee_Payroll_Item).
Columns
NameTypeConstraintsDescription
employee_payroll_item_distribution_KEYint (4)NOT NULLPrimary key for this table.
employee_payroll_item_KEYint (4)NOT NULLForeign key to the Employee_Payroll_Item table.
employee_work_location_payroll_department_KEYint (4)NOT NULLForeign key to the Employee_Work_Location_Payroll_Department table. This table houses the a given Employee's work location/payroll departments.
amountdecimal (9, 2)NOT NULLPayroll item amount for this work location/payroll department combination.
ratedecimal (9, 4)NOT NULLPayroll item rate for this work location/payroll department combination.
percentagedecimal (5, 4)NOT NULLPayroll item percentage for this work location/payroll department combination.
liability__gl_account_KEYint (4)Optional liability gl account for this work location/payroll department combination
expense__gl_account_KEYint (4)Optional expense gl account for this work location/payroll department combination
Primary key
NameColumnsDescription
PK_Employee_Payroll_Item_Distributionemployee_payroll_item_distribution_KEY
Unique constraints
NameColumnsDescription
UK_Employee_Payroll_Item_Distribution$employee_payroll_item_KEY$employee_work_location_payroll_department_KEYemployee_payroll_item_KEY, employee_work_location_payroll_department_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Employee_Payroll_Item_Distribution__Employee_Payroll_Item__employee_payroll_item_KEYemployee_payroll_item_KEYEmployee_Payroll_Item (employee_payroll_item_KEY)
FK_Employee_Payroll_Item_Distribution__Employee_Work_Location_Payroll_Department__employee_work_location_payroll_department_KEYemployee_work_location_payroll_department_KEYEmployee_Work_Location_Payroll_Department (employee_work_location_payroll_department_KEY)
FK_Employee_Payroll_Item_Distribution__GL_Account__expense__gl_account_KEYexpense__gl_account_KEYGL_Account (gl_account_KEY)
FK_Employee_Payroll_Item_Distribution__GL_Account__liability__gl_account_KEYliability__gl_account_KEYGL_Account (gl_account_KEY)

Schema diagram