KatjaGlassConsulting / ApprovalBundle

A Kimai Plugin to manage weekly approval workflow
MIT License
11 stars 14 forks source link

Total vs Expected Duration #10

Closed asaglam76 closed 1 year ago

asaglam76 commented 1 year ago

weekly working hours Mo-Do 8h Fr: 7h Total 39h.

Total Duration is 39h but why expected duration is showing 46h. It looks like that somehow weekends also calculated. We use also the vacation / sick day and controlling plugin hours_approval grafik

grafik

grafik

KatjaGlassConsulting commented 1 year ago

Hi, the expected working hours are based on the user setting for the workdays. These you can see under "user" -> select the specific user and go to the working hours per day settings summing up Monday-Sunday. Typically Saturday and Sunday are set to 0.

image

asaglam76 commented 1 year ago

Hi, thats right .. sat and sun is set to 0 .. see grafik thats why I'm wondering :)

KatjaGlassConsulting commented 1 year ago

Did you change the values for this person? The "expected duration" is calculated and stored when the first "submit for approval" is done. You can also check in the database the corresponding entry. If you find that one, you can apply "/60/60" to get the minutes - this is 46hours according your screenshot. When you scroll to an unsubmitted week (e.g. week 10 this year), is the expected duration is also 46 or is this in that case 39?

image

asaglam76 commented 1 year ago

Beginning is as of 2023 .. we've newly implemented Kimai. grafik grafik For me it looks like that it is expecting for every day 1h >> 39h + 7h = 46h .. I also wonder if it has something to do with the break-time ... see above .. for 8h it is separated in two timebands (for example 08:00-12:00 and 13:00-17:00) but in your screenshots it looks like that you entering full 8h without any breaks. The fact that there is a discrepancy between Total and Expected is currently not a big issue ... On the part of the employees and the granting persons, there are then questions as to where the discrepancy comes from. One employee complained to me personally today why she was expected to work 46 hours. 🤣

Regarding the above question ... expected is 39h >> 8 | 8 | 8 | 8 | 7 | 0 | 0 # Depending on the person, the daily working hours were entered. In this context, I would now expect the Total Duration for example 40h (are based on the entries Mo-Fr) and Expected (39h, since what should be done). In this case, the person would have worked 1h more than contractually agreed. Below see my entry for Jan 23 - Week 02 grafik Here .. Total Duration is 40,5h and Expected should be 39h > 1,5h overtime total week .. but it is calculated with 46h expected 😄 grafik

asaglam76 commented 1 year ago

Katja .. found the bug .. it my a mistake in setting grafik For Sunday, I had falsely set Friday (somehow it slipped through). Since by default Friday 7h working time are and this was set for both Friday and Sunday in the settings ... it has of course 39h + Sunday (Friday 7h) counted with it >> 46h. Now it also works as it should ... grafik sorry for the inconvenience :relieved: