Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Voluntary Deduction Third Party Payment Setup

Create a new input value called Payee on the Base element.

Special Purpose is Third-Party Payee.

Reference is Third Party Payee.

Tick Displayed, Allow User Entry and Create a Database Item.

Do the same on the Results element but also Change the Priority of the Results
element to 8510
Update The VOL_DEDN_CALCULATOR formula to add the following (in blue)
/**********************************************************************
FORMULA NAME: GMBATU_668_TPP_VOL_DEDN_CALCULATOR
FORMULA TYPE: Payroll
***********************************************************************/
ALIAS NET_REL_RUN AS Net_Earnings
ALIAS NET_REL_NOCB_RUN AS Net_Earnings_NOCB
ALIAS GROSS_EARNINGS_REL_RUN AS Gross_Earnings
ALIAS GROSS_EARNINGS_REL_NOCB_RUN AS Gross_Earnings_NOCB
ALIAS GMBATU_668_TPP_ELIGIBLE_COMP_REL_NOCB_RUN AS Eligible_Compensation_NOCB
DEFAULT FOR Net_Earnings IS 0
DEFAULT FOR Net_Earnings_NOCB IS 0
DEFAULT FOR Gross_Earnings IS 0
DEFAULT FOR Gross_Earnings_NOCB IS 0

DEFAULT FOR GMBATU_668_TPP_ACCRUED_ASG_ITD IS 0


DEFAULT FOR GMBATU_668_TPP_ACCRUED_TRM_ITD IS 0
DEFAULT FOR GMBATU_668_TPP_ACCRUED_REL_ITD IS 0
DEFAULT FOR GMBATU_668_TPP_PAYEE_ASG_ENTRY_VALUE Is 0

DEFAULT FOR GMBATU_668_TPP_ARREAR_ASG_ITD IS 0


DEFAULT FOR GMBATU_668_TPP_ARREAR_TRM_ITD IS 0
DEFAULT FOR GMBATU_668_TPP_ARREAR_REL_ITD IS 0

DEFAULT FOR GMBATU_668_TPP_ELIGIBLE_COMP_ASG_RUN IS 0


DEFAULT FOR GMBATU_668_TPP_ELIGIBLE_COMP_TRM_RUN IS 0
DEFAULT FOR GMBATU_668_TPP_ELIGIBLE_COMP_REL_RUN IS 0
DEFAULT FOR Eligible_Compensation_NOCB IS 0

DEFAULT FOR ENTRY_LEVEL IS 'PA'


DEFAULT FOR Prorate_Start IS '0001/01/01 00:00:00' (DATE)

INPUTS ARE Prorate_Start (DATE)

Formula_Name = '[GMBATU_668_TPP_VOL_DEDN_CALCULATOR]'
ee_context_id = GET_CONTEXT(ELEMENT_ENTRY_ID,0)

IF (Prorate_Start WAS DEFAULTED) THEN


(
EE_ID = TO_CHAR(ee_context_id)
)
ELSE
(
EE_ID = TO_CHAR(ee_context_id) + TO_CHAR(Prorate_Start,'DDMMYYYY')
)
dummy = PAY_INTERNAL_LOG_WRITE(Formula_Name||' ee_context_id = '||TO_CHAR(ee_context_id))
dummy = PAY_INTERNAL_LOG_WRITE(Formula_Name||' EE_ID = '||EE_ID)

IF EE_ID = '0' THEN


