For simplest app, you need a table like:
Date, Employee, StartTime, EndTime, EntryType
To register the worktime for any employee, you add for this employee a row for every entry type you are registering for employee on this date. Like:
01.12.2024 Employee1 08:00 11:30 worktime
01.12.2024 Employee1 11:30 12:00 lunchtime
01.12.2024 Employee1 12:00 16:30 worktime
The worktime for Employee1 at 01.12.2024 is calculated as sum of worktime entries. The lunchtime is not included into worktime.
You need a separate table, where you define all possible EntryTypes, like:
worktime, lunch breake, state holiday, annual leave, sick leave, etc. In this table, you also determine for every entry type, does it add to worktime calculation, and when yes, does it add as positive or negative value (and whatever other additional info you need)
Now you can create any number of report sheets, like daily, weekly, monthly or yearly reports. At top of report sheet, you select a period for report (using Data Validation list), and any other filter conditions in case there is a need for them, and below conditions the report table is calculated based on your data entry and entry types tables, according the conditions you set for this report.
NB! In case the worktime can start and end on different dates (over midnight), you have to enter start and end times as datetimes (like 01.12.2024 08:00)!
NB! In report sheets, you have to format the cells with worktime totals (which surely may be >24 hours) like "[h]:mm"!
|