PY_SS_MRQ2_VW

(SQL View)
Index Back

Year-End Forms for SS

This view will select year-end forms from guide table that meet the settings in Year-End Form Options page.

SELECT DISTINCT D.OPRID ,A.EMPLID ,A.PY_TAX_YEAR ,A.COMPANY FROM PS_PY_SS_RL_GDE A , PS_PY_YEOPT_CO_CAN B , PSOPRDEFN D WHERE A.YE_FORM_VIEWING_DT <= %CurrentDateIn AND A.PY_SLIP_FINAL_PRT = 'Y' AND A.COMPANY = B.COMPANY AND A.PY_TAX_YEAR = B.PY_TAX_YEAR AND ( (A.PY_TAX_YEAR >= 2017 AND A.TAXFORM_ID = 'R') OR (A.PY_TAX_YEAR < 2017 AND A.TAXFORM_ID = 'R' AND EXISTS ( SELECT 'X' FROM PS_PY_YE_CONS_MRQ C WHERE C.EMPLID = A.EMPLID AND C.YE_CONSENT_CURRENT = 'C') ) OR (A.TAXFORM_ID = 'V' AND EXISTS ( SELECT 'X' FROM PS_PY_YE_CONS_MRQ C1 WHERE C1.EMPLID = A.EMPLID AND C1.YE_CONSENT_CURRENT = 'C')))

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).
2 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
3 PY_TAX_YEAR Number(4,0) SMALLINT NOT NULL Represents the year for personal income tax purposes.
4 COMPANY Character(3) VARCHAR2(3) NOT NULL Company