Limitation with calculation of annual leave
Omejitev pri izračunu letnega dopusta

|
All employee in the company has the right to maximum 27 days of annual leave.
Exception are three employees met the following conditions:
- Females, that age is equal or higher than 50 years or that length of service is equal or higher than 25 years;
- Males, that age is equal or higher than 55 years or that length of service is equal or higher than 30 years
These employees do not have limitations for maximum annual leave and the leave will not be reduced!
|
1. Administration panel
In Administration panel |…| Personnel | Leave we confirm the checkbox Maximum Leave, where the fields Days and Formula are shown:

In the field Days we enter 27 days and in the formula we enter the following SQL sentence:
~S~
case when ('#SPL#'='M' and (#STR#>659 or #SVDD#>359)) then 999 else
case when ('#SPL#'='Ž' and (#STR#>599 or #SVDD#>299)) then 999
else 27 end end
~S~

2. Employees file
In the employees file in the panel Absence | Leave Parameters for the calculation according to the Formula via the Calculation button, start the Annual Leave Calculation.

Because the employee meets the condition that her age is, equal or higher than 50 years in the annual leave calculation take into account the total leave and not the max 27 days.

An employee who does not meet the condition will have a leave according to the calculation formula according to the maximum limit or. on the number of days we have entered in the Administration Panel l ... l Personnel l Leave in the Days field and in the SQL condition. The calculation of leave would be as follows:

Where also on the decision for annual leave reduces the number of days to the maximum leave specified in the Administration panel.
