Notify when data is missing (Record time of work) and including the time minus the lunch break time

Now I have made a payroll app with App to record attendance - leave work (Use it instead of scanning your finger in and out of work)
which I would like to make a data report of everyone’s attendance record, download it as CSV.
But I also want it to show that when A logs the work time but did not record time off work

And the other thing I want is to count the working time by subtracting the rest time.
For example, enter A 7:00 - 17:00 = 8:00 by subtracting the lunch break time.
B 20:00 -05:00 = 8:00 minus the lunch break
In the case of working less than half a day Do not deduct the break time or half day There is no need to subtract the rice as well.