select sum(fnd_number.canonical_to_number(pai.action_information2)) TOTAL_DEDUCTION,
max(TOTAL_DEDUCTION_DESC) TOTAL_DEDUCTION_DESC,
sum(fnd_number.canonical_to_number(pai.action_information3)) SITE,
max(SITE_DESC) SITE_DESC,
sum(fnd_number.canonical_to_number(pai.action_information4)) PAYE,
max(PAYE_DESC) PAYE_DESC,
sum(fnd_number.canonical_to_number(pai.action_information5)) PAYE_RET_LUM_BEN,
max(PAYE_RET_LUM_BEN_DESC) PAYE_RET_LUM_BEN_DESC,
sum(fnd_number.canonical_to_number(pai.action_information6)) UIF_CONTRIBUTION,
max(UIF_CONTRIBUTION_DESC) UIF_CONTRIBUTION_DESC,
sum(fnd_number.canonical_to_number(pai.action_information7)) SDL_CONTRIBUTION,
max(SDL_CONTRIBUTION_DESC) SDL_CONTRIBUTION_DESC,
sum(fnd_number.canonical_to_number(pai.action_information8)) TOT_TAX_UIF_SDL,
max(TOT_TAX_UIF_SDL_DESC) TOT_TAX_UIF_SDL_DESC,
sum(fnd_number.canonical_to_number(pai.action_information13)) MED_TAX_CR,
max(MED_TAX_CR_DESC) MED_TAX_CR_DESC,
sum(fnd_number.canonical_to_number(pai.action_information23)) ADD_MED_TAX_CR,
max(ADD_MED_TAX_CR_DESC) ADD_MED_TAX_CR_DESC
from pay_action_information pai,
pay_assignment_actions paa,
(select max(decode(sars.lookup_code,4497,sars.meaning)) TOTAL_DEDUCTION_DESC,
max(decode(sars.lookup_code,4101,sars.meaning)) SITE_DESC,
max(decode(sars.lookup_code,4102,sars.meaning)) PAYE_DESC,
max(decode(sars.lookup_code,4115,sars.meaning)) PAYE_RET_LUM_BEN_DESC,
max(decode(sars.lookup_code,4141,sars.meaning)) UIF_CONTRIBUTION_DESC,
max(decode(sars.lookup_code,4142,sars.meaning)) SDL_CONTRIBUTION_DESC,
max(decode(sars.lookup_code,4149,sars.meaning)) TOT_TAX_UIF_SDL_DESC,
max(decode(sars.lookup_code,4116,sars.meaning)) MED_TAX_CR_DESC,
max(decode(sars.lookup_code,4120,sars.meaning)) ADD_MED_TAX_CR_DESC
from hr_lookups sars
where sars.lookup_type(+) = 'ZA_SARS_CODE_DESCRIPTIONS'
and sars.application_id(+) = 800
and sars.lookup_code in (4497,4101,4102,4115,4141,4142,4149,4116,4120)) des
where pai.action_context_id = paa.assignment_action_id
and pai.action_context_type = 'AAP'
and pai.action_information_category = 'ZATYE_EMPLOYEE_TAX_AND_REASONS'
and pai.action_information30 is not null
&C_PAYROLL_ACTION_ID |