我正在为多家商店和约100名员工构建工资单准备解决方案。有一些相当复杂的数学涉及多个奖金和小时计算。我在excel中构建了一个工作模型,但由于大量的记录和必须发生的处理复杂性,Access似乎是一个更好的解决方案。我还没有完成很多访问。
我基本上需要构建一个数据输入表单,用户可以快速输入多种类型的小时,然后使用相同的员工信息作为单独的记录(常规,OT,DT等等1)处理。每种薪资类型都有不同的GL代码等...输出是HR可以用来验证和输入正确时间的报告。我目前正在一张桌子上记录所有小时记录,其中包含每种薪资类型和员工信息的字段。我对每个小时类型的单独表格是否有意义感兴趣;或者如果我把它放在一个表中,那么处理我捕获的数据的最佳方法是(我需要以摘要形式生成显示每个员工,付费类型等的内容。
感谢任何帮助。
答案 0 :(得分:0)
I can tell you the traditional way to do it would be to keep the pay types in a separate table.
However, if the pay types are relatively stable and/or small in number there's no reason you can't keep them in one row. So you could have a report like:
SELECT "1" AS PayType, Sum(Payroll.Pay1) AS Hours
FROM Payroll
UNION
SELECT "OT" AS PayType, Sum(Payroll.PayOT) AS Hours
FROM Payroll
UNION
SELECT "DT" AS PayType, Sum(Payroll.PayDT) AS Hours
FROM Payroll
I would generally use the first method, in which case you'd have a table with the pay type and GL, a table with employees, and a many-to-many table with EmployeeID, PayTypeID and Hours. This gives you the most flexibility in case you need to add or remove pay types, or create new report layouts.