kit-sdq / TimeSheetGenerator

TimeSheetGenerator is an application that checks and builds time sheet documents.
MIT License
23 stars 6 forks source link

Pause between two blocks on the same day is not taken into account #117

Closed larsk21 closed 2 years ago

larsk21 commented 2 years ago

This is valid:

{"action": "something", "day": 5, "start": "08:00", "end": "16:30", "pause": "00:30"}

while this is not:

{"action": "something", "day": 5, "start": "08:00", "end": "12:00", "pause": "00:00"},
{"action": "something", "day": 5, "start": "12:30", "end": "16:30", "pause": "00:00"}

the resulting error is: Maximum working time without pause exceeded on [...]

gstuer commented 2 years ago

Hello @larsk21, thanks for your issue :)

Some general assumptions According to §2 ArbZg (https://www.gesetze-im-internet.de/arbzg/__2.html) working times from more than one employer are summed up. Therefore, having more than one job (different employers) is legal in the first place.

Issue specific discussion The problem is, that the calculation rules are not fully clarified within the ArbZg. According to §4 an employee has to take a thirty minute break after working 6h. Those breaks have to be fixed/known in advance according to §4. My personal interpretation of §2 and §4 would allow you to work as shown in the following:

{"action": "job A", "day": 5, "start": "08:00", "end": "12:00", "pause": "00:00"}, {"action": "job B", "day": 5, "start": "12:00", "end": "13:00", "pause": "00:00"}, (Different Job) {"action": "job A", "day": 5, "start": "13:00", "end": "13:59", "pause": "00:00"} --> Problem: Those times would not be within the same timesheet (different employers) but the times are legal according to my interpretation of the above mentioned law sections.

Conclusion In my opinion, your issue does not specify a bug. But the issue brings up another interesting question: People who are working for more than one employer have to create more than one time sheet. How are they supposed to document their pause times when they are working at the same day in two or more jobs? Is it legal to document the pause times redundantly (same begin and end) on all time sheets (-> §2 with summed up times)?

larsk21 commented 2 years ago

Thank you for your response!

My issue, however, was not working two separate jobs, but working two times a day on the same job (with different action titles though). Example: having one meeting in the morning and one meeting in the afternoon, but not working in between. Is the solution to just specify start and end for the day and insert a 5 hour pause?

gstuer commented 2 years ago

Your solution sounds valid. Personally, i would prefer the following solution to clarify the action, whereas one big action makes traceability more difficult.

{"action": "Meeting 1", "day": 5, "start": "08:00", "end": "12:30", "pause": "00:30"}, (Pause at the end) {"action": "Meeting 2", "day": 5, "start": "14:00", "end": "18:00", "pause": "00:00"}

larsk21 commented 2 years ago

That was also my solution, but it seemed a bit hacky to me.