Scenario:
Adam tries to apply leave, but system prompts the error: "Payroll process is created".

Answer:
This happens because the payroll for the selected period has already been created. Once payroll is processed, the system will lock leave applications within that period to prevent any changes that may affect payroll calculations.

The system controls this using the Leave Cutoff Date:
- Leave dated within the cutoff period > not allowed after payroll is created.
- Leave dated after the cutoff date > still allowed

Example:
If the leave cutoff date is set to 20th:
- Leave from 1st to 20th : not allowed
- Leave from 21st onwards : allowed
If the leave date falls within the locked period, the user will need to:
- apply leave for a later date,
- request admin tto cancel and reprocess payroll before applying keave
By Azirah 260421