Hi All,
This Blogs explains how to Stop an employee to apply leave beyond Payroll Period. This is one of our client requirement and we achieved through the below Business rule
Requirement: Client Payroll Period is 26th to 25th of Every month. Employees are not allowed to apply leave in this window.
Solution Steps:
- Write Business rule by using Variables
- Assign Business rule to Time Type
- Result
1. Business Rule using Variables: Create Business rule under Time Management --> Absence Validation scenario.
Create two variables:
- Previous_Month_26th --> Get the Previous month 26th in to this variable and store
- Current_Month_25th --> Get the current month 25th date in this variable and store
Please find the screenshot for your reference
Compare these two dates with Employee time start date.
If employee Time start date is before 26th of previous month throw the error & Else if Employee Time start date is after 25th of current month then throw the error.
Please find the below screenshot for your reference.
2. Assigning Business rule to Time Type: Assign this rule to the Time type under Take Rules
Please find the below screenshot for your reference.
3. Result: Employee Apply a leave (Start Date) beyond the Payroll window. System throw error message. Please find the below screenshot for reference.
Hope this Blog helps you to accommodate similar kind of requirement & it helps you to know how to use variables to simplify the business rule & process Business rules efficiently.
Regards,
Manjunath BK