Part A: Steps of calculation


Step 1: The system will use the company profile's leave calculation method to determine the employee's yearly leave entitlement. 


Step 2: Once the user enters the employee’s resignation date, the system will use this information to calculate the prorated leave entitlement. 


No. ConditionFormula
1. Resign Year = Join Year

Yearly entitlement x (resign date – join date + 1)

--------------------------------------------------------------

(Last day of the year – join date + 1)


2. Resign Year ≠ Join Year
Yearly entitlement x (resign date – first day of the year + 1
----------------------------------------------------------------

Total days of the year




Step 3: Determine whether the annual leave entitlement must be prorated monthly.


No. Entitlement Calculation MethodFormula
1. Yearly Leave

Final calculation refers to step 2

2. Earn Leave:
i. Resign Date = End date of the month

(Step 2 Figure) x worked months

-----------------------------------------

Total months


Earn Leave:
ii. Resign Date ≠ End date of the month

(Step 2 Figure) x (worked months – 1)

-----------------------------------------------

Total months


3. Advance Earn Leave

(Step 2 Figure) x worked months

-----------------------------------------

Total months

    


Step 4: Finally, check the rounding rules applied to the leave entitlement calculation.


No. Entitlement Calculation MethodLeave's Roundup Method
Round As Below
1. Yearly LeaveHourlyRound up to nearest 2 decimals
Half DayDecimal < 0.1 round to 0
Decimal >= 0.1 & < 0.6 round to 0.5
Decimal >=0.6 round to 1
Full DayDecimal > 0.51 round up else round down
2.
Earn Leave / Advance Earn Leave
Hourly
Round up to nearest 2 decimals
Half DayDecimal < 0.49 round to 0
Decimal >= 0.49 & < 0.99 round to 0.5
Decimal >=0.99 round to 1
Full DayDecimal <= 0.99 round to 0
Decimal > 0.99 round to 1




Part B: Scenario Reference


Notes:
The employee’s leave entitlement is 12 days per year.
The company uses an earned leave concept and allows employees to apply for half-day leave. 


Scenario (a):
If Employee A resigned on 31/01/2023, the calculation is as follows:


StepConditionFormulaCalculation
1Resign Year ≠ Join Year

(Yearly Entitlement × (Resignation Date − First Day of the Year +1))
-------------------------------------------------------------------------
Total Days in the Year 


= [12 x (31 - 1 + 1)] ÷ 365

= 12 x [31 ÷ 365]

= 1.019178


2Resign Date = End date of the month

"Step 1 Figure" × Worked Months
------------------------------------
Total Months 

= (1.019178 x  1 month) ÷ 1 month) 

= 1.019178 days 

Rounding MethodFor earn leave with half day= 1.019178 days ≈ 1.0
∴ Employee A is entitled 1.0 day leave on Year 2023



Scenario (b):
If Employee B resigned on 01/02/2023, the calculation is as follows:


StepConditionFormulaCalculation
1Resign Year Join Year(Yearly Entitlement × (Resignation Date − First Day of the Year +1))
-----------------------------------------------------------------------
Total Days in the Year 
= [12 x (32 - 1 + 1)] ÷ 365
=1.052055
2Resign Year End date of the month"Step 1 Figure"  × (Worked Months1)
-------------------------------------------
Total Months 

=[1.052055 × (21) months]

÷ 2 months

0.526027 days 

3Rounding MethodFor earn leave with half day
0.526027 days ≈ 0.5 
Employee B is entitled 0.5 day leave on Year 2023




By Winnie 230410, Azirah 250814