Generate attendance reports from clocking punches

Job ID: 37248131

Budget: £10 – £20 GBP

I am looking for someone to generate 2 types of reports based on the punches received from clocking machine. Each punch is stored in a single row of a database.
The reports needs to be generated in php (preferably procedural) and displayed in HTML table.

There are two SQL tables:
1. user – will only be used to fetch user’s full name from user id
2. punches


1. First Report - Punches Report.

This report needs to show table with all clocking’s in the table in certain order. The SQL query will need to be able to adapt some WHERE conditions, such as “daterange”, “name”, and “organisation”.
When the report is listed, it needs to highlight potential clocking errors. There are 2 main clocking modes, In and Out, and the third one is “Ignore”.

• If the first clock-in on the given date for any user is “Out”, instead of “In”, it should highlight that row in red.
• The correct number of clockings should be even, for example (In, Out, In, Out), so if the number of clockings of each user for that day is odd, the last row should be highlighted in red.
• If two clocking are identical status one after another, for example (In, Out, In, in) the row should be highlighted in red.
• Any “Ignore” statuses should be completely ignored.
More details are in pdf attachment.



2. Second Report - Attendance Report
This report is generated from the punches table. It needs to calculate the total time, for each date, per user. For example, if user has 4 punches (In, Out, In, Out), it needs to calculate the time betweeb first “In and Out” and second “In and Out”and so on.

The .sql file of sample punches will be provided.

More information in the attachments.