# Lunch Hour Deduction

please suggest someone i want to deduct lunch hours from working hours reflecting in the attendance.

Dear @Sahilmiya ,

Possible & Do-able.

1. How does the lunch hours gets picked up or recorded?
2. Is it manually entered or through check-in & check-out process?

It’s missing feature, no where option to add lunch hours or calculate wages based on hours from attendance

Dear @Sahilmiya ,

I agree. You can add custom fields in the following screen shot and bring out a good solution based approach.

I tried to add custom field there for lunch hour, but problem is i didnt found the function in any file which is calculating the working hours. I tried to find out but found it nowhere does it coming from backend ?

Attendance is coming from check-in and check-out

Dear @Sahilmiya ,

When they leave for lunch, do they check-out?

How do we know that, every check-out if not meant for lunch.

The best way to design this is to

1. Let’s presume the official lunch duration is 30 minutes.
2. Let’s presume that the employee can step out for lunch between 1 pm to 2 pm.

As per the above, we can plan that any check-outs after 1 pm - will be deemed as checked out for lunch. Whenever he check-ins back, it will be deemed to be the check-in, again.

The difference between check-out after 1 pm and the next check-in is deemed to be the lunch hour.

Will this work out?

Dear @Sahilmiya

If this works out, then I can share the code for getting this calculation done.

Yes, this can workout, but instead this is more accurate that

Deduct the lunch hour from working hours whether employee check-out or not

In factory premises workers take lunch inside but the lunch hour is deducted from working hours

Optionally there should be special case scenario where sometimes lunch hour DONT GET DEDUCTED.

Is there any possibility for this please ?

Dear @Sahilmiya

Yes - Possible.

1. Let’s have a column for lunch hour deduction.
2. That will have option to data entry / data input.
3. Formula is Total Hours = (Checkout Minus Checkin)
4. Step 3 Hours Minus Lunch Hours

Will be the effective working hours.

can you help me locate where this total hours is assigned as working_hour field ?, I found theres calculate working hours () in employee_checkin.py but i didnt found where value is feed in working_hours