Beruflich Dokumente
Kultur Dokumente
l_age = MONTHS_BETWEEN(PAY_PROC_PERIOD_END_DATE_DP,PER_DATE_OF_BIRTH)/12
l_msg = SA_GET_MESSAGE('PAY','HR_374812_SA_LOC_NAT_NOT_DEF')
return l_msg)
/*
Only do GOSI calculation if employee is subject to at least one type of
GOSI deduction.
*/
IF (SCL_ASG_SA_GOSI_ANNUITIES = 'Y') OR (SCL_ASG_SA_GOSI_HAZARDS = 'Y') THEN
(
/*
Do not process if the employee has been terminated before 28th of the
month being processed.
*/
IF SA_PERSON_TERMINATION_DATE >= PAY_PROC_PERIOD_END_DATE_DP OR
(TO_NUMBER(TO_CHAR(SA_PERSON_TERMINATION_DATE,'DD')) > 27 AND
MONTHS_BETWEEN(SA_PERSON_TERMINATION_DATE
,PAY_PROC_PERIOD_END_DATE_DP) < 1) THEN
(
/*
Get the GOSI base on which to base the calculation.
*/
gosi_base = GOSI_REFERENCE_EARNINGS_ASG_YTD
/*Added for recalculation of reference salary of employees over 50 years of
age*/
IF gosi_base = 0 THEN
(IF l_age > SA_EE_AGE_C_WAGE THEN
/*Bug No 6976224*/
(IF SUBJECT_TO_GOSI_ASG_RUN=0 THEN
(l_subject_to_gosi = SA_USER_GOSI_REFERENCE_FORMULA())
ELSE
(l_subject_to_gosi = SUBJECT_TO_GOSI_ASG_RUN)
gosi_base = SA_GET_C_WAGE_EMP_AGE(SA_EE_AGE_CHANGE_PCT, l_subject_to_gosi)
ee_gosi_reference_earnings = gosi_base
)
)
If gosi_base = 0 Then
(
gosi_base = SA_USER_GOSI_REFERENCE_FORMULA()
ee_gosi_reference_earnings = gosi_base
)
If gosi_base = 0 Then
(
gosi_base = SUBJECT_TO_GOSI_ASG_RUN
ee_gosi_reference_earnings = gosi_base
)
/*
Adjust the GOSI base based on the upper and lower GOSI limits.
*/
gosi_base_temp = gosi_base
gosi_base = LEAST(GREATEST(gosi_base, SA_GOSI_BASE_LOWER_LIMIT)
,SA_GOSI_BASE_UPPER_LIMIT)
gosi_hazards_base = LEAST(GREATEST(gosi_base_temp, SA_GOSI_BASE_HZ_LOWER_LIMIT)
,SA_GOSI_BASE_UPPER_LIMIT)
l_matches = SA_LOCAL_NATIONALITY_MATCHES()
if l_matches = 'MATCH' then
(gosi_hazards_base = gosi_base)
/*
GOSI Annuities calculation.
*/
If SCL_ASG_SA_GOSI_ANNUITIES = 'Y' Then
(
er_gosi_annuities = gosi_base * SA_ER_ANNUITIES_PCT/100
ee_gosi_annuities = gosi_base * SA_EE_ANNUITIES_PCT/100
er_rate_annuities = SA_ER_ANNUITIES_PCT
ee_rate_annuities = SA_EE_ANNUITIES_PCT
annuities_gosi_base = gosi_base
/*
Employees net pay is too small to meet the GOSI deduction so
employer pays the difference NB. employee will receive zero
net pay in this case.
*/
IF NET_ASG_RUN < ee_gosi_annuities THEN
(
ee_gosi_arrears = ee_gosi_annuities - NET_ASG_RUN
ee_gosi_annuities = NET_ASG_RUN
)
)
/*
GOSI Hazards calculation.
*/
IF SCL_ASG_SA_GOSI_HAZARDS = 'Y' THEN
(
er_gosi_hazards = gosi_hazards_base * SA_ER_HAZARDS_PCT/100
er_rate_hazards = SA_ER_HAZARDS_PCT
hazards_gosi_base = gosi_hazards_base
)
RETURN hazards_gosi_base
,annuities_gosi_base
,er_rate_hazards
,er_rate_annuities
,ee_rate_annuities
,er_gosi_hazards
,er_gosi_annuities
,ee_gosi_annuities
,ee_gosi_arrears
,ee_gosi_reference_earnings
)
)