TCS Annual Salary Fast Formula
https://youtu.be/hNX3MIH-PBw
/**************************************************
FF Name: TILAK_TCS_TCS_ITEM_ANN_SALARY
Type : Total Compensation Item
Developer: Tilak
Purpose: Get Annual Salary of the Employee
**************************************************/
/* Declare DBI */
DEFAULT FOR CMP_ASSIGNMENT_SALARY_ANNUAL_AMOUNT is -1
DEFAULT FOR PER_ASG_LEGAL_ENTITY_ID is -1
DEFAULT FOR CMP_ASSIGNMENT_SALARY_CURRENCY_CODE is 'x'
/* Declare IV */
INPUTS ARE CMP_IV_PERIOD_START_DATE(DATE),
CMP_IV_PERIOD_END_DATE (DATE)
/***************** Main ************************/
temp = SET_LOG('Entering Fromula TILAK_SAL_FF ' )
VALUES = ' '
COMPENSATION_DATES = ' '
ASSIGNMENTS = TO_CHAR(get_context(HR_ASSIGNMENT_ID, -1) )
LEGALEMPLOYERS = TO_CHAR(PER_ASG_LEGAL_ENTITY_ID)
COMPENSATION_DATES = TO_CHAR(CMP_IV_PERIOD_END_DATE , 'YYYY/MM/DD')
UNIT = ' '
IF (CMP_ASSIGNMENT_SALARY_ANNUAL_AMOUNT WAS NOT DEFAULTED ) THEN (
VALUES = TO_CHAR(CMP_ASSIGNMENT_SALARY_ANNUAL_AMOUNT)
UNIT = CMP_ASSIGNMENT_SALARY_CURRENCY_CODE
)
temp =SET_LOG('Annual Salary ' || VALUES )
temp =SET_LOG('Assinment ' || ASSIGNMENTS)
temp =SET_LOG('LE ' || LEGALEMPLOYERS )
temp =SET_LOG('Date ' || COMPENSATION_DATES )
temp =SET_LOG('Unit ' || Unit )
temp =SET_LOG('Leaving Fromula TILAK_SAL_FF ' )
RETURN COMPENSATION_DATES, VALUES, UNIT, ASSIGNMENTS, LEGALEMPLOYERS