(
dummy = PAY_INTERNAL_LOG_WRITE(Formula_Name||' Element Entry Id context not set')
Error_Mesg = 'Element Entry Id context is not set.'
RETURN Error_Mesg
)
ELSE
(
/* --------------------------------------------------------------------------------
** Attachment Level determines the appropriate Dimension used to calculate
** the Deduction
** --------------------------------------------------------------------------------
*/
Attachment_Level = ENTRY_LEVEL
IF (Attachment_Level = 'PA') THEN
(
/* Assignment Level */
Eligible_Compensation = GMBATU_668_TPP_ELIGIBLE_COMP_ASG_RUN
Arrears_Balance = GMBATU_668_TPP_ARREAR_ASG_ITD
Amount_Accrued = GMBATU_668_TPP_ACCRUED_ASG_ITD
)
ELSE IF (Attachment_Level = 'AP' or Attachment_Level = 'PT') THEN
(
/* Terms Level */
Eligible_Compensation = GMBATU_668_TPP_ELIGIBLE_COMP_TRM_RUN
Arrears_Balance = GMBATU_668_TPP_ARREAR_TRM_ITD
Amount_Accrued = GMBATU_668_TPP_ACCRUED_TRM_ITD
)
ELSE IF (Attachment_Level = 'PR') THEN
(
/* Relationship Level */
Eligible_Compensation = GMBATU_668_TPP_ELIGIBLE_COMP_REL_RUN
Arrears_Balance = GMBATU_668_TPP_ARREAR_REL_ITD
Amount_Accrued = GMBATU_668_TPP_ACCRUED_REL_ITD
)
dummy = PAY_INTERNAL_LOG_WRITE(Formula_Name||' Eligible_Comp = '||TO_CHAR(Eligible_Compensation))
dummy = PAY_INTERNAL_LOG_WRITE(Formula_Name||' Arrears_Balance = '||TO_CHAR(Arrears_Balance))
dummy = PAY_INTERNAL_LOG_WRITE(Formula_Name||' Amount_Accrued = '||TO_CHAR(Amount_Accrued))

CALL_FORMULA(
'GLB_DEDN_DUMMY_GUARANTEED_NET',
Guaranteed_net < 'Guaranteed_net' DEFAULT 0
)

CALL_FORMULA(
'GLB_DEDN_VDED_CALC',
Gross_Earnings > 'Gross_Earnings',
Gross_Earnings_NOCB > 'Gross_Earnings_NOCB',
Net_Earnings > 'Net_Earnings',
Net_Earnings_nocb > 'Net_Earnings_NOCB',
Eligible_Compensation > 'Eligible_Compensation',
Eligible_Compensation_NOCB > 'Eligible_Compensation_NOCB',
Arrears_Balance > 'Arrears_Balance',
Amount_Accrued > 'Amount_Accrued',
EE_ID > 'EE_ID',
Guaranteed_net > 'Guaranteed_Net',
Dedn_Amt < 'Dedn_Amt' DEFAULT 0,
To_Total_Owed < 'To_Total_Owed' DEFAULT 0,
To_Arrears < 'To_Arrears' DEFAULT 0,
Not_Taken < 'Not_Taken' DEFAULT 0,
Mesg < 'Mesg' DEFAULT 'ZZZ',
Error_Mesg < 'Error_Mesg' DEFAULT 'ZZZ',
Stop_Entry < 'Stop_Entry' DEFAULT 'N'
)

IF (Error_Mesg = 'There are no Earnings available to calculate the deduction.') THEN


RETURN Error_Mesg, Dedn_Amt, Not_Taken

ELSE IF ( Error_Mesg <> 'ZZZ' ) THEN


RETURN Error_Mesg

/* ------------------------------------------------------------------------
** We need to check if Stop_Entry is populated, as regardless of what value
** it holds, processing will stop if its returned
** ------------------------------------------------------------------------
*/

Payee = GMBATU_668_TPP_PAYEE_ASG_ENTRY_VALUE

IF Stop_Entry = 'Y' THEN


(
Mesg = 'GMBATU_668_TPP has reached the Total Amount that is owed. Future processing will halt.'
RETURN Dedn_Amt,Stop_Entry,To_Total_Owed,Mesg,To_Arrears,Not_Taken,Error_Mesg,Payee
)
ELSE
(
IF (Mesg <> 'ZZZ') THEN RETURN Dedn_Amt,To_Total_Owed,To_Arrears,Not_Taken,Mesg,Payee
ELSE RETURN Dedn_Amt,To_Total_Owed,To_Arrears,Not_Taken,Payee
)
)

Add the Formula Result on the Calculator Element going to the result Element
Create the link, defaulting in the Payee on the Input Values tab – we might need to
look and see how to do this using HDL

Add the Feed to the Third Party Payment Balance

You might also like