[LD] - Leave Day

08-Sep-2022 · Felix Fung, Hey Wu

What is this?

"LD" stands for Leave Day. The payroll variable returns the number of Leave Days taken within the Pay Period.

What will the Value be Returned?

Returns the number of Leave Days taken within the Pay Period. Only specified Leave Type would be counted.

Usage

Hightlight part content can be changed

1. Basic Form

Payroll Variable Description Usage
[LD(Leave Type Code)] Get the number of Leave Days Taken of the specified leave type Get the number of AL taken within the Pay Period
[LD(AL)]

2. Parameters/Variations

Parameters/Variations Description Usage Optional
LEAVE_TYPE=Leave Type Code|Leave Type Code Get the number of leave days of the specified leave types. Get the number of days of AL & CL
[LD(LEAVE_TYPE=AL|CL)]
Yes
AT_LEAST=Number Get the number of leave days of the leave entries with at least the specified leave day(s) SL with 3 or more days in one entry
[LD(SL,AT_LEAST=3)]
Yes
DAY_OF_WEEK=Number*

Number: 0-6
0=Sun, 1=Mon, 2=Tue, 3=Wed, 4=Thur, 5=Fri, 6=Sat
Get the number of leave days on the specified day(s) of week by providing 0 to 6 (Sunday to Saturday)


Exclude the specified day(s) of week by adding "-" at the beginning of the parameter
Specify multiple days of week by the separator "|"
e.g Take the SL days on Saturday and Sunday
[LD(SL,DAY_OF_WEEK=0|6)]

Exclude the SL days on Friday
[LD(SL,-DAY_OF_WEEK=-5)]
Yes
FROM_START_DATE Get the number of leave days since the placement join date. Get all AL days taken from the staff join date
[LD(AL,FROM_START_DATE)]
Yes
HOLIDAY Get the number of leave days on Holiday.

Exclude the leave days on holiday by adding "-" at the beginning of the parameter
Get the AL days taken on Holidays only
[LD(AL,HOLIDAY)]

Exclude SL days on Holiday
[LD(SL,-HOLIDAY)]
Yes
IS_PROBATION_ENDED Get the number of leave days after the placement probation date.

**Remember set the Probation End Date in the Placement profile
Get the AL days taken after the placement Probation End date
[LD(AL,IS_PROBATION_ENDED)]
Yes
30_DAYS Get the number of leave days. If the number of leave days are more than 30, it will return 30. Get the number of SL with maximum 30 days
[LD(SL,30_DAYS)]
Yes

DAYS - to alter calculation period

By default Leave Day variable will take leave records according to Payroll Batch period. To alter the calculation period, uses DAYS= with THIS_MONTH or LAST_MONTH.

Parameters/Variations Example Explanation
DAYS=Number-Number [LD(AL,DAYS=20-19)] Get all AL leave from 20th of last month to 19th of this month. DAYS parameter by default assume starting in last month and ending in this month
DAYS=Number-Number,LAST_MONTH [LD(AL,DAYS=20-31,LAST_MONTH)] Get all AL leave from 20th to 31st of last month. Uses LAST_MONTH for period ending in last month
DAYS=Number-Number,THIS_MONTH [LD(AL,DAYS=1-19,THIS_MONTH)] Get all AL leave from 1st to 19th of this month. Uses THIS_MONTH for period starting in this month