I have a requirement where a 3rd party system requires planned leave start date and planned leave end date, whereas we don't store these details in EC. So we cannot fetch these details directly from the EC system.
We only have start date and the end date when the employee applies for the leaves and if at all employee extends the leaves he has to apply for a new leave.
For eg. If employee applied for a leave from 1 july 2020 to 8 july 2020 and he returns on 10 july 2020. Then he has to apply for a new leave in EC where his start date is 9 july 2020 and end date is 10 july 2020.
While fetching leaves in CPI these two leaves for this employee will come as a different records in CPI.
Is there a way in which I can calculate that his planned date was 8 july and his actual return date is 10 july.