# Automatically calculate hourly leaves based on attendance

Hello,
I know Attendance and Leaves are separate modules in Zoho People, but I was wondering if there's a way to get the following behaviour.

Let's say we want our employees to work 8 hours a day by entering the office at 8:30am and leaving it at 5pm (with half hour lunch-break in the middle).

Let's make the following case:
1) Employee A checks-in at 8:30am
2) He then checks-out at 9:30am, cause he has to leave the office for personal obligations
3) after 1 hour (10:30am) he gets back to the office and checks-in again
4) He then checks-out at 5pm

Is there a way to:
1. mark the employee as "present" for that day?
2. deduct 1 hours of hourly leaves from his available hourly leaves amount?
In this sense, for us the employee:
1. is always present even if he checks-in/out for 1 minute
2. the hourly leaves for a day is always: 8 hours - the sum of the hours he was not in the office between 8:30am and 5pm - half hour lunch break
3. is always absent when he's on daily leave
Thank you

• # Sticky Posts

• ## Team Zoho People in your city!

We are back with our next series of community events to meet you at your city! We are delighted to invite you to join us for a day of insightful sessions, interactions with other Zoho People users, and one-on-one sessions with our product experts. This