Time Sheet Time Generator
Back to current versionRestore this version

TimeSheetTimeGenerator#

TimeSheetTimeGenerator is called by#

Logic#

1. PTSE records created before the PTS.START_DATE
Keep manually entered PTSE records created before the PTS.START_DATE
Delete any generated PTSE records generated before the PTS.START_DATE

2. PTSE records created after the PTS.END_DATE
Delete any PTSE records generated after the PTS.END_DATE

3. Determine the last “Manual” changed PTSE
Any PTSE record with “Manual” TIME_SHEET_ENTRY_SOURCE “Manual” = MANUAL, MANUAL_BY_TTX, LOADED , MANUAL_BY_PAYROLL
Any PTSE with “GENERATED_SCHEDULED_HOURS” TIME_SHEET_ENTRY_SOURCE where MANUAL_CHANGE_USER is not null

4. Determine if there are leaves with status “1-Requested” before the last manual change

5. Determine dates to be reprocessed
Dates too be reprocessed = any dates after last manual (#3) + any dates for “1-Requested” leave before the last manual change (#4)

6. For dates to be reprocessed - delete any PTSE records that are not manual
Attention if we do not have any leaves with status “1-Requested” leave before the last manual change, there will be no need to check for manual PTSE because they will not exist for the reprocess dates

7. Rebuild PTSE for reprocess dates