cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Count absences from last year to the current payroll run

HazemKHALED
Discoverer
407

I have a complex issue related to absences, i have absence type 0003 and i should count the number of days from this absences from last year to the current payroll,

example : if i run 01.07.2024 to 31.07.2024 , system should count the number of absence days from 01.08.2023 to 31.07.2024

and the next month august 2024 , system should count the days from 01.09.2023 to 31.08.2024 and so on.....

Note: i use negative time 

any support?

 

Accepted Solutions (0)

Answers (1)

Answers (1)

XxEmixX
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi, 

I understand yur are doing this in payroll. I think the simplest approach is just before where you need this number to create a custom payroll function that reads PA2001, and delete entries outside the desire period,this case las 12 months since current period and also other subtypes. 

The result should be a table with PA2001 with only desire entries. Once you have that it is count the number of days or sum calendar/absence days of the result of the previous loop depending the result you need to count. 

Regards