I have a database in access where the employees register themseves every day of work.
If they don't get to work, theres no registration.
The clock start to register from march 28th 2014 untill now.
An employee could be not hire in the 2014, so he or she has no registered until he or she start to work with us.
For example: A guy start to work in december 7th, but he did not come to work in december 9th.
With Kettle I fill from the regitration into a mysql table he came to work in december 7th, 8th, 10th and 11th.
TABLE 1 (assistance)
id employee_id in lunch lunch_end out
1 1234 2015-12-07 08:00:00 2015-12-07 13:00:00 2015-12-07 14:00:00 2015-12-07 18:00:00
2 1234 2015-12-08 08:15:00 2015-12-08 13:00:00 2015-12-08 14:00:00 2015-12-08 18:00:00
3 1234 2015-12-10 07:55:00 2015-12-10 13:00:00 2015-12-10 14:00:00 2015-12-10 17:41:00
4 1234 2015-12-11 08:00:00 2015-12-11 13:00:00 2015-12-11 14:00:00 2015-12-11 18:00:00
With CakePHP3 I show in a view this data. But due he was absent in december 9th, I dont have that registration.
VIEW 1
EMPLOYEE DAY IN LUNCH LUNCH END OUT STATUS
Harry Potter December 7th, 2015 8:00 am 1:00 pm 2:00 pm 6:00 pm OK
Harry Potter December 8th, 2015 8:15 am 1:00 pm 2:00 pm 6:00 pm LATE IN
Harry Potter December 10th, 2015 7:55 am 1:00 pm 2:00 pm 5:41 pm EARLY OUT
Harry Potter December 11th, 2015 8:00 am 1:00 pm 2:00 pm 6:00 pm OK
So, in the view I must show he was absent on december 9th. But I can not do this due the row for december 9th is not in TABLE 1.
I would like to add a row into CakePHP 3 view with the data of TABLE 1 on the fly and the script can't be slow or too resource consuming:
VIEW 2
EMPLOYEE DAY IN LUNCH LUNCH END OUT STATUS
Harry Potter December 7th, 2015 8:00 am 1:00 pm 2:00 pm 6:00 pm OK
Harry Potter December 8th, 2015 8:15 am 1:00 pm 2:00 pm 6:00 pm LATE IN
Harry Potter December 9th, 2015 - - - - ABSENT
Harry Potter December 10th, 2015 7:55 am 1:00 pm 2:00 pm 5:41 pm EARLY OUT
Harry Potter December 11th, 2015 8:00 am 1:00 pm 2:00 pm 6:00 pm OK
Because the clock start in march 28th, 2014 I must skip until the first regsitration of this employee (or any other employee). Of cuorse, every employee start to work on diferents dates.
I can't figure how to solve this algorithm. Please, help!